Bug 12222 - Watchdog min-memory check is broken
: Watchdog min-memory check is broken
Status: CLOSED FIXED
Product: SqueezePlay
Classification: Unclassified
Component: Diagnostics
: unspecified
: PC Other
: -- critical (vote)
: 7.4.0
Assigned To: Richard Titmuss
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-31 20:16 UTC by Jacob Potter
Modified: 2009-10-05 14:37 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Potter 2009-05-31 20:16:22 UTC
I've been getting a lot of seemingly spurious crashes when starting TinySC, and after investigating the logs, they appear to be caused by watchdog detecting an out-of-memory condition when the system isn't actually out of memory.

From looking at the watchdog source, it appears to calculate the amount of free RAM by adding the MemFree and SwapFree lines in /proc/meminfo. The problem is that cached filesystem data isn't reported as "free" by Linux; MemFree refers to the amount of memory that isn't used _at all_. So after a small amount of scanning, Linux naturally fills up its cache, and the watchdog triggers a reboot.

I'm not sure a watchdog reboot on out-of-memory is necessary in the first place. If the device actually runs out of RAM, Linux will OOM-kill a process; most likely it'll be SC or SqueezePlay, and SqueezePlay dying will trigger a reboot itself. In any case, watchdog's algorithm is just wrong.

Changing "min-memory = 1280" to "min-memory = 0" in /etc/watchdog.conf (I think the source in SVN is meta-squeezeos/packages/base-files/files/watchdog.conf) fixes the issue.
Comment 1 Blackketter Dean 2009-07-22 09:17:59 UTC
Moving to the product SqueezePlay because this bug appears to apply to any player based on that application code.  Feel free to move it back if it's specific to the single original product.
Comment 2 Richard Titmuss 2009-07-27 07:32:20 UTC
Min memory check is disabled.
Comment 3 James Richardson 2009-10-05 14:37:16 UTC
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server!
    * SqueezeCenter: 28672
    * Squeezebox 2 and 3: 130
    * Transporter: 80
    * Receiver: 65
    * Boom: 50
    * Controller: 7790
    * Radio: 7790  

Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.