[erlang-bugs] VM locking up 18.0-rc2

Rory Byrne rory@REDACTED
Sun May 17 14:37:08 CEST 2015


Hello,

You can get example code showing this bug from: 

    git clone https://gist.github.com/0b05a793f308044359ab.git

Run the code as follows:

    1> acceptor_pool:start_link().

Then connect to port 7777 on the local machine using any TCP client. For
example, using curl:

    curl http://localhost:7777/

After the first connection, the VM will lock up and look like this:

    1> acceptor_pool:start_link().
    New acceptor started: <0.37.0>
    {ok,<0.36.0>}
    HERE 1
    HERE 2
    New acceptor started: <0.40.0>
    2> 

I've tested this using the current master HEAD 9a81b28 (Wed May 13) on
Linux on single and multi-processor machines (32 bit and 64 bit) and on
FreeBSD.

Notes:

 1. The code works fine using the current maint branch (efbfe96): you can 
    connect multiple times in succession with no problems.

 2. The code works fine if you remove the following print statement from 
    the bottom of acceptor_pool.erl:

        io:format("New acceptor started: ~p~n", [Pid]),

 3. The code works fine if you change the following code in acceptor.erl:

        Self = self(),
        spawn(fun() -> acceptor_pool:create(AcceptorPool, Self) end),

    to:
    
        ok = acceptor_pool:create(AcceptorPool, self()),

Let me know if you need anything further.

Regards,

Rory



More information about the erlang-bugs mailing list