Skip to content
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

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

Closed
wants to merge 1 commit into from

Conversation

pjaggi1
Copy link

@pjaggi1 pjaggi1 commented May 19, 2022

zeromq/pyzmq#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.

zeromq/pyzmq#1505
a few Jupyter users have encountered an issue where there program 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.
@bluca
Copy link
Member

bluca commented May 19, 2022

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

@bluca
Copy link
Member

bluca commented May 19, 2022

goto try_tcpip;

@pjaggi1
Copy link
Author

pjaggi1 commented May 19, 2022

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).

@bluca
Copy link
Member

bluca commented May 19, 2022

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

@songjt1993
Copy link

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

@bluca
Copy link
Member

bluca commented Sep 8, 2022

Closing in favor of #4422

@bluca bluca closed this Sep 8, 2022
@Godsix
Copy link

Godsix commented Sep 13, 2022

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
Copy link

Godsix commented Sep 13, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants