lwt icon indicating copy to clipboard operation
lwt copied to clipboard

Test suite hang : "Unix test 29, establish_server_1: shutdown: client closes first"

Open andrewray opened this issue 8 years ago • 1 comments

Running with the libev backend on Ubuntu 12.04 or 14.04 (in VirtualBox) leads to the test suite hanging on this test.

Switching the libev back to use select makes the test work ie

LIBEV_FLAGS=1 ./_build/test/unix/main.native

So it seems to be something to do with whatever default backend is chosen on Linux. Neither LIBEV_FLAGS=2 (poll) of LIBEV_FLAGS=4 (epoll; default?) work.

I added some printfs to trace the tests. It should look like

handler_wait...
wait_for_client...
with_connection...
wakeup_client...
handler close...
shutdown server...

When it hangs we get

handler_wait...
with_connection...
wakeup_client...
shutdown server...

It seems the server is shutdown before the handler is even woken up. Sleeping just before the server shutdown lets the test work.

andrewray avatar May 29 '17 16:05 andrewray

Further update; it also fails on ubuntu 16.04 when run in Virtualbox, while working fine on my native 16.04 laptop.

So this problem is something to do with running lwt under Virtualbox.

andrewray avatar May 31 '17 09:05 andrewray