libzmq icon indicating copy to clipboard operation
libzmq copied to clipboard

fall thru to tcp/ip for any AF_UNIX/ipc error

Open pjaggi1 opened this issue 3 years ago • 4 comments

https://github.com/zeromq/pyzmq/issues/1505 a few pyzmq clients have encountered an issue where the program they're running ends after this assert: Bad file descriptor (C:\ci\zeromq_1602704446950\work\src\epoll.cpp:100)

We found this happens for users that have a windows 10 build that supports AF_Unix sockets but does not for those who have older windows 10 builds. this change is to remove the preserved errno (which doesn't appear to be used/checked anywhere-hence the later assert/abort) and instead after cleanup try to use a tcp/ip socket.

pjaggi1 avatar May 19 '22 18:05 pjaggi1

Uh? This doesn't make much sense, there's already a skip-ahead if the socket creation fails

bluca avatar May 19 '22 18:05 bluca

https://github.com/zeromq/libzmq/blob/37224c93de2c7c08602c79a2a1b4d7e582f09281/src/ip.cpp#L584

bluca avatar May 19 '22 18:05 bluca

Uh? This doesn't make much sense, there's already a skip-ahead if the socket creation fails

in our case and in some of these other cases its not necessarily the socket creation that fails (for us it was the bind).

pjaggi1 avatar May 19 '22 18:05 pjaggi1

Uh? This doesn't make much sense, there's already a skip-ahead if the socket creation fails

in our case and in some of these other cases its not necessarily the socket creation that fails (for us it was the bind).

Weird, but ok, then please add a proper check for that specific errno after the failed bind, and if it happens, close the socket and jump to the try-tcp.

Also please add a relicense statement https://github.com/zeromq/libzmq/tree/master/RELICENSE

bluca avatar May 19 '22 18:05 bluca

I had the same problem. Will this pr be merged into master? How long will it take to see it in the release version

songjt1993 avatar Aug 24 '22 10:08 songjt1993

Closing in favor of https://github.com/zeromq/libzmq/pull/4422

bluca avatar Sep 08 '22 13:09 bluca

I had the same problem.And I found conditions:①Windows 10 username contain no-ASCII Characters,such as Chinese Characters;②libzmq was compiled with msvc v142 or v143. I compile pyzmq with libzmq-v141,it‘s OK. Before developers solve the problem,user can avoid the problem by replacing to with libzmq-v141.

Godsix avatar Sep 13 '22 02:09 Godsix

I had the same problem.And I found conditions:①Windows 10 username contain no-ASCII Characters,such as Chinese Characters;②libzmq was compiled with msvc v142 or v143. I compile pyzmq with libzmq-v141,it‘s OK. Before developers solve the problem,user can avoid the problem by replacing to with libzmq-v141.

So this problem mostly occurs in non-English speaking countries, because they are more likely to use non-ASCII characters as Windows username.

Godsix avatar Sep 13 '22 02:09 Godsix