riffed
riffed copied to clipboard
Unstable build runs due to unclean server shutdown
Some logs are showing server startup error out complaining address in use from lingering server process e.g. address ** (EXIT from #PID<0.1690.0>) :eaddrinuse Examples of failed build runs: https://travis-ci.org/pinterest/riffed/builds/100428104 https://travis-ci.org/pinterest/riffed/builds/100394694 https://travis-ci.org/pinterest/riffed/builds/97888684
There are projects that use underlying Erlang library (which is also used in common test in Erlang) to deal with more reliable server shutdown/startup:
- https://github.com/priestjim/exrpc/blob/master/test/test_helper.exs (too bad it is much less active than its Erlang sister project:
- https://github.com/priestjim/gen_rpc.git)
There are tests in gen_rpc, that spawned a few Erlang nodes sending messages to each other, for their tests (also on travisci). So there may be something useful there. Those projects are also on travisci so have to deal with travisci build VM performance variance.
hi Did not have enough time to take closer look. But notice that stop() in https://github.com/lpgauth/thrift-erlang/blob/master/src/thrift_socket_server.erl is doing gen_server:cast to perform stop. terminate closes the gen_tcp. Would that have anything to to do eaddrinuse (previous tcp socket in use has not been closed yet)? how does the library guarantee a clean complete shutdown of :thrift_socket_server