Thread sometimes bails with'Bad file descriptor'
See original GitHub issue[paultag@cassiel:~][⌚ 12:24 AM] ♥ python
Python 3.4.3+ (default, Jul 28 2015, 13:17:50)
[GCC 4.9.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pychromecast
>>> pychromecast.get_chromecasts_as_dict()
{}
>>> Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/home/paultag/.virtualenvs/cuttlebot/lib/python3.4/site-packages/zeroconf.py", line 1063, in run
handler(self.zc)
File "/home/paultag/.virtualenvs/cuttlebot/lib/python3.4/site-packages/zeroconf.py", line 1014, in <lambda>
state_change=state_change,
File "/home/paultag/.virtualenvs/cuttlebot/lib/python3.4/site-packages/zeroconf.py", line 931, in fire
h(**kwargs)
File "/home/paultag/.virtualenvs/cuttlebot/lib/python3.4/site-packages/zeroconf.py", line 989, in on_change
listener.add_service(*args)
File "/home/paultag/.virtualenvs/cuttlebot/lib/python3.4/site-packages/pychromecast/discovery.py", line 34, in add_service
service = zconf.get_service_info(typ, name)
File "/home/paultag/.virtualenvs/cuttlebot/lib/python3.4/site-packages/zeroconf.py", line 1398, in get_service_info
if info.request(self, timeout):
File "/home/paultag/.virtualenvs/cuttlebot/lib/python3.4/site-packages/zeroconf.py", line 1221, in request
zc.send(out)
File "/home/paultag/.virtualenvs/cuttlebot/lib/python3.4/site-packages/zeroconf.py", line 1657, in send
bytes_sent = s.sendto(packet, 0, (addr, port))
OSError: [Errno 9] Bad file descriptor
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
What could cause "bad file descriptor" in multithreaded ...
It's almost certainly a multi-threading issue. Between the two uses of the FILE * , some other thread has closed the underlying file...
Read more >Bad file descriptor when building multi-module project #115
Hi, I have a project with multiple modules and when I build it using multiple threads (-T2) I get the following error: [ERROR]...
Read more >TTA SGD 3.42 - error reading fdcircuit - bad file descriptor — oracle ...
An error occurred reading on circuit fdcircuit. Reason: (9) Bad file descriptor. The current operation has failed. If persistent, restart the server.
Read more >The file descriptor is duplicated in the thread [closed]
My C source behaves strangely. I use Ubuntu 14.04. I use two pthread . And in each of pthread calls the open ()...
Read more >How to File Nails Safely So They Don't Break or Peel
These are helpful for trimming long nails before filing. A nail file. This can be a classic emery board, though glass files are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thachnb85 Manually applying the changes from https://github.com/jstasiak/python-zeroconf/pull/88/commits/4475cbc723ec146bb5afb1d4931f8fb1c503b398 solves this issue for me
Can you catch it within the library and just ignore it?