Bugzilla – Bug 9007
Issues with /etc/init.d/squeezecenter for Redhat based releases
Last modified: 2009-07-31 10:26:25 UTC
Issues seen on ClarkConnect 4.2 Problems seen with /etc/init.d/squeezecenter as follows (only for Redhat) 1 - Logic Wrong for condrestart condrestart() { [ -f $LOCKFILE ] && restart || : } But this should be: condrestart() { [ ! -f $LOCKFILE ] && restart || : } This is causing issues with logrotate killing Squeezecenter processes (due to incorrect logic in point 1) -------------- 2 - restart does not wait for processes to stop before starting again. Result is a failed restart. Increasing the sleep in line 89 of /etc/init.d/squeezecenter from 2 to 10 resolves the issue. Discussion on forum at following link: http://forums.slimdevices.com/showthread.php?t=50605
Someone from SD, please assign this to me. (In reply to comment #0) > Problems seen with /etc/init.d/squeezecenter as follows (only for Redhat) > > 1 - Logic Wrong for condrestart > > condrestart() { > [ -f $LOCKFILE ] && restart || : > } > > But this should be: > > condrestart() { > [ ! -f $LOCKFILE ] && restart || : > } Why do you think this? The point of this section is to check if SC is already running and only restart if it already is. I think this works as expected. > 2 - restart does not wait for processes to stop before starting again. Result > is a failed restart. > > Increasing the sleep in line 89 of /etc/init.d/squeezecenter from 2 to 10 > resolves the issue. I'll do some testing with different values on different RPM based distros. Are you running on real hardware or a VM?
(In reply to comment #1) > Someone from SD, please assign this to me. > > (In reply to comment #0) > > Problems seen with /etc/init.d/squeezecenter as follows (only for Redhat) > > > > 1 - Logic Wrong for condrestart > > > > condrestart() { > > [ -f $LOCKFILE ] && restart || : > > } > > > > But this should be: > > > > condrestart() { > > [ ! -f $LOCKFILE ] && restart || : > > } > > Why do you think this? The point of this section is to check if SC is already > running and only restart if it already is. I think this works as expected. OK - to be fair this was based on dem's comments on the forum. If there is a need to restart every time the logs rotate then fair enough (assuming the fix for the restart is in place). > > > 2 - restart does not wait for processes to stop before starting again. Result > > is a failed restart. > > > > Increasing the sleep in line 89 of /etc/init.d/squeezecenter from 2 to 10 > > resolves the issue. > > I'll do some testing with different values on different RPM based distros. Are > you running on real hardware or a VM? > My testing is on a physical server (Pentium D 3.0 Ghz, 2GB RAM). I picked 10 seconds as a first stab - its not necessarily the minimum for my PC (will do some more testing on this if I get chance).
Ping Fletch, what's the plan here for 7.2?
(In reply to comment #3) > Ping Fletch, what's the plan here for 7.2? > I won't have time to test it for another day or so, but it should be trivial. Hopefully that's soon enough to still go into 7.2. My assumption is that something in 7.1 causes SC to shutdown a bit slower than 7.0. Since my suggestion to the bug reporter about changing "sleep 2" works, I'm pretty sure I'm right. (I can't really remember how I came up with 2 as the right delay in the first place.) Anyway, I can't reproduce this on my main CentOS 5 server running 7.2, but it's a pretty fast machine. I'd like to do a few tests on VMWare running various RPM based distros before committing the fix.
I can't reproduce this on CC, CentOS or Fedora. Andy Brown, what's the smallest sleep value that works reliably for you?
(In reply to comment #5) > I can't reproduce this on CC, CentOS or Fedora. Andy Brown, what's the > smallest sleep value that works reliably for you? > Ok - Have tested this now....the smallest sleep value that works reliably for me is 4.
Changed to sleep 5 in change 22418 in 7.2/trunk.
> Why do you think this? The point of this section is to check if SC is already > running and only restart if it already is. I think this works as expected. OK, I was assuming the opposite (restart it only if stopped) since this was causing my SC to be restarted every night.
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Reduce number of active targets for SC