Bug 4501 - CLI crashes slimserver
: CLI crashes slimserver
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: CLI
: 6.5.1
: PC RedHat Linux
: P2 major (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-09 14:10 UTC by Tim Hunt
Modified: 2006-11-13 05:56 UTC (History)
0 users

See Also:
Category: ---


Attachments
Player program (12.10 KB, text/plain)
2006-11-10 03:04 UTC, Tim Hunt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hunt 2006-11-09 14:10:54 UTC
Access via the CLI is crashing the slimserver - It doesn't happen every time, but it does happen very regularly.

Strace of client when it works:-

connect(3, {sa_family=AF_INET, sin_port=htons(9090), sin_addr=inet_addr("192.168.10.10")}, 16) = 0
write(3, "login nobody password\n", 22) = 22
read(3, "login nobody ******\n", 4096)  = 20
write(3, "players 0 9999\n", 15)        = 15
read(3, "players 0 9999 count%3A4 playeri"..., 4096) = 759
write(3, "00%3A04%3A20%3A05%3A90%3Aee noop"..., 33) = 33
read(3, "00%3A04%3A20%3A05%3A90%3Aee noop"..., 4096) = 33

Strace of client program when SlimServer crashes:-

connect(3, {sa_family=AF_INET, sin_port=htons(9090), sin_addr=inet_addr("192.168.10.10")}, 16) = 0
write(3, "login nobody password\n", 22) = 22
read(3, "login nobody ******\n", 4096)  = 20
write(3, "players 0 9999\n", 15)        = 15
read(3, "", 4096)                       = 0
read(3, "", 4096)                       = 0
write(2, "Connection died:  at /usr/bin/pl"..., 62Connection died:  at /usr/bin/player line 340, <GEN0> line 1.
) = 62

Tail of /tmp/slimserver.log with d_cli turned on.

2006-11-09 16:53:37.5913 CLI: Accepted connection from 192.168.10.90:35306 (1 active connections)
2006-11-09 16:53:37.5925 CLI: 192.168.10.90:35306 - Buffered [login nobody password
]
2006-11-09 16:53:37.5949 CLI: Processing request [login]
2006-11-09 16:53:37.5971 CLI: 192.168.10.90:35306 - Sending response [login nobody *****...]
2006-11-09 16:53:37.5976 CLI: Sent response to 192.168.10.90:35306
2006-11-09 16:53:37.5987 CLI: 192.168.10.90:35306 - Buffered [players 0 9999
]
2006-11-09 16:53:37.6008 CLI: Processing request [players]
2006-11-09 16:53:37.6011 CLI: Dispatching [players]
Comment 1 KDF 2006-11-09 14:50:02 UTC
can you clarify something: crashes, or simply disconnects?

The reason I ask is that your log shows nothing of an actual crash.  Do you have to restart slimserver after this?  If so, please try running the server from /usr/local/slimserver/slimserver.pl instead of using the init.d script.  This will allow you to see anything that might have been dumped to the console that wasn't caught by the log handler in slimserver.
Comment 2 Tim Hunt 2006-11-09 16:11:21 UTC
Not sure how much this helps, but this is an strace on the server side when it dies:-

........
select(24, [6 7 8 9 12 13 14 15 16 17 18], NULL, [14 15 16 17 18], {0, 57741}) = 1 (in [18], left {0, 58000})
getpeername(18, {sa_family=AF_INET, sin_port=htons(35397), sin_addr=inet_addr("192.168.10.90")}, [16]) = 0
read(18, "login nobody password\n", 100) = 22
gettimeofday({1163117095, 851463}, NULL) = 0
gettimeofday({1163117095, 851706}, NULL) = 0
gettimeofday({1163117095, 851905}, NULL) = 0
select(24, [6 7 8 9 12 13 14 15 16 17 18], [18], [14 15 16 17 18], {0, 52660}) = 1 (out [18], left {0, 53000})
send(18, "login nobody ******\n", 20, 0) = 20
gettimeofday({1163117095, 853237}, NULL) = 0
gettimeofday({1163117095, 853462}, NULL) = 0
gettimeofday({1163117095, 853675}, NULL) = 0
select(24, [6 7 8 9 12 13 14 15 16 17 18], NULL, [14 15 16 17 18], {0, 50891}) = 1 (in [18], left {0, 51000})
getpeername(18, {sa_family=AF_INET, sin_port=htons(35397), sin_addr=inet_addr("192.168.10.90")}, [16]) = 0
read(18, "players 0 9999\n", 100)       = 15
getpeername(17, {sa_family=AF_INET, sin_port=htons(60075), sin_addr=inet_addr("192.168.10.182")}, [16]) = 0
getpeername(14, {sa_family=AF_INET, sin_port=htons(49897), sin_addr=inet_addr("192.168.10.199")}, [16]) = 0
getpeername(16, {sa_family=AF_INET, sin_port=htons(37334), sin_addr=inet_addr("192.168.10.178")}, [16]) = 0
getpeername(15, {sa_family=AF_INET, sin_port=htons(16132), sin_addr=inet_addr("192.168.10.187")}, [16]) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 12985 detached

And this is when it works - note that I have 4 SqueezeBoxes

.....
send(18, "login nobody ******\n", 20, 0) = 20
gettimeofday({1163117094, 541998}, NULL) = 0
gettimeofday({1163117094, 542217}, NULL) = 0
gettimeofday({1163117094, 542409}, NULL) = 0
select(24, [6 7 8 9 12 13 14 15 16 17 18], NULL, [14 15 16 17 18], {0, 20399}) = 1 (in [18], left {0, 21000})
getpeername(18, {sa_family=AF_INET, sin_port=htons(35396), sin_addr=inet_addr("192.168.10.90")}, [16]) = 0
read(18, "players 0 9999\n", 100)       = 15
getpeername(17, {sa_family=AF_INET, sin_port=htons(60075), sin_addr=inet_addr("192.168.10.182")}, [16]) = 0
getpeername(14, {sa_family=AF_INET, sin_port=htons(49897), sin_addr=inet_addr("192.168.10.199")}, [16]) = 0
getpeername(16, {sa_family=AF_INET, sin_port=htons(37334), sin_addr=inet_addr("192.168.10.178")}, [16]) = 0
getpeername(15, {sa_family=AF_INET, sin_port=htons(16132), sin_addr=inet_addr("192.168.10.187")}, [16]) = 0
gettimeofday({1163117094, 560094}, NULL) = 0
gettimeofday({1163117094, 560323}, NULL) = 0
gettimeofday({1163117094, 560607}, NULL) = 0
select(24, [6 7 8 9 12 13 14 15 16 17 18], [18], [14 15 16 17 18], {0, 2201}) = 1 (out [18], left {0, 3000})
send(18, "players 0 9999 count%3A4 playeri"..., 759, 0) = 759
gettimeofday({1163117094, 561939}, NULL) = 0
gettimeofday({1163117094, 562135}, NULL) = 0
gettimeofday({1163117094, 562324}, NULL) = 0
.......
Comment 3 KDF 2006-11-09 18:52:09 UTC
please see my instructions from my earlier comment and provide the requested information.  the strace may help someone else, but not me.
Comment 4 Tim Hunt 2006-11-09 19:39:17 UTC
If you look, you'll see that SlimServer exited with a segmentation fault. That was the only new piece of information when I ran SlimServer from the command line.
Comment 5 KDF 2006-11-09 19:49:24 UTC
if you say so.  good luck.
Comment 6 Tim Hunt 2006-11-10 03:04:28 UTC
Created attachment 1706 [details]
Player program

Perl script - Run it with command line:-

player all noop
Comment 7 Tim Hunt 2006-11-10 03:07:18 UTC
To make it easier for you to recreate, I've attached the offending Perl script.

You can run it with the command line:-

# perl ./player all noop

When it works it will print out an inventory of Squeezeboxes - Something like:-
1: Master Bedroom (x231) (SB1): OK
2: Living Room (x221) (SB2): OK
3: Kitchen (x211) (SB1): OK
4: Top Floor (x242)(x243) (SB1): OK
Comment 8 Tim Hunt 2006-11-12 12:49:33 UTC
Any updates?
Comment 9 KDF 2006-11-12 20:15:31 UTC
sorry Tim.  no updates. you'll have to wait for SD to get to it.  I'm a volunteer and was trying to help.  The information you provided, as I said, is nothing to me so I cannot offer any more help.
Comment 10 Tim Hunt 2006-11-13 05:56:16 UTC
Thanks for trying.

I added some extra debug lines to Plugin/CLI.pm.

It looks like the problem was with the Perl Encode module.

I am running a relatively vanilla CentOS 4.2 box which had 2.01 installed. I upgraded to 2.18 from CPAN, and it's been rock solid ever since (touch wood!!)

Once again, thanks for your help.