-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
test_logging: "OSError: [Errno 9] Bad file descriptor" logged on FreeBSD #88008
Comments
Random error seen on FreeBSD: 0:05:54 load avg: 5.75 [340/427/1] test_logging passed -- running: test_pydoc (34.4 sec) Exception in thread Thread-25 (serve_forever):
Traceback (most recent call last):
File "/usr/home/vstinner/python/master/Lib/threading.py", line 990, in _bootstrap_inner
self.run()
File "/usr/home/vstinner/python/master/Lib/threading.py", line 928, in run
self._target(*self._args, **self._kwargs)
File "/usr/home/vstinner/python/master/Lib/test/test_logging.py", line 863, in serve_forever
asyncore.loop(poll_interval, map=self._map)
File "/usr/home/vstinner/python/master/Lib/asyncore.py", line 203, in loop
poll_fun(timeout, map)
File "/usr/home/vstinner/python/master/Lib/asyncore.py", line 144, in poll
r, w, e = select.select(r, w, e, timeout)
OSError: [Errno 9] Bad file descriptor |
There is a race condition. The main thread closes a file descriptor which is part of the asyncore loop "map", a thread polls on the asyncore "map" file descriptors. -- Main thread -- Close a socket: File "/usr/home/vstinner/python/master/Lib/test/test_logging.py", line 1072, in test_basic -- TestSMTPServer thread -- Wait in asyncore.loop():
Exception in thread Thread-1 (serve_forever):
Traceback (most recent call last):
File "/usr/home/vstinner/python/master/Lib/threading.py", line 990, in _bootstrap_inner
self.run()
File "/usr/home/vstinner/python/master/Lib/threading.py", line 928, in run
self._target(*self._args, **self._kwargs)
File "/usr/home/vstinner/python/master/Lib/test/test_logging.py", line 863, in serve_forever
asyncore.loop(poll_interval, map=self._map)
File "/usr/home/vstinner/python/master/Lib/asyncore.py", line 211, in loop
poll_fun(timeout, map)
File "/usr/home/vstinner/python/master/Lib/asyncore.py", line 145, in poll
r, w, e = select.select(r, w, e, timeout)
OSError: [Errno 9] Bad file descriptor |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: