Bug 1876 - Out of memory crash on first run after upgrade
: Out of memory crash on first run after upgrade
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 6.1.1
: Macintosh MacOS X 10.4
: P2 major with 1 vote (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-25 14:42 UTC by Mike Riccio
Modified: 2009-09-08 09:19 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
the entire log (531.79 KB, application/octet-stream)
2005-07-29 11:11 UTC, Rod
Details
M3u directory (191.69 KB, application/octet-stream)
2005-07-29 11:28 UTC, Rod
Details
The Playlist Causing the Error (16.32 KB, text/plain)
2005-08-02 19:15 UTC, Jake Hawkes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Riccio 2005-07-25 14:42:19 UTC
Slimserver crashed shortly after I launched it from the preference pane.  This 
happened the first time it was run after upgrading to 6.1.2.  It also happened 
when upgrading the previous time to 6.1.1 beta.

Here is the log file:

2005-07-24 17:02:41.5056 Got sigterm.
2005-07-24 17:02:41.5121 SlimServer cleaning up.
2005-07-24 17:02:41.8756 Got to the END.
2005-07-24 17:02:41.8757 Got sigint.
2005-07-24 17:02:41.8757 SlimServer cleaning up.
2005-07-24 17:03:07.5627 SlimServer OSDetect init...
2005-07-24 17:03:07.5629 SlimServer OS Specific init...
2005-07-24 17:03:07.5634 SlimServer settings init...
2005-07-24 17:03:07.6888 SlimServer strings init...
2005-07-24 17:03:07.8617 SlimServer Setup init...
2005-07-24 17:03:07.8693 SlimServer setting language...
2005-07-24 17:03:07.8697 SlimServer IR init...
2005-07-24 17:03:07.8855 SlimServer Buttons init...
2005-07-24 17:03:07.8867 SlimServer Graphics init...
2005-07-24 17:03:12.1984 SlimServer starting up...
2005-07-24 17:03:12.1985 SlimServer daemonizing...
2005-07-24 17:03:12.2141 SlimServer saving pid file.
2005-07-24 17:03:12.2161 Got to the END.
2005-07-24 17:03:12.2164 Got sigint.
2005-07-24 17:03:12.2166 SlimServer cleaning up.
2005-07-24 17:03:12.2181 SlimServer settings effective user and group if 
requested...
2005-07-24 17:03:12.2190 Old SLIMP3 Protocol init...
2005-07-24 17:03:12.4586 Slimproto Init...
2005-07-24 17:03:12.4643 mDNS init...
2005-07-24 17:03:12.4665 SlimServer HTTP init...
2005-07-24 17:03:12.4868 SlimServer CLI init...
2005-07-24 17:03:12.4886 mDNS startAdvertising...
2005-07-24 17:03:12.4896 Source conversion init..
2005-07-24 17:03:12.4922 SlimServer Info init...
2005-07-24 17:03:20.3947 SlimServer MusicFolderScan init...
2005-07-24 17:03:20.3953 SlimServer PlaylistFolderScan init...
2005-07-24 17:03:20.3955 SlimServer Plugins init...
2005-07-24 17:03:23.0519 SlimServer persist playlists...
2005-07-24 17:03:23.0526 SlimServer done start...
opendir failed: /Volumes/Data/.Spotlight-V100: Permission denied
Warning: 'ParserOpts' is deprecated, contact the author if you need it 
at /Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Formats/Par
se.pm line 741
Warning: 'ParserOpts' is deprecated, contact the author if you need it 
at /Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Formats/Par
se.pm line 741
Warning: 'ParserOpts' is deprecated, contact the author if you need it 
at /Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Formats/Par
se.pm line 741
Warning: 'ParserOpts' is deprecated, contact the author if you need it 
at /Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Formats/Par
se.pm line 741
r(7562) malloc: *** vm_allocate(size=386142208) failed (error code=3)
r(7562) malloc: *** error: can't allocate region
r(7562) malloc: *** set a breakpoint in szone_error to debug
Out of memory!
2005-07-24 17:17:22.3267 Got to the END.
2005-07-24 17:17:22.3628 Got sigint.
2005-07-24 17:17:22.3629 SlimServer cleaning up.
Comment 1 Mike Riccio 2005-07-25 15:03:28 UTC
I meant to say upgrading to 6.1.1 and 6.1.1 beta.

Note that after the first failed launch, subsequent launches work fine.

I have tons of free RAM as well.
Comment 2 KDF 2005-07-25 16:02:51 UTC
also mentioned in this thread:

http://forums.slimdevices.com/showthread.php?t=15053&highlight=ParserOpts

please supply more details if possible; perhaps a sample file involved in the
problem if you can locate one.

Comment 3 Mike Riccio 2005-07-25 16:26:53 UTC
I use iTunes integration exclusively.  What file would you like me to provide?
Comment 4 KDF 2005-07-25 18:01:54 UTC
look at the d_info log, see if you can track it down to a particular track, and
include that track as well as that section of the log.  That thread I linked to
seems to indicated it was related to particular tracks.
Comment 5 Blackketter Dean 2005-07-27 13:27:57 UTC
Let's figure out what's going on here for 6.1.2, please post the log with d_info turned on.
Comment 6 Rod 2005-07-29 06:55:44 UTC
Problem exists on Linux also
Comment 7 Rod 2005-07-29 07:10:26 UTC
2005-07-29 10:04:07.9888 Converting
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
to /home/shared/mp3/Vince Guaraldi Trio/A Charlie Brown Christmas/08 Hark, The
Herald Angels Sing.mp3
2005-07-29 10:04:07.9895 mp3 file type for
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
2005-07-29 10:04:07.9899 reading tags for:
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
2005-07-29 10:04:08.0196 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: TAG to 1
2005-07-29 10:04:08.0201 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: BLOCKALIGN to 1
2005-07-29 10:04:08.0206 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: TITLESORT to HARK THE HERALD ANGELS SING
2005-07-29 10:04:08.0211 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: TRACKNUM to 8
2005-07-29 10:04:08.0216 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: TITLE to Hark, The Herald Angels Sing
2005-07-29 10:04:08.0221 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: SIZE to 2770063
2005-07-29 10:04:08.0225 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: OFFSET to 2674
2005-07-29 10:04:08.0230 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: YEAR to 1965
2005-07-29 10:04:08.0235 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: FS to 2773116
2005-07-29 10:04:08.0240 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: SECS to 115.435083333333
2005-07-29 10:04:08.0245 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: CT to mp3
2005-07-29 10:04:08.0250 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: TAGVERSION to ID3v2.3.0
2005-07-29 10:04:08.0255 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: AGE to 1040365220
2005-07-29 10:04:08.0259 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/08%20Hark,%20The%20Herald%20Angels%20Sing.mp3
: BITRATE to 192000
2005-07-29 10:04:08.0715 New track for
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
2005-07-29 10:04:08.0720 readTag was 1 for
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
2005-07-29 10:04:08.0733 Converting
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
to /home/shared/mp3/Vince Guaraldi Trio/A Charlie Brown Christmas/09 Christmas
is Coming.mp3
2005-07-29 10:04:08.0742 mp3 file type for
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
2005-07-29 10:04:08.0747 reading tags for:
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
2005-07-29 10:04:08.1130 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: TAG to 1
2005-07-29 10:04:08.1135 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: BLOCKALIGN to 1
2005-07-29 10:04:08.1140 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: TITLESORT to CHRISTMAS IS COMING
2005-07-29 10:04:08.1145 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: TRACKNUM to 9
2005-07-29 10:04:08.1150 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: TITLE to Christmas is Coming
2005-07-29 10:04:08.1155 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: SIZE to 4933381
2005-07-29 10:04:08.1159 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: OFFSET to 2674
2005-07-29 10:04:08.1164 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: YEAR to 1965
2005-07-29 10:04:08.1170 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: FS to 4936682
2005-07-29 10:04:08.1175 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: SECS to 205.583666666667
2005-07-29 10:04:08.1179 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: CT to mp3
2005-07-29 10:04:08.1184 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: TAGVERSION to ID3v2.3.0
2005-07-29 10:04:08.1189 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: AGE to 1040365221
2005-07-29 10:04:08.1194 Adding
file:///home/shared/mp3/Vince%20Guaraldi%20Trio/A%20Charlie%20Brown%20Christmas/09%20Christmas%20is%20Coming.mp3
: BITRATE to 192000
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
utf8 "\xFC" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN29> line 309.
Comment 8 Rod 2005-07-29 07:15:51 UTC
So I started with --d_info.  The server started and was around 36m resident size.

Then I forced a rescan via the web.  It scanned many files and for a few minutes
it was growing slightly (reached 40m or so).  So it was at 38m +/- 10% for a few
minutes.

Simultaneous with the start of the Unicode error, resident started to crank from
40 to 60 to 120 to 140 ...  

I killed slimserver within 30 seconds of hitting the leak, but it iterated an
enormous number of times in those few seconds:

$ grep Unicode slimserver.log.txt | wc -l
  249986

Comment 9 Rod 2005-07-29 07:20:51 UTC
FYI I think that the problem is that the new scanning code can't handle an
umlaut in the filename.  

It went through new track > all the tags (through bitrate) for this file:

09 Christmas is Coming.mp3

And the Unicode errors started to spin right before where you'd expect it to say
"new track" for this file:

10 Fu&#776;r Elise.mp3

(that has the umlaut over the u in the filename, not next to it)
Comment 10 Blackketter Dean 2005-07-29 07:24:31 UTC
Ok, there's something about that file that's making it confused.  

Can you attach that file to the bug or otherwise get it to Dan@slimdevices.com?
Comment 11 Rod 2005-07-29 07:34:47 UTC
emailing the file
Comment 12 Dan Sully 2005-07-29 10:15:05 UTC
Rod - what is your LC_CTYPE environment variable set to?
Comment 13 Rod 2005-07-29 10:46:24 UTC
It is not set.

$ printenv | egrep '(LC_*|LANG)'
LANG=en_US.UTF-8

Comment 14 Dan Sully 2005-07-29 10:47:49 UTC
Can you please set LC_CTYPE to en_US.UTF-8 as well?

I'm unable to reproduce this on my Debian box using either the 6.1 branch or 6.2
Comment 15 Rod 2005-07-29 11:11:41 UTC
Created attachment 682 [details]
the entire log
Comment 16 Rod 2005-07-29 11:12:36 UTC
[slimserver@piano src]$ echo $LC_CTYPE
en_US.UTF-8
[slimserver@piano src]$ /usr/local/slimserver/slimserver.pl --d_info --daemon
--prefsfile=/etc/slimserver.conf --logfile=/tmp/slimserver.log 


same problem, same place.

My box is Fedora core 4.  The file is on an ext3 filesystem.

log attached above
Comment 17 Dan Sully 2005-07-29 11:21:12 UTC
Rod - can you tar up your playlist directory?

Also - what version of the server are you using?

Thanks.
Comment 18 Rod 2005-07-29 11:28:28 UTC
Created attachment 684 [details]
M3u directory
Comment 19 Rod 2005-07-29 11:29:46 UTC
I am running 

slimserver-6.1.1-1.noarch.rpm


I can downgrade to slimserver-6.0.2-1.noarch.rpm and it works fine.

-rod
Comment 20 Dan Sully 2005-07-29 14:00:39 UTC
I can't see anything unusual about those playlists - and I don't get the repeated / crash.

I'm wondering if it has something specific to do with FC4

Can you try a 6.2 nightly? There's been some work in this area of the code already since 6.1.1

Thanks.
Comment 21 Dan Sully 2005-07-29 15:58:54 UTC
I've checked in a few changes which might fix this.

If you are using Subversion, please sync your tree.

Otherwise, they'll be in the 07-30-2005 nightly build.

You'll want to wipe your db and rescan.

Thanks.
Comment 22 Jake Hawkes 2005-08-02 19:13:38 UTC
I have the same problem.

I first encountered with 6.1.1, then after reading this bug log, got the
2005-08-02 nightly.

I dont get a crash, but slimserver.pl spirals out of control and consumes around
900 meg of resident memory before I kill it.

the excerpt from the log (--d_server --d_scan) that I think is relevent is this:

===========================
2005-08-02 20:06:15.3167 itempath:
file:///home/jake/playlists/Lisa%27s%20Christmas%20Playlist.m3u and
file:///home/jake/playlists made file:///home/jake/playlis
ts/Lisa%27s%20Christmas%20Playlist.m3u
2005-08-02 20:06:15.3191
isList(file:///home/jake/playlists/Lisa%27s%20Christmas%20Playlist.m3u) == m3u
2005-08-02 20:06:15.3199 numitems: 0
2005-08-02 20:06:15.3201 index: -1
2005-08-02 20:06:15.3203 Scan::readList gonna read
file:///home/jake/playlists/Lisa%27s%20Christmas%20Playlist.m3u
2005-08-02 20:06:15.3207 Gonna try to open playlist
file:///home/jake/playlists/Lisa%27s%20Christmas%20Playlist.m3u
2005-08-02 20:06:15.3265 gonna scan
file:///home/jake/playlists/Lisa%27s%20Christmas%20Playlist.m3u, with path
file:///home/jake/playlists/Lisa%27s%20Christmas%2
0Playlist.m3u, for base: file:///home/jake/playlists
2005-08-02 20:06:15.3267 Scan::readList loading
file:///home/jake/playlists/Lisa%27s%20Christmas%20Playlist.m3u with base
file:///home/jake/playlists
utf8 "\xFA" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 144, <GEN9> line 61.
======================================

and I will attach the playlist for your reference.
Comment 23 Jake Hawkes 2005-08-02 19:15:16 UTC
Created attachment 692 [details]
The Playlist Causing the Error

When the server scans this file, it endlessly repeats this error:
utf8 "\xFA" does not map to Unicode at
/usr/local/slimserver/Slim/Formats/Parse.pm line 153, <GEN9> line 82.
Comment 24 Dan Sully 2005-08-02 19:40:56 UTC
Jake - what is your LC_CTYPE environment variable set to?
Comment 25 Jake Hawkes 2005-08-02 22:39:20 UTC
My LC_TYPE variabe is not set.
Comment 26 Dan Sully 2005-08-08 23:01:43 UTC
Can you give the 6.2 beta a try? This should be fixed there.
Comment 27 Rod 2005-08-09 07:58:58 UTC
This morning's nightly build seems to have fixed the problem.

The process seems to still have a leak in the scanning algorithm.  Starting
without a scan (like the second time) the process has 37m resident.  However
during a scan it creeps to 70+m and stays there.

This is not an issue with my system, but it may cause problems on smaller systems.

Comment 28 Blackketter Dean 2005-08-09 08:11:43 UTC
Thanks.  If you believe there's a leak, can you file a new bug with the details (library size, platform, 
etc...)