PDA

View Full Version : slimserver crashes when reindexing



jarome
2005-08-10, 04:10
For the past two nights (SuSR 9.1), my slimserver has crashed at the time rescanning of my (large) library starts:

The log has:

CPU: Intel (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

mplayer: could not connect to socket
mplayer: Permission denied
Stream description: audio/x-pn-multirate-realaudio logical stream
Stream mimetype: audio/x-pn-realaudio
Win32 LoadLibrary failed to load: cook.so, /usr/lib/win32/cook.so, /usr/local/lib/win32/cook.so
Streaming: Launching mplayer -really-quiet -vo null -cache 128 -af volume=0,resample=44100:0:1 -ao pcm:file=/dev/fd/3 rtsp://160.36.178.159:554/broadcast/wuot.rm?cloakport=8080,554,7070
MPlayer 1.0pre7-3.3.3 (C) 2000-2005 MPlayer Team
CPU: Intel (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

mplayer: could not connect to socket
mplayer: Permission denied
Stream description: Audio Stream
Stream mimetype: audio/x-pn-realaudio
Operation `bool': no method found, argument in overloaded package Class::DBI::Object::Has::Been::Deleted at /usr/local/slimserver/Slim/Buttons/AlarmClock.pm line 208.
Couldn't read from handle: Is a directory at /usr/local/slimserver/Slim/Utils/Misc.pm line 428

jarome
2005-08-10, 04:37
It is hard to diagnose things because the log file does not have time stamps. Log files should have timestamps!

I say it crashed when the reindexing started because the log file timestamp was 1 am.

Robin Bowes
2005-08-10, 04:51
jarome wrote:
> It is hard to diagnose things because the log file does not have time
> stamps. Log files should have timestamps!
>
> I say it crashed when the reindexing started because the log file
> timestamp was 1 am.

Jarome,

Install daemontools (http://cr.yp.to/daemontools.html)

Configure slimserver to pipe log output to multilog as follows:

SLIMSERVER_LOG="'|/usr/local/bin/multilog t s1000000 n40
/var/log/slimserver'"
SLIMSERVER_ARGS="--daemon --prefsfile=$SLIMSERVER_CFG
--logfile=$SLIMSERVER_LOG"

Et viola - timestamps!

R.

jarome
2005-08-10, 06:05
Where do I put the configuration info?

Any idea why I am crashing?

jarome
2005-08-10, 06:11
The page says it only workd for UNIX....

./load envdir unix.a byte.a
envdir.o(.text+0xd5): In function `main':
: undefined reference to `errno'
envdir.o(.text+0x1b0): In function `main':
: undefined reference to `errno'
envdir.o(.text+0x1ca): In function `main':
: undefined reference to `errno'
unix.a(openreadclose.o)(.text+0x1e): In function `openreadclose':
: undefined reference to `errno'
unix.a(pathexec_run.o)(.text+0xf6): In function `pathexec_run':
: undefined reference to `errno'
unix.a(pathexec_run.o)(.text+0x167): more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [envdir] Error 1
Copying commands into ./command...
cp: cannot stat `compile/svscan': No such file or directory

Robin Bowes
2005-08-10, 06:35
jarome wrote:
> Where do I put the configuration info?

Jarome,

I'm on Fedora Core 4, and I put the configuration information in
/etc/sysconfig/slimserver.

Not sure whether this is the same on SuSe.

>
> Any idea why I am crashing?

Not really - try disabling plugins.

What version of slimserver is it?

R.

Robin Bowes
2005-08-10, 06:43
jarome wrote:
> The page says it only workd for UNIX....
>

Linux is fine.

> ../load envdir unix.a byte.a
> envdir.o(.text+0xd5): In function `main':
> : undefined reference to `errno'
> envdir.o(.text+0x1b0): In function `main':
> : undefined reference to `errno'
> envdir.o(.text+0x1ca): In function `main':
> : undefined reference to `errno'
> unix.a(openreadclose.o)(.text+0x1e): In function `openreadclose':
> : undefined reference to `errno'
> unix.a(pathexec_run.o)(.text+0xf6): In function `pathexec_run':
> : undefined reference to `errno'
> unix.a(pathexec_run.o)(.text+0x167): more undefined references to
> `errno' follow
> collect2: ld returned 1 exit status
> make: *** [envdir] Error 1
> Copying commands into ./command...
> cp: cannot stat `compile/svscan': No such file or directory

Ah, forgot about the errno issue. You need to patch the source to fix
this bug.

See here [1] for more details, and here [2] for the patch for daemontools.

[1] http://thedjbway.org/errno.html
[2]
http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch

In actual fact, this is a trivial patch. All you need to do is edit
error.h and change the line

"extern int errno;"

to

#include <errno.h>

It should build OK after this.

R.

jarome
2005-08-10, 07:18
The patch works, and I changed the configuration in /etc/slimserver. But what part of daemontools do I need, and how is that started automatically in /etc/init.d?

jarome
2005-08-10, 07:20
JARDELL:/etc/init.d # rcslimserver restart
Slimserver binary=/usr/local/slimserver/slimserver.plSlimserver binary=/usr/local/slimserver/slimserver.plShutting down SlimServer done
Slimserver binary=/usr/local/slimserver/slimserver.plStarting SlimServer 12322
done
JARDELL:/etc/init.d # Can't write to >>'|/usr/local/bin/multilog: No such file or directory at /usr/local/slimserver/slimserver.pl line 966.

what is multilog?

Robin Bowes
2005-08-10, 08:09
jarome wrote:
> The patch works, and I changed the configuration in /etc/slimserver. But
> what part of daemontools do I need, and how is that started
> automatically in /etc/init.d?

Jarome,

You just need the multilog program - no need to start anything explicitly.

R.

Robin Bowes
2005-08-10, 08:14
jarome wrote:
> JARDELL:/etc/init.d # rcslimserver restart
> Slimserver binary=/usr/local/slimserver/slimserver.plSlimserver
> binary=/usr/local/slimserver/slimserver.plShutting down SlimServer
> done
> Slimserver binary=/usr/local/slimserver/slimserver.plStarting
> SlimServer 12322
>
> done
> JARDELL:/etc/init.d # Can't write to >>'|/usr/local/bin/multilog: No
> such file or directory at /usr/local/slimserver/slimserver.pl line
> 966.
>
> what is multilog?

multilog is the program that manages logging.

Two possible issues here:

1. Do you have multilog in /usr/local/bin? I believe it installs to
/command and is symlinked to /usr/local/bin, so, either change
/usr/local/bin to /command or ln -s /command/multilog
/usr/local/bin/multilog

2. Which version of slimserver are you running? Try the following:

# grep multilog /usr/local/slimserver/slimserver.pl

You should see the following result:
# check for log file being pipe, e.g. multilog

Also, make sure you have created /var/log/slimserver and that the
directory is writeable by the slimserver user.

R.

kdf
2005-08-10, 08:51
On 10-Aug-05, at 4:37 AM, jarome wrote:

>
> It is hard to diagnose things because the log file does not have time
> stamps. Log files should have timestamps!
>
they do, when its debug info that slimserver controls. When it is
simply redirected SDOUT, you get just the text.

-kdf

kdf
2005-08-10, 08:53
> jarome wrote:
>
>
>> Any idea why I am crashing?
>>

well, the message looks a lot like one that was caused by some recent
playlist troubles. Files that don't actually exist, or cannot be found
would cause the Alarm to crash if they are referenced in a playlist.
The latest 6.1.2 nightly builds should have that one fixed, if I'm not
mistaken.

-kdf

Robin Bowes
2005-08-10, 09:18
kdf wrote:
>
> On 10-Aug-05, at 4:37 AM, jarome wrote:
>
>>
>> It is hard to diagnose things because the log file does not have time
>> stamps. Log files should have timestamps!
>>
> they do, when its debug info that slimserver controls. When it is
> simply redirected SDOUT, you get just the text.


Hmmm. That's new. Or at least, that's come in since I started using
multilog to add timestamps!

Having looked, I can see that some of my log entries show two timestamps!

R.

kdf
2005-08-10, 09:30
Quoting Robin Bowes <robin-lists (AT) robinbowes (DOT) com>:

> kdf wrote:
> >
> > On 10-Aug-05, at 4:37 AM, jarome wrote:
> >
> >>
> >> It is hard to diagnose things because the log file does not have time
> >> stamps. Log files should have timestamps!
> >>
> > they do, when its debug info that slimserver controls. When it is
> > simply redirected SDOUT, you get just the text.
>
>
> Hmmm. That's new. Or at least, that's come in since I started using
> multilog to add timestamps!
>
> Having looked, I can see that some of my log entries show two timestamps!

the d_xxxx logs have had timestamps since at least 5.0. However, the log output
of slimserver is also STDOUT, and STDERR, which is not easily redirected to add
timestamps in a platform independant way.

http://bugs.slimdevices.com/show_bug.cgi?id=442

-kdf

jarome
2005-08-10, 09:36
But the startup still complained. Does the user slimserver need /usr/local/bin in his path?

Hmmm. It is there
slimserver@JARDELL:/command> echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

So why doesn't slimserver like this?

Robin Bowes
2005-08-10, 11:56
jarome wrote:
> But the startup still complained. Does the user slimserver need
> /usr/local/bin in his path?
>
> Hmmm. It is there
> slimserver@JARDELL:/command> echo $PATH
> /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
>
> So why doesn't slimserver like this?

Have you checked that there is a multilog in /usr/local/bin?

R.

Robin Bowes
2005-08-10, 11:59
kdf wrote:
> Quoting Robin Bowes <robin-lists (AT) robinbowes (DOT) com>:
>
>
>>kdf wrote:
>>
>>>On 10-Aug-05, at 4:37 AM, jarome wrote:
>>>
>>>
>>>>It is hard to diagnose things because the log file does not have time
>>>>stamps. Log files should have timestamps!
>>>>
>>>
>>>they do, when its debug info that slimserver controls. When it is
>>>simply redirected SDOUT, you get just the text.
>>
>>
>>Hmmm. That's new. Or at least, that's come in since I started using
>>multilog to add timestamps!
>>
>>Having looked, I can see that some of my log entries show two timestamps!
>
>
> the d_xxxx logs have had timestamps since at least 5.0. However, the log output
> of slimserver is also STDOUT, and STDERR, which is not easily redirected to add
> timestamps in a platform independant way.
>
> http://bugs.slimdevices.com/show_bug.cgi?id=442
>
> -kdf

Did anybody try Marc Sherman's suggestion, i.e. re-directing
STDOUT/STDERR to a sub-routine that could add a timestamp?

R.

jarome
2005-08-10, 13:54
Yes it is linked to /usr/local/bin (via 2 links) and it runs. But slimserver apparently cannet run it or use it, or write to it.

But does anyone know why my server is crashing? Are any of the debug options useful? Which ones?

kdf
2005-08-10, 14:04
> But does anyone know why my server is crashing? Are any of the debug
> options useful? Which ones?

d_info d_parse d_scan
run from console instead of a startup script, so that you can see ALL output.
If you crash, the debug will give you an idea what song/playlist, etc.

However, given that your was alarm clock, I would try the latest 6.1.2 build.
There have been some fixes related to playlist items being lost and crashing on
the alarm clock module.

-kdf

jarome
2005-08-10, 14:16
That would be a good idea. I found 6.1.2. How do I upgrade without losing my settinmgs and database?

And it is really hard to find a check for updates button in the slimserver web page.....

kdf
2005-08-10, 14:56
Quoting jarome <jarome.1tkhnb (AT) no-mx (DOT) forums.slimdevices.com>:

>
> That would be a good idea. But the download page only shows 6.1.1. Where
> do I get 6.1.2?

http://www.slimdevices.com/downloads/nightly/latest/

>From the download page, there is a section at the bottom, highlighted in faint
yellow:

"NEW Interested in trying out the latest features and bug fixes? Click here to
download pre-release versions of SlimServer."

It contains a link that will take you to the same place as above, explaining teh
difference between the two current streams of pre-release builds.

-kdf

jarome
2005-08-11, 05:42
It stayed up all night

pmulcahy
2005-08-19, 02:16
I have reproduced a CPU runaway crash during rescanning.
Using d_info d_parse d_scan, it appears that it falls over after opening the first .wpl (windows playlist) file it encounters (having extracted the first song's file path from the playlist).

It then maxes out on CPU and becomes unresponsive on the web and squeezebox interfaces.

My "sucecssful" workaround is to rename all the wpl files using find /home/mulcahy/music -name *.wpl -exec mv {} {}.disabled \;

Details:
Suse 9.3 on x86_64
SlimServer 6.1 and also last night(2005-08-18)'s build of 6.1.2

I also know that these wpl files didn't cause any problems with SlimServer 6.0 and Suse 9.1

Is posting SlimServer debugging and/or strace output useful?

Dan Sully
2005-08-19, 08:46
* pmulcahy shaped the electrons to say...

>I also know that these wpl files didn't cause any problems with
>SlimServer 6.0 and Suse 9.1
>
>Is posting SlimServer debugging and/or strace output useful?

Posting output of --d_parse & the .wpl file itself would be helpful.

What version of SlimServer are you running?

-D
--
Welcome to hell. Here's your accordion.

Dan Sully
2005-08-19, 08:46
* Dan Sully shaped the electrons to say...

>What version of SlimServer are you running?

Just saw this in your email - not quite awake yet. :)

Could you try the latest 6.2 nightly?

-D
--
Welcome to hell. Here's your accordion.

jarome
2005-08-19, 11:49
When I changed to 6.1.2, it fixed the crash for me. The only playlists I use are for radio stations, one per playlist.

Is there some neat new stuff in 6.2??

kdf
2005-08-19, 11:56
Quoting jarome <jarome.1u0ypb (AT) no-mx (DOT) forums.slimdevices.com>:

>
> When I changed to 6.1.2, it fixed the crash for me. The only playlists I
> use are for radio stations, one per playlist.
>
> Is there some neat new stuff in 6.2??

the prefs file format is changed for one (and I believe will crash 6.1.2). check
the logs, or the windows event viewer for the crash message. --
NOT a Slim Devices employee