[erlang-bugs] Re: erl.exe dies but werl.exe does not on both Windows XP and 2008R2 with R14B01
Fri Mar 4 16:41:03 CET 2011
On Sat, 5 Mar 2011, Dave Cottlehuber wrote:
> On 4 March 2011 23:53, Dave Cottlehuber <> wrote:
>> There are 2 issues I've identified - VM crash & VM hang. Both occur
>> within a CouchDB build of erlang, on various windows variants. This
>> email covers the crash only. It is easy to reproduce:
> The 2nd issue is related to VM hang, under erlsrv service account &
> not batch file. I am using following erlsrv configurations; the debug
> one provides a visible console so easier to work with but same issue
> occurs with either service configuration.
> debug: erlsrv.exe add "CouchDeBug" -workdir
> "c:\couch\couchdb-1.0.2\bin" -onfail restart_always -debugtype console
> -args "-sasl errlog_type error -s couch +A 4 +W w" -comment
> "CouchDeBug" -machine "c:\couch\CouchDB-1.0.2\erts-5.8.2\bin\erl.exe"
> new: erlsrv.exe add "NewCouch" -workdir "c:\couch\couchdb-1.0.2\bin"
> -onfail restart_always -args "-sasl errlog_type error -s couch +A 4 +W
> w" -comment "NewCouch" -machine
> erlsrv starts erl.exe not werl.exe and so the issue noted in previous
> email crops up and the application is down.
I think it may be the same issue. We're investigating the batch file issue
to start with. The problem is easy to reproduce - very nice.
> 2 questions -
> Why does erlsrv not use werl.exe ? it is technically possible to pass
> erlsrv the -machine parameter with werl.exe, and it runs successfully
> as a service avoiding the original issue. The erlang/OTP source
> confirms that this is bad - but why?
Werl cannot handle everything the erlsrv program wants to do to the
machine, like stopactions, killing by signalling etc. Fixing erl so it
does not hang is the easiest and best thing to do here.
> 2nd part. using erlsrv "-restart_always" couchdb restarts very
> quickly. but after up to 8h of continuous curl _restart, the erl.exe
> window definitely hangs - no input accepted - as if the REPL loop is
> Any ideas why erlang seems to hang around init:restart() and what we
> can do about it? Do you want any more information?
When running erl on Windows you get the "old shell", meaning that another
io-server is running and also a special driver (the fd-driver) is used.
The fd-driver is emulatong Unix behaviour and might be the cause of all
the problems, but the actual user.erl code might also be broken. I'll
debug it, find the first problem and get back to you when I've narrowed it
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
More information about the erlang-bugs