Bug 2158 - CLI request hangs server
: CLI request hangs server
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: CLI
: 6.2.0
: PC Linux (other)
: P2 normal (vote)
: ---
Assigned To: Fred
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-20 11:06 UTC by Michael Beam
Modified: 2011-03-16 04:39 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Beam 2005-09-20 11:06:06 UTC
In the recent 6.2 SlimServer betas, requesting information via the CLI interface
has crashed or hung the server.  From testing, it appears that requesting artist
information is the main culprit.  I have seen this problem in 9.16 and 9.20
dailys.  Someone else mentioned it in the forums:
http://forums.slimdevices.com/showthread.php?t=16501.  For me, the problem is
happening via a web script using the slimserver php class to display the
playlist.  I am running Softsqueeze off the computer I'm trying to request.  I
also have a Squeezebox v2 in the living room that is showing the same problem. 
If i telnet to port 9090 and send "ca:c4:04:06:9e:6f playlist artist ?" the
server doesn't send back a response and then will hang.
Comment 1 KDF 2005-09-20 11:09:31 UTC
fred, have you seen this?
Comment 2 Fred 2005-09-21 00:10:17 UTC
Never seen this, very odd.

We'd need a sample run with d_cli and d_control enabled. The forum post mentions
problems with 6.1.1 as well, is this the case here? The forum post mentions
crashing but you just say hangs... what does the server do? Can you still access
it from the web interface?

What is the OS version?
Comment 3 Michael Beam 2005-09-21 08:48:18 UTC
I ran the slimserver with d_cli and d_control and it outputted the same message
as the forum poster:

slimserver $ /usr/local/SlimServer/slimserver.pl --d_cli --d_control
panic: sv_setpvn called with negative strlen at
/usr/lib/perl5/5.8.5/i686-linux/Encode.pm line 149.

Yesterday the server was hanging.  I was not able to access the web interface,
but it was not giving me "connection refused"..rather it would just sit there
"waiting for connection."  The server process wouldn't die without me killing
it, but it would not respond.  Today, with running the above line, the server is
actually crashing, and the process dies.

Here's what I did from the CLI:

me $ telnet jumbo 9090
Trying 192.168.23.243...
Connected to jumbo.conejo.monu.net.
Escape character is '^]'.
player count ?
player count 2
player id ?
player id 00%3A04%3A20%3A05%3Aad%3A71
player id 1 ?
player id 1 ca%3Ac4%3A04%3A06%3A9e%3A6f
ca%3Ac4%3A04%3A06%3A9e%3A6f mode ?
ca%3Ac4%3A04%3A06%3A9e%3A6f mode play

ca%3Ac4%3A04%3A06%3A9e%3A6f genre ?
Connection closed by foreign host.

ca%3Ac4%3A04%3A06%3A9e%3A6f album ?
Connection closed by foreign host.

ca%3Ac4%3A04%3A06%3A9e%3A6f artist ?
Connection closed by foreign host.

I got the same results with 6.1.2, but things were working fine with 6.1.1 for
me.  I am running:

Linux jumbo 2.6.11-gentoo-r9 #2 2005 i686 Intel(R) Pentium(R) 4 CPU 1400MHz
GenuineIntel GNU/Linux

With perl v5.8.5.  I am running mysql 4.0.20.

If I don't mess with the CLI, the squeezebox and web interface work perfectly.
Comment 4 Blackketter Dean 2005-09-22 16:19:22 UTC
Fred, do you think that this is going to be addressed in the next week or so for 6.2?
Comment 5 Fred 2005-09-25 08:49:23 UTC
Not sure I can fix that. The code for <playerid> genre ? has not changed since 6.0.0 in any meaningful 
way. I does 
my $track  = $ds->objectForUrl(Slim::Player::Playlist::song($client));
and then
$track->genre();

I can only infer something else has changed in between 6.1.1 and 6.1.2 (and 6.2). I don't know what 
"sv_setpvn" does.

I have added a Dump() between the two calls above to revision 4429. 

Michael, can you try it again with the latest nightly (from tomorrow) and tell us what the output is?
Dan, any idea from your end?
Comment 6 Dan Sully 2005-09-25 08:50:51 UTC
set_svpvn is an internal perl call.

Try upgrading to perl 5.8.7 perhaps?
Comment 7 Michael Beam 2005-09-25 11:48:54 UTC
Upgrading to Perl 5.8.7 fixed the problem. This must have been a problem with
5.8.5 ?  Thanks for looking into this and helping me solve the crashing!
Comment 8 Chris Owens 2006-06-16 14:41:30 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.