zeromq / pyzmq

PyZMQ: Python bindings for zeromq
http://zguide.zeromq.org/py:all
BSD 3-Clause "New" or "Revised" License
3.66k stars 638 forks source link

Bad file descriptor (C:\Users\runneradmin\AppData\Local\Temp\tmpw8fxpxar\build\_deps\bundled_libzmq-src\src\epoll.cpp:73 #1999

Closed gary-harp closed 3 weeks ago

gary-harp commented 2 months ago

This is a pyzmq bug

What pyzmq version?

26.0.3

What libzmq version?

Not sure

Python version (and how it was installed)

3.11 via Windows

OS

Windows 11

What happened?

I believe this is bundled with Jupyter. Spinning up the Jupyter server fails with the error above when first notebook is opened. Downgrading to 25.1.2 solved the issue.

Code to reproduce bug

No response

Traceback, if applicable

No response

More info

No response

minrk commented 4 weeks ago

Did you install Python via the Windows Store? If so, this is #1981 . In either case, can you test with the appropriate wheel for you from the latest build here and let me know if it fixes things for you?

gary-harp commented 3 weeks ago

Thanks I'm not sure what this means. I can try to increment to 26.2 and check if it resolved if you want. python was installed from windows store. This is a work machine and the mandatory security software that it runs will not allow to install other python distros. I imagine that this is the same for many machines. Microsoft has made some changes to the python distro that can cause issues. Recommend to add windows store python distros to your testing procedures.

minrk commented 3 weeks ago

Unfortunately, Microsoft Store installations are not available in any testing environments to my knowledge, so that is not feasible. But I have managed to reproduce this issue and confirm it was fixed by #2024, so if you can confirm it does so for you, that would be great! Or if it does not, that would be super helpful as well.

gary-harp commented 3 weeks ago

It should be feasible but you will need to spin up windows VM and use some Powershell. I tried 26.0.3 and 26.2.0 just now and wasn't able to reproduce. Sorry. Anyway thanks for working it.

minrk commented 3 weeks ago

Thanks so much for testing!

I wish it was that easy to set up a vm, but it took me months to find one that actually reproduced the bug, and only in incredibly slow x86 emulation on arm. I don't know why the Store usually isn't available and no cloud provider I have access to supports VMs with the store available. And even the store alone is not sufficient to reproduce the bug, it needed a username with non-ascii characters as well.

minrk commented 2 weeks ago

If you happen to have a chance and can test an install install from one of these wheels (download and unzip, then pip install --force-reinstall path/to/pyzmq-...whl), I think I have fixed the underlying libzmq problem in https://github.com/zeromq/libzmq/pull/4734.