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

Crash without logging #40

Closed achbed closed 9 years ago

achbed commented 9 years ago

First of all, I suspect this may be my environment. I'm not sure what's causing it, but DeeFuzzer seems to be crashing about every 13 hours (so far) when playing 10 streams at once. When it dies, there;s nothing reported to the log at all - just silence. I'm unable to see anything in any log that says its either stopping or crashed.

Log snippet during a crash/restart:

2014-12-02 14:04:32,230 INFO Station http://streams.patestapes.com:80/world001: DeeFuzzing:  id = 15, name = 15-Chinalia Brothers_ Coco BeansThe Chinalia Brothers.mp3
2014-12-02 14:05:18,096 INFO Station http://streams.patestapes.com:80/carib001: DeeFuzzing:  id = 17, name = 17-Eric_Donaldson_Cherry_O_Baby_-_Single.mp3
2014-12-02 14:05:43,468 INFO Station http://streams.patestapes.com:80/populux001: DeeFuzzing:  id = 12, name = 12-Gong_ Percolations Part 1.mp3
2014-12-02 14:06:13,585 INFO Station http://streams.patestapes.com:80/easy001: DeeFuzzing:  id = 13, name = 13-Talking_Heads__Once_In_A_Lifetime.mp3
2014-12-02 14:06:21,601 INFO Station http://streams.patestapes.com:80/populux012: DeeFuzzing:  id = 8, name = 08-Punch_Brothers__Movements___Locations_.mp3
2014-12-02 14:06:45,161 INFO Station http://streams.patestapes.com:80/jazz001: DeeFuzzing:  id = 15, name = 15-Thelonious_Monk_Epistrophy_64_Its_Monk_Time.mp3
2014-12-02 14:06:46,732 INFO Station http://streams.patestapes.com:80/populux011: DeeFuzzing:  id = 47, name = 47-Purity Ring_ Loftcries – Ungirthed 7_ (Canada).mp3
2014-12-02 14:07:15,195 INFO Core: Starting DeeFuzzer
2014-12-02 14:07:15,195 INFO Core: Using libshout version 2.3.1
2014-12-02 14:07:15,195 INFO Core: Number of stations : 0
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/populux012
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/easy001
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/jazz001
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/sound001
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/africa001
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/populux011
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/world002
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/xmas001
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/world001
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/populux001
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/jukebox001
2014-12-02 14:07:15,198 INFO Core: Creating station for folder /srv/pt/patestapes.com/media/carib001
2014-12-02 14:07:15,198 INFO Core: Loading new stations
achbed commented 9 years ago

I've currently resorted to a "ping" and service restart if that fails using Drupal. It's checking at most once every 5 minutes. This is why I've added the "pick up where left off playing last time" code to the dev branch - prevents the streams from jumping back to 0 every time a restart happens.

achbed commented 9 years ago

Well, after a server-level update and reboot, everything seems to be working much better (3 days since reboot and no more crash/restarts). If I don't have any more crashes in a few more days, I'll close this issue.

yomguy commented 9 years ago

Good news! But ping_server() technic is really nasty although it is the only simple method I found to check if the network is ready (and then waiting silently). Would you see another method for this?

achbed commented 9 years ago

Well, my "ping" checks are actually grabbing the stream status from the icecast server, parsing it, and checking to see if there are any active mountpoints. The symptom is that the source connections close, so icecast reports an empty server status for streams that are sourced from deefuzzer. If this check returns no valid deefuzzer streams, I fire off a root-level service deefuzzer restart (through a shell script and sudo abstraction layer for security). The restart does a kill -9 before launching another instance of deefuzzer to ensure things are stopped properly.

I'm not sure about network status pings between deefuzzer and the icecast server - ping_server seems to be the least of bad options.

achbed commented 9 years ago

Solved a different way via #45