erlyaws / yaws

Yaws webserver
https://erlyaws.github.io
BSD 3-Clause "New" or "Revised" License
1.28k stars 267 forks source link

r3:do(compile). kills embedded yaws service #307

Open iambumblehead opened 7 years ago

iambumblehead commented 7 years ago

I'm humbly hoping someone here may advise or comment on this yaws-related ticket which involves rebar3 https://github.com/erlang/rebar3/issues/1549

I'm using the latest versions of rebar3 and yaws 2.0.4

Because I cannot use rebar3's reloading behaviour I've been starting a new erl shell for every change I make, which is slow and cumbersome.

vinoski commented 7 years ago

I'm guessing you built Yaws with HiPE enabled? If so, try again without it.

iambumblehead commented 7 years ago

I'll take a look later this evening and let you know if HiPE is enabled. I used rebar3 to include yaws and didn't explicitly include or disclude it myself.

There are some responses in the rebar3 issues link that include other hypotheses.

Thanks.

iambumblehead commented 7 years ago

I'm not sure how rebar3 is managing the Yaws compilation but it appears that HiPE would need to be explicitly disabled with something like ./configure --disable-hipe. I will ask the rebar3 thread if there is a "rebar3 way" of doing this.

I compiled yaws from the location where it was downloaded by rebar3 and used ./configure --disable-hipe, and make shows this in the output

configure: WARNING: unrecognized options: --disable-hipe

I recompiled otp with --disable-hipe, removed _build/ directory where rebar3 kept the yaws sources and rebuilt everything with rebar3 but the same issue occurs

ferd commented 7 years ago

In an attempt to move this forward, here's a repost of what I had on the rebar3 issue:


My bet there is on Yaws not coping with sequential hot-code loads and one of the modules getting killed. You can see process <0.320.0> getting killed (I assume this is gserv). The parent (I assume this is yaws_serv) is holding a reference to <0.320.0> in its state before terminating with reason restartme.

You can see this taking place here in the code: https://github.com/klacke/yaws/blob/b32f7d49eff120f7860453a488acbd358beb5763/src/yaws_server.erl#L421-L430

I don't know that too much can be done if this server dies.