Bugzilla – Bug 7257
JSON::XS crashes when playlist entry (radio URL) is selected with Controller
Last modified: 2009-10-22 11:44:09 UTC
Playlist contents: [root@alastor playlists]# cat Hilversum\ 1.m3u #EXTM3U #EXTINF:-1,mms://wm2.xs4all.nl/streamgate42 mms://wm2.xs4all.nl/streamgate42 This playlist entry works fine when I select it with the web interface or with the standard SB3 remote. Whenever I select it with the Controller, SC 7.0 crashes immediately (the wireless icon turns blue). Nothing in the logs. (Minor point: When SC crashes and the Controller can't reach SC, it reports that the *SB3* cannot contact the SC server, which seems strange. It's the controller that can't contact the SC server, I've seen this before in situations where SC was up and running and the SB3 was playing, but the Controller lost its connection.) As soon as I restart SC the radio stream starts playing without problems. I'm pretty sure this worked in earlier SC 7.0 versions. SqueezeCenter Version: 7.0 - 17665 - Red Hat - EN - utf8
Any news on this, Chris?
I can't reproduce. The playlist plays fine when selected from the controller at each of 3 levels: Music Library -> Playlists -> Press play on playlist name Music Library -> Playlists -> Playlist Name -> Press play on item name Music Library -> Playlists -> Playlist Name -> Item Name -> Play I'm going to mark as works for me. Please reopen if you can provide the text from SC crashing. Try running SC from the command line to get this text.
I've tried running it from the command line (before) but that doesn't work: # /usr/bin/perl -w /usr/libexec/squeezecenter-server --prefsdir=/var/lib/squeezecenter/prefs --logdir=/var/log/squeezecenter --cachedir=/var/lib/squeezecenter/cache [08-02-23 16:29:18.4837] main::changeEffectiveUserAndGroup (775) Warning: SqueezeCenter must not be run as root! Trying user slimserver instead. [08-02-23 16:29:18.4843] main::changeEffectiveUserAndGroup (783) Warning: User slimserver not found. [08-02-23 16:29:18.4848] Slim::Schema::forceCommit (1363) Warning: Trying to commit transactions before DB is initialized! Then the process just exits. When I use the init script the server starts and runs until I try to run the offending playlist, but only if I run it from the Jive interface.
Try running it as the slimserver user, or whatever user account you run it under.
I set /bin/bash as the shell for the squeezecenter user switched to it with su and tried the same command. I then started the playlist with the web interface, switched to another station and then used the Jive remote to start it again, the result was a segmentation fault. This only happens when I use the Jive remote to start it. bash-3.00$ /usr/libexec/squeezecenter-server --prefsdir=/var/lib/squeezecenter/prefs --logdir=/var/log/squeezecenter --cachedir=/var/lib/squeezecenter/cache Segmentation fault
Hmm, can you run it again, this time with the command line: --debug scan.scanner,player.streaming.direct,player.source
From when I selected the playlist on the Jive remote: [08-02-23 17:32:10.6246] Slim::Player::Source::playmode (298) 00:04:20:06:6b:c9: Switching to mode stop from playout-stop [08-02-23 17:32:10.6254] Slim::Player::Source::playmode (401) 00:04:20:06:6b:c9 New play mode: stop [08-02-23 17:32:10.6258] Slim::Player::Source::playmode (444) 00:04:20:06:6b:c9: Stopping and clearing out old chunks [08-02-23 17:32:10.6268] Slim::Player::Source::resetSong (1595) Resetting song buffer. [08-02-23 17:32:10.6271] Slim::Player::Source::resetSongQueue (1424) Resetting song queue [08-02-23 17:32:10.6274] Slim::Player::Source::resetSongQueue (1434) Song queue is now 0 [08-02-23 17:32:10.6281] Slim::Player::Source::playmode (556) 00:04:20:06:6b:c9: Current playmode: stop [08-02-23 17:32:10.6284] Slim::Player::Source::streamingSongIndex (1350) Adding song index 0 to song queue [08-02-23 17:32:10.6287] Slim::Player::Source::streamingSongIndex (1354) Clearing out song queue first [08-02-23 17:32:10.6290] Slim::Player::Source::streamingSongIndex (1371) Song queue is now 0 [08-02-23 17:32:10.6345] Slim::Player::Source::playmode (298) 00:04:20:06:6b:c9: Switching to mode stop from stop [08-02-23 17:32:10.6349] Slim::Player::Source::playmode (305) Already in playmode stop : ignoring mode change [08-02-23 17:32:10.6353] Slim::Player::Source::streamingSongIndex (1350) Adding song index 0 to song queue [08-02-23 17:32:10.6355] Slim::Player::Source::streamingSongIndex (1354) Clearing out song queue first [08-02-23 17:32:10.6358] Slim::Player::Source::streamingSongIndex (1371) Song queue is now 0 [08-02-23 17:32:10.6437] Slim::Player::Source::playmode (298) 00:04:20:06:6b:c9: Switching to mode stop from stop [08-02-23 17:32:10.6440] Slim::Player::Source::playmode (305) Already in playmode stop : ignoring mode change [08-02-23 17:32:10.6444] Slim::Player::Source::streamingSongIndex (1350) Adding song index 0 to song queue [08-02-23 17:32:10.6447] Slim::Player::Source::streamingSongIndex (1354) Clearing out song queue first [08-02-23 17:32:10.6450] Slim::Player::Source::streamingSongIndex (1371) Song queue is now 0 [08-02-23 17:32:10.6463] Slim::Player::TranscodingHelper::getConvertCommand (201) undermax = 1, type = wma, squeezebox2 = 00:04:20:06:6b:c9 [08-02-23 17:32:10.6467] Slim::Player::TranscodingHelper::checkBin (138) Checking formats for: wma-wma-squeezebox2-00:04:20:06:6b:c9 [08-02-23 17:32:10.6470] Slim::Player::TranscodingHelper::checkBin (138) Checking formats for: wma-wma-*-00:04:20:06:6b:c9 [08-02-23 17:32:10.6473] Slim::Player::TranscodingHelper::checkBin (138) Checking formats for: wma-wma-squeezebox2-* [08-02-23 17:32:10.6475] Slim::Player::TranscodingHelper::enabledFormat (105) Checking to see if wma-wma-squeezebox2-* is enabled [08-02-23 17:32:10.6478] Slim::Player::TranscodingHelper::checkBin (146) enabled [08-02-23 17:32:10.6481] Slim::Player::TranscodingHelper::checkBin (148) Found command: - [08-02-23 17:32:10.6484] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: wma Type: wma Command: - [08-02-23 17:32:10.6489] Slim::Utils::Scanner::scanRemoteURL (487) Opening remote location mms://wm2.xs4all.nl/streamgate42 Segmentation fault
Wow, well I think this calls for a gdb backtrace. Run this from within /usr/libexec: # gdb perl (gdb) run squeezecenter-server ... cause the segfault (gdb) bt
GNU gdb Red Hat Linux (6.3.0.0-1.84rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run squeezecenter-server --prefsdir=/var/lib/squeezecenter/prefs --logdir=/var/log/squeezecenter --cachedir=/var/lib/squeezecenter/cache Starting program: /usr/bin/perl squeezecenter-server --prefsdir=/var/lib/squeezecenter/prefs --logdir=/var/log/squeezecenter --cachedir=/var/lib/squeezecenter/cache Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0xc2d000 (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1208420672 (LWP 4720)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Detaching after fork from child process 4728. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208420672 (LWP 4720)] 0x05bc3b4c in Perl_sv_2pv_flags () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so (gdb) bt #0 0x05bc3b4c in Perl_sv_2pv_flags () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so #1 0x00193c21 in encode_comma () from /usr/share/squeezecenter/CPAN/arch/5.8/i386-linux-thread-multi/auto/JSON/XS/XS.so #2 0x00194978 in XS_JSON__XS_encode () from /usr/share/squeezecenter/CPAN/arch/5.8/i386-linux-thread-multi/auto/JSON/XS/XS.so #3 0x00192bda in encode_comma () from /usr/share/squeezecenter/CPAN/arch/5.8/i386-linux-thread-multi/auto/JSON/XS/XS.so #4 0x00194978 in XS_JSON__XS_encode () from /usr/share/squeezecenter/CPAN/arch/5.8/i386-linux-thread-multi/auto/JSON/XS/XS.so #5 0x00192bda in encode_comma () from /usr/share/squeezecenter/CPAN/arch/5.8/i386-linux-thread-multi/auto/JSON/XS/XS.so #6 0x00192c83 in encode_comma () from /usr/share/squeezecenter/CPAN/arch/5.8/i386-linux-thread-multi/auto/JSON/XS/XS.so #7 0x0019422b in encode_comma () from /usr/share/squeezecenter/CPAN/arch/5.8/i386-linux-thread-multi/auto/JSON/XS/XS.so #8 0x0019444a in XS_JSON__XS_to_json () from /usr/share/squeezecenter/CPAN/arch/5.8/i386-linux-thread-multi/auto/JSON/XS/XS.so #9 0x05bb598c in Perl_pp_entersub () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so #10 0x05b976e1 in Perl_runops_debug () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so #11 0x05b49d5d in perl_run () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so #12 0x080493f4 in main ()
OK. I'm going to move this to 7.0.1 because I plan to update JSON::XS to the latest version and you should retest when it's updated.
So you want me to retest when SC 7.0.1 is out? I'll do that.
JSON::XS will get updated before 7.0.1 is out, and I'll post a note in this bug when you can retest.
Ping Andy in case he forgot about this one. :)
QA to try to reproduce, as well
Tried Andy's steps in comment #2, works fine with this playlist for me. 7.2 - 22255
Verified to be fixed in 7.2 - 22869
Sorry guys, but on my system, the crashing problem is still present in 7.2. (I uninstalled the old version before installing 7.2) It's actually very annoying because it won't start up again unless I unplug all my SB's first. (the 'bad' entry probably gets stuck in the playlist or something). I'll probably have to upgrade my old Fedora setup and reinstall MythTV (which is no fun) :(
Ross: can you have another look at this one
(In reply to comment #18) > Ross: can you have another look at this one > Once again with 7.2 - 22900, FC8, playlist with mms://wm2.xs4all.nl/streamgate42 I've tried Andy's 3 ways to play the playlist from Controller (see comment #2) and I still cannot reproduce. Speculation: could the network have something to do with this?
Network seems unlikely. I replaced my WAP with a draft-N model two weeks ago. The only wireless connection is between the controller and the WAP. The rest is gigabit wired. I personally suspect it's something to do with my old Fedora 4 install and perhaps the old Perl version (5.8.6). I could try running 7.2 from a wired XP box, to rule out the network problems.
(In reply to comment #20) > Network seems unlikely. I replaced my WAP with a draft-N model two weeks ago. > The only wireless connection is between the controller and the WAP. The rest is > gigabit wired. I personally suspect it's something to do with my old Fedora 4 > install and perhaps the old Perl version (5.8.6). > > I could try running 7.2 from a wired XP box, to rule out the network problems. > Thanks for sharing! I think a better test would be to simply update perl and see if you can reproduce, is that possible?
So is the Jive log still showing the seg fault, or has it moved past that onto a different crash? We need to be able to reproduce this to target it sanely.
Peter have you had a chance to update Perl and test again?
Frankly I don't think I know how to upgrade my Perl without risking everything falling apart. My Fedora version is no longer support so Yum won't do it. I know I need a whole new install, but I'm not looking forward to installing MythTV again.
Thanks Peter, I understand about not being in a hurry to mess with the DVR. I'll mark this bug as monitor, let us know if/when you get to updating and what you find. Since I'm unable to reproduce with up to date Perl I'm not concerned about this.
Problem solved since upgrading to CentOS 5.0
Thanks for the update, I'll close the bug now