yomguy / DeeFuzzer

Light and instant media streaming client for web radios and TVs written in Python
https://github.com/yomguy/DeeFuzzer
GNU General Public License v3.0
143 stars 29 forks source link

Multiple relaying with audio AND video makes libshout crazy #7

Closed yomguy closed 1 year ago

yomguy commented 10 years ago

WebM streaming with pycurl together with MP3 streaming with libshout is buggy. Although I thought the pycurl method would lock the GIL, it seems that urllib is NOT thread safe ! So we need to find a better thread safe solution for relaying.

Bug: [1244719.263286] deefuzzer[2699]: segfault at 2dfc000 ip 00007f7b6156e8a2 sp 00007f7b5df615c0 error 4 in libshout.so.3.2.0[7f7b61567000+f000]

Some infos & clues: http://stackoverflow.com/questions/4549490/pycurl-curl-not-following-the-curlopt-timeout-option http://stackoverflow.com/questions/5825151/are-urllib2-and-httplib-thread-safe http://urllib3.readthedocs.org/en/latest/ https://gist.github.com/andrewwatts/2012630 http://fragmentsofcode.wordpress.com/2011/01/22/pycurl-curlmulti-example/

yomguy commented 1 year ago

Relaying in 0.8 is now OK