malamute icon indicating copy to clipboard operation
malamute copied to clipboard

mlm_selftest.exe -t mlm_server crashes on exit in Windows

Open opedroso opened this issue 8 years ago • 3 comments

Got latest zeromq, built all in Windows using Dev2013.

When Malamute selftest runs, it crashes on exit, even thought actual test passed.

X:\3rdparty\malamute> builds\msvc\vs2013\DebugDEXE\mlm_selftest.exe -t mlm_server
Running malamute test 'mlm_server'...
 * mlm_server: I: 16-04-26 14:45:31 client address='(null)' - invalid command
OK
Assertion failed: Successful WSASTARTUP not yet performed (..\..\..\..\src\signaler.cpp:261)

It is interesting that it works for several of the executables built, but fails for these:

X:\3rdparty\malamute\builds\msvc\vs2013\DebugDEXE\mlm_selftest.exe
X:\3rdparty\malamute\builds\msvc\vs2013\ReleaseDEXE\mlm_selftest.exe
X:\3rdparty\malamute\builds\msvc\vs2013\x64\DebugDEXE\mlm_selftest.exe
X:\3rdparty\malamute\builds\msvc\vs2013\x64\ReleaseDEXE\mlm_selftest.exe

Commonality is these are all using LIBZMQ component as DLL.

opedroso avatar Apr 26 '16 20:04 opedroso

Closing this issue, since this is a LIBZMQ problem: https://github.com/zeromq/libzmq/issues/1708

opedroso avatar Apr 27 '16 16:04 opedroso

I did this and the problem went away.

x:\3rdparty\malamute>git diff --patch src/mlm_selftest.c
diff --git a/src/mlm_selftest.c b/src/mlm_selftest.c
index 381216f..22c00ed 100644
--- a/src/mlm_selftest.c
+++ b/src/mlm_selftest.c
@@ -141,7 +141,8 @@ main (int argc, char **argv)
     else
         test_runall (verbose);

-    return 0;
+       fcloseall();
+       return 0;
 }
 /*
 ################################################################################

I wonder if I should change the test or wait for the LIBZMQ issue to be fixed.

opedroso avatar Apr 27 '16 21:04 opedroso

Put zsys_shutdown() at the end of the test solve the issue.

diorcety avatar Jul 11 '17 08:07 diorcety