Bugzilla – Bug 14523
Touch freezeing and rebooting when playing Rhapsody
Last modified: 2010-04-08 17:24:13 UTC
Playing any Rhapsody song in my library results in the following behavior: *Plays first 3-5 second of the song *Skips to next song *Touch freezes within 3 seconds *Touch reboots Repeated behavior with touch directed to my ScqueezeCenter or SqueezeNetwork. SC Version: 7.4.0 - r28660 Touch Firmware: 7.4.0-r7790 Mike
attached web forum posting URL
Michael: can you provide some logs
Mike, it works fine here. What's your mac address?
Created attachment 5986 [details] serial capture
Mac Address: 00:04:20:22:00:37 I assume the file James attached is my log. If not how do I grab that? Mike
James, I don't see anything in the log. Does that mean you can reproduce this? I really need a reproducible case, but it works fine here. Mike, what tracks do you see this with (maybe it's only some Rhapsody tracks with this problem, and not the ones I test with).
It happens with anything I play on Rhapsody... How do I capture a log? Is there a Wiki article someone can point me too? If anyone wants to call me @ 510-657-8747 x236 they can walk me thru it. Mike
Oct 29 14:39:50 squeezeplay: playback_callback:332 Audio underrun: used 400 fram es, requested 441 frames. elapsed samples 10165872 Oct 29 14:40:24 squeezeplay: WARN net.thread - NetworkThread.lua:146 network t hread timeout for Task(SocketHttp {mysqueezebox.com_Request}(R)) I see that in the log, when the error happens. Its easy to repo here Start a Fab4 Attach to SqueezeNetwork (test.sn) Go to Rhapsody Start playing any content. I did Music Guide > Genres > Folk> Genre Sampler <press and hold // play> Let it play till the error happens. Typically between 3-15 tracks will cause it to happen. Tested with 7.5.0 r7965, Serial attached to monitor, tail -f /var/log/messages
== Auto-comment from SVN commit #7991 to the jive repo by richard == == https://svn.slimdevices.com/jive?view=revision&revision=7991 == Fixed Bug #14523 While booting wait for mmc/sd cards or usb drives to be mounted before continuing. This allows the debug logging to work correctly. Mount removable volumes without sync, otherwise it's too slow.
Opps, wrong bug number in check in comment.
== Auto-comment from SVN commit #8009 to the jive repo by richard == == https://svn.slimdevices.com/jive?view=revision&revision=8009 == Bug #14523 Added debug to get full headers when playing remote streams.
== Auto-comment from SVN commit #8010 to the jive repo by richard == == https://svn.slimdevices.com/jive?view=revision&revision=8010 == Bug #14523 Fix (rare) memory error found with valgrind.
== Auto-comment from SVN commit #6544 to the player repo by richard == == https://svn.slimdevices.com/player?view=revision&revision=6544 == Bug #14523 Possible fixes for rhapsody crashes.
== Auto-comment from SVN commit #8013 to the jive repo by richard == == https://svn.slimdevices.com/jive?view=revision&revision=8013 == Bug #14523 Kick build server.
== Auto-comment from SVN commit #6545 to the player repo by richard == == https://svn.slimdevices.com/player?view=revision&revision=6545 == Bug #14523 Fix compile error on arm.
QA to retest after yesterdays changes. Mike, could you also try r8013 or later. Thanks.
== Auto-comment from SVN commit #6570 to the player repo by richard == == https://svn.slimdevices.com/player?view=revision&revision=6570 == Bug #14523 Fix crasher during failure to download data from rhapsody.
Ok, I have had a fab4 running for 24 hours with Rhapsody now, no errors. QA please retest.
My Touch still freezes instantly. Not resolved.
Michael: you need to be on firmware 7.5.0-r8075 or higher QA is currently testing now....
Created attachment 6300 [details] serial log Latest serial capture. Playback stoped around 8:16 am 13NOV
7.5.0 r8084 = instant crash Again, can someone tell me, or point me to a place that instructs me how to get a log out of the device?
You can use an SD card with /log folder in the root. OR ssh into the Touch and CAT /var/log/messages (which gets wiped if you reboot) OR use the USB to Serial cable https://wiki.slimdevices.com/index.php/Log_File
Using a DEBUG build of firmware, I have not had a crash yet, but, I did have audio stop with the following error: ======================================= Nov 17 23:00:55 squeezeplay: ^M Nov 17 23:00:55 squeezeplay: INFO audio.decode - decode_start_handler:274 init decoder mp3 Nov 17 23:04:26 squeezeplay: INFO audio.decode - Playback.lua:418 connect 69.28.176.117:80 GET /1/2/2/9/5/114159221.rad HTTP/1.0^M Nov 17 23:04:26 squeezeplay: INFO audio.decode - Playback.lua:421 GET /1/2/2/9/5/114159221.rad HTTP/1.0^M Nov 17 23:04:26 squeezeplay: Accept: */*^M Nov 17 23:04:26 squeezeplay: Cache-Control: no-cache^M Nov 17 23:04:26 squeezeplay: User-Agent: iTunes/4.7.1 (Unix; N; linux; x86_64-linux; EN; utf8) SqueezeNetwork/7.5.0-sn/TRUNK^M Nov 17 23:04:26 squeezeplay: Icy-MetaData: 1^M Nov 17 23:04:26 squeezeplay: Connection: close^M Nov 17 23:04:26 squeezeplay: Host: llnw-1012.listen.com^M Nov 17 23:04:26 squeezeplay: ^M Nov 17 23:04:26 squeezeplay: INFO audio.decode - decode_start_handler:274 init decoder mp3 Nov 17 23:07:31 squeezeplay: playback_callback:332 Audio underrun: used 169 frames, requested 441 frames. elapsed samples 7752838 Nov 17 23:07:36 squeezeplay: ERROR audio.decode - src/rhapsody/rhapsody.c:282 bad response: {"cause":null,"exception":"com.real.common.ebi.exception.BusinessLogicException","localizedMessage":"Unable to Authenticate the user","message":"Unable to Au Nov 17 23:07:36 squeezeplay: ERROR audio.decode - src/rhapsody/rhapsody.c:586 EA failed
Created attachment 6392 [details] Log from Mike Does this help?
Steven, do you have Rhapsody set up that you can easily look at this?
Steven notes he can't reproduce this.
rhapsody_getEA() parses a series of 8-bit integers by parsing them from an ascii input buffer. The length of this buffer is not known ahead of time and therefore neither is the number of output bytes that it may contain. The parsed bytes are temporarily stored in request_buf which is fixed at 2048 bytes. It is possible for a single input buffer to contain the input for more than 2048 bytes, and thus request_buf may be overrun. In the example I have just caught in the debugger idx == 2073. I also note that the 'do { } while ()' loop in this function terminates on not 'err >= 0', even though 'err' is not updated in the body of the loop. At best this is confusing code. Actual loop termination is achieved with 'break' statements. The second continue statement in that loop will leak response_buf, although this case is very unlikely in practice.
Created attachment 6607 [details] Proposed patch
Alan - Your patch looks ok, but I think it kicks in one element too early, i.e. if (idx >= sizeof(request_buf)) { would be sufficient to be if (idx > sizeof(request_buf)) { If the 'while (tok != NULL)' loop happens to be done just after filling in the last allowed element (and idx now points to the first element outside the buffer) this would just be fine without need to do a partial flush. The second thing with 'err' probably is something left over from the ssl_read() call at the top of the do - while loop. See error message which is still using 'err'. Should probably be using 'len' there.
== Auto-comment from SVN commit #6681 to the player repo by ayoung == == https://svn.slimdevices.com/player?view=revision&revision=6681 == bug 14523: Touch freezeing and rebooting when playing Rhapsody Avoid overrunning the temp buffer when decoding the initial EA bytes.
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release. If you are still seeing this issue, please let us know!