Bug 2155 - SlimServer gets stuck in read() loop
: SlimServer gets stuck in read() loop
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: unspecified
: PC Linux (other)
: P2 major (vote)
: Future
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-19 23:10 UTC by Tristan Horn
Modified: 2011-03-16 04:39 UTC (History)
0 users

See Also:
Category: ---


Attachments
lsof of stuck SlimServer process (5.23 KB, text/plain)
2005-09-19 23:11 UTC, Tristan Horn
Details
Console output from most recent hang (1.84 KB, text/plain)
2005-10-28 22:29 UTC, Tristan Horn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Horn 2005-09-19 23:10:09 UTC
Environment:
- Linux 2.6.12-gentoo-r8 SMP
- Gentoo Linux 2005.0 ~x86 CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
- perl-5.8.7  +berkdb -build -debug -doc +gdbm +ithreads -minimal +perlsuid
- SlimServer r4272 - 2005-09-13 20:43:39

I started SlimServer some time on 2005-09-13 (after the checkout), under screen
with scrollback 10000, with these options: --d_info --d_import --d_source

I use SlimServer exclusively to stream one or two SHOUTcast stations to a
wireless Squeezebox.  I don't use the web UI at all, and it's unlikely that
anyone else did.  I don't give SlimServer access to my library, nor do I use
playlists.

The server ran fine until 2005-09-18 14:06:26 -- the last console output
(typically one line every 1.5s):

2005-09-18 14:06:26.7995 reduced chunksize to 24576 for metadata

At that point it stopped responding to the Squeezebox and started chewing 100%
CPU.  strace indicates that it's endlessly read()ing:

read(11, "", 1)                         = 0

lsof indicates that fd 11 is ... strange:

slimserve 12590 tristan   11u  sock      0,4         31463183 can't identify
protocol

FWIW, ~/.slimserversql.db was last modified 2005-09-18 08:06:18.

I'm attaching the full output from lsof.  I've also got the 645K (10000 lines)
of output dating back to 10:00 that day, but it looks fine to me.

I've reniced the server and will keep it running like this for a little while in
case there's anything else I can do to debug this.
Comment 1 Tristan Horn 2005-09-19 23:11:03 UTC
Created attachment 840 [details]
lsof of stuck SlimServer process
Comment 2 Blackketter Dean 2005-09-22 16:18:47 UTC
Tristan:   I believe that this issue 
happened when trying to read the shoutcast metadata.  the server should detect a failed socket and 
handle it, but I'm not sure what state the socket was in when this happened or what error was returned.

can you reproduce this with the d_remotestream option turned on? 

Comment 3 Blackketter Dean 2005-09-26 12:44:05 UTC
tristan, you there?
Comment 4 Tristan Horn 2005-09-26 15:41:56 UTC
Yep, sorry... I restarted SlimServer with --d_remotestream a couple nights ago,
just waiting for it to hang again.
Comment 5 Blackketter Dean 2005-10-05 14:41:49 UTC
Going to punt on this bug post-6.2.  Please post details if you can reproduce.
Comment 6 Tristan Horn 2005-10-28 22:29:05 UTC
Created attachment 960 [details]
Console output from most recent hang

Happened once again -- hung & pegged CPU for 33 1/2 hours until I ^C'd it. 
This output doesn't look too useful, though...
Comment 7 Blackketter Dean 2007-10-22 16:21:37 UTC
We haven't seen this in a long while.  If it's still happening with 7.0, please reopen.