-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on windows, zdir test fails #1604
Comments
-1 from zsock_recv could be:
Are you able to reproduce it through a debugger and check what's happening? |
the actor died |
A 1 signal could also be an error. When running in verbose mode, is there an error printed by the zdir_watch actor? "zdir_watch: ..." (see s_on_command function in zdir.c) |
here the output of the test in verbose mode Running czmq test 'zdir'...
|
note the "toto" string is an output I added ;-) |
Not sure why the actor is stopping then. If you are able to debug it further and find a fix, PRs are welcome :-) |
and the test does not fail in debug mode, not easy to track. no idea for now. |
Does debug mode disable compiler optimizations on Windows? |
looking at #1608 build result, the only failing test is now this one. The point is it also fails in one of the linux configuration, to this may be not strictly windows related. |
Does it fail on Linux? Where? Haven't seen it consistently fail, but having it always pass on debug mode and never otherwise to me is a strong suggestion that there is some undefined behaviour problem, if debug on Windows removes compiler optimisation |
see https://travis-ci.org/zeromq/czmq/builds/193541925 this is the build of your last commit (for shutdown on each test), it just fails on one linux configuration... in zdir test. I just noticed that, I have no time for more investigation yet. |
That's Mac OS x rather than Linux, but most important it only happens rarely, not consistently |
ah ok. I had no time to investigate yet, I'll try do so. |
Thanks! |
ok I'v got it. The issue is that in windows release mode, NDEBUG flag is set (by CMAKE) and so assert macros are disabled. In the zdir test there are many call within assert, so they are no more executed in release mode... as an exemple all synchronisation is lost in such calls : my understanding is that the fix is two fold:
I will prepare the PR |
before changing the appveyor file, I propose a PR on zproject so that we can easily know if assert is enabled when running tests |
Great catch! I've been burned by that before (in zproto), should have seen it. Now the tests are all passing finally: https://ci.appveyor.com/project/zeromq/czmq Thank you again! |
Not sure why you closed this... zsock_send (watch, "si", "TIMEOUT", 100);
..... // poll for a certain timeout before giving up and failing the test. the zdir test is still crashing when build as release using vs 2015. I'am not sure whether its related to all the functions calls being removed by the above use of the assert macro or not, since the crash happens when it calls zlist_pop with a null pointer for patches. |
nvm, seems like i had the wrong source |
with vs 2015, in relase only. It runs in debug mode, here (line 998):
// wait for notification of the file being added
char *path;
int rc = zsock_recv (watch, "sp", &path, &patches);
the recv call return -1.
The text was updated successfully, but these errors were encountered: