Bug 11155 - Severe memory leak in Linux build
: Severe memory leak in Linux build
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Streaming From SlimServer
: 7.4.0
: PC RedHat Linux
: P1 major (vote)
: 8.0.0
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-22 07:30 UTC by Mikael Nyberg
Modified: 2011-04-08 08:34 UTC (History)
5 users (show)

See Also:
Category: ---


Attachments
log from my server (1.92 KB, application/zip)
2009-02-23 00:10 UTC, Mikael Nyberg
Details
another crash log from my server (124.89 KB, application/octet-stream)
2009-09-07 08:31 UTC, Mikael Nyberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Nyberg 2009-02-22 07:30:35 UTC
http://forums.slimdevices.com/showthread.php?p=399390#post399390

and

http://forums.slimdevices.com/showthread.php?t=60132

where I attached a log problem started with version 7.4 25015
Comment 1 Mark Miksis 2009-02-22 10:09:17 UTC
As I mentioned in that 2nd thread, I'm seeing something since 25015 that may or may not be the same issue.  After hours of usage, SC will slow down and eventually hang.  The only debugging I've done is to look at top right after a restart and again when SC hangs and memory usage has not gone up so it may not be the same issue.  Although SC hangs, I have always been able to get into a shell and kill it.

I only use 3 3rd paty plugins and nothing has changed with any of them at the time the problem started.
Comment 2 Mikael Nyberg 2009-02-23 00:10:05 UTC
Created attachment 4841 [details]
log from my server

More info for you, as stated in the forum tread I had to play music for this to happen.
I use the free-m command and can se memory being sucked up while playing music.
If i stop the music the memory leak is stopped, it starts again as soon as i continue the play. the memory gets "free" when i kill the squeezecenter service.

Some system specs:



Version: 7.4 - 25118 @ Sun Feb 22 01:01:13 PST 2009

Hostname: hal.home.lan
Server IP Address: 192.168.1.5
Server HTTP Port Number: 9000
Operating system: Red Hat - EN - utf8
Platform Architecture: i686-linux
Perl Version: 5.8.8 - i686-linux-thread-multi
MySQL Version: 4.1.20
Total Players Recognized: 3

Library Statistics
Total Tracks: 17,626
Total Albums: 1,385
Total Artists: 712
Total Genres: 140
Total Playing Time: 1392:26:13
Comment 3 Mikael Nyberg 2009-02-23 00:12:16 UTC
Oh and the machine is a home built ClarkConnect 4.2 Linux server based on an via epia mother board.
Comment 4 Chris Owens 2009-02-23 09:14:26 UTC
Michael notes he's running a linux system and playing music from it and has not seen this symptom.  We'll keep an eye on the forum threads for additional info to reproduce it.
Comment 5 Mikael Nyberg 2009-02-23 09:38:44 UTC
Ok now I'm on 25127. Is there some logging I can turn on to catch this if it happens again.

I posted only the messages log from server as SC own log was showing nothing, also examined mysql log, nothing.

the scanner log had only one line from 25015 that it had started a scan, esentially nothing.
So any hint on what to on would be appreciated.
Comment 6 Caleb Crome 2009-07-25 11:13:27 UTC
Yep, I'm using 4.7 r27807 on Mac OSX.  And yes, it's a SEVERE memory problem.  I'm at 3.7GB virtual memory, 1.5 Real.    This is a showstopper.

I just installed r27807 in the hopes that Bug 12682.  However, this problem is even worse than that one :-)

macmini-5:Squeezebox crome$ ps uxww|grep perl
crome 40671   0.4 76.9  3358144 1611792   ??  Ss    9:58AM  24:45.71 /usr/bin/perl ./slimserver.pl
crome 41498   0.3  0.0   590472     96 s001  R+   10:58AM   0:00.00 grep perl
macmini-5:Squeezebox crome$ 

I have a large (100k track) collection on a USB drive, connected to a macmini.

The scanner seems to have gotten through about 10k tracks, then the tail of the server.log has several lines that say

[09-07-25 10:51:32.3187] Slim::Utils::Misc::msg (1160) Warning: [10:51:32.3185] Deep recursion on anonymous subroutine at /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/Slim/Control/Queries.pm line 4506.

I suspect 'deep recursion' can't be good.
Comment 7 Caleb Crome 2009-07-25 11:14:10 UTC
Ross, I assigned to Andy so it appears on his 'my bugs' search :-)  If this is a problem, let me know.
Comment 8 Caleb Crome 2009-07-25 11:16:32 UTC
Now that I look more carefully, perhaps this is a separate bug.  The log files don't seem similar.  but the title is still apt.
Comment 9 Andy Grundman 2009-07-25 11:46:01 UTC
When does the problem occur?  How easy is it to reproduce?
Comment 10 Andy Grundman 2009-07-29 14:59:00 UTC
Moving 7.4 bugs to 8.0.
Comment 11 Mikael Nyberg 2009-08-21 22:02:30 UTC
(In reply to comment #9)
> When does the problem occur?  How easy is it to reproduce?

This was probably a one in a million thing.
It has never really happened again, so for me you can close this bug.

However if you want a way to really lock the system and hog all resources i recommend this:
On an almost empty dB do a "scan for new and changed" instead of "clear and rescan" i did that by mistake once it freeze everything after a while.
The server took 5 minutes to respond to a press on the power button ( acpid )
to turn it off.

My dB only had 10 album's so new and changed was adding the other 1493 albums
Not proper procedure but easy mistake to do.
Comment 12 Joerg Schwieder 2009-09-01 01:56:35 UTC
I've seen this recently on ubuntu when updating to r28379
I also suspect that I've seen this before on OSX 10.5.7 (where I see SC hanging after a while of use from time to time and symptoms are of a memory leak) and on a new install on OSX 10.6 last week.
Comment 13 Michael Herger 2009-09-06 23:40:20 UTC
http://forums.slimdevices.com/showthread.php?t=67559 has another messages file which says mysqld was running out of memory
Comment 14 Joerg Schwieder 2009-09-07 01:40:11 UTC
I can't say for sure, but I FEEL like I always got this after upgrading the server. Can't remember ever seeing this on a system that has been running for a long time as it is.
Comment 15 Mikael Nyberg 2009-09-07 08:31:21 UTC
Created attachment 5791 [details]
another crash log from my server

MY latest crash:
97% memory 60% swap.
Not cached all used by app and kernel according to my servers web-UI

The crash happend when I played music synced with two players and started my controller, exactly when my controller got on-line the server crashed.

music went quiet displays frooze, this was i nice crash, usually when this happens i can not ssh or use my servers web-UI, barely use the power button acpi can be delayed 5 minutes. It takes 5 minutes for it to react when I push the off button.
Comment 16 Mikael Nyberg 2009-09-07 08:33:53 UTC
Forgot to tell my log shows that mysql gets killed then squeezeboxserver, so both mysql AND squeezeboxserver uses up all memory  in some weird sequence ?
Comment 17 Alan Young 2009-09-29 04:37:32 UTC
Downgrading to major as this is clearly not a blocker.
Comment 18 Joerg Schwieder 2009-09-29 04:47:30 UTC
Hm, but then, crashing machines (NAS, servers) that are only remotely accessible for a lot of people obviously should be more than just "major", shouldn't it?
For application in any "serious" environment or for non-experts this is indeed a blocker, I believe, especially since it's not only happening on Linux but at least _I_ mainly saw it on my Mac.
Comment 19 Alan Young 2011-04-08 00:16:21 UTC
Is this thill an issue?
Comment 20 Mikael Nyberg 2011-04-08 07:54:57 UTC
I don't see this anymoore , I can no longer reproduce this