Bug 8180 - Squeezecenter prevents user logout after restart
: Squeezecenter prevents user logout after restart
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Platform Support
: 7.0
: PC Linux (other)
: P3 enhancement with 1 vote (vote)
: 7.8.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-16 18:36 UTC by steve edwards
Modified: 2012-05-11 10:28 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description steve edwards 2008-05-16 18:36:23 UTC
If a user restarts squeezecenter, they cannot log out.

If (using SecureCRT 3.2.1, Windows XP Home Edition Version 2002 Service Pack 2) I ssh into my CentOS 4.6 box and restart squeezecenter, I cannot log out because squeezecenter (and mysqld and mDNSResponderPosix) still have my pty open on stdin.

Redirecting stdin to /dev/null in /etc/init.d/squeezecenter, line 59 fixes the problem.
Comment 1 James Richardson 2008-05-19 13:56:18 UTC
Ross: Can you investigate this one
Comment 2 Ross Levine 2008-05-19 16:08:53 UTC
Strange this worked for me, I was able to logout without issue. Have you tried SqueezeCenter 7.0.1?
Comment 3 steve edwards 2008-05-20 22:10:43 UTC
I installed 7.0.1 -- no joy.

-fs::sedwards:~$ sudo lsof | grep squeeze | grep pts         
squeezece 15431 squeezecenter    0u      CHR      136,0            2 /dev/pts/0
mysqld    15434 squeezecenter    0u      CHR      136,0            2 /dev/pts/0
mDNSRespo 15468 squeezecenter    0u      CHR      136,0            2 /dev/pts/0

I cannot log out from my CentOS 4.6 server when I restart (/etc/init.d/squeezecenter restart) Squeezecenter.

If I redirect stdin to /dev/null, then I have no problem.
Comment 4 Chris Owens 2008-06-09 09:33:52 UTC
Michael Herger says he's seen this as well.

Fletch, the 'fix' in comment 1 seems like a hack.  Is there a better fix that we should do?  Thanks!
Comment 5 Mark Miksis 2008-06-09 10:11:42 UTC
Hmm.  I never noticed this before, but it is easily reproducible on my CentOS 5 system.  Interestingly, on Fedora 9, the pty is still open on stdin, but it doesn't prevent me from logging out.  I'm not really sure what the "right" fix is.  Maybe Andy or one of the other perl guys know of a way to prevent slimserver.pl from opening stdin in the first place.
Comment 6 Chris Owens 2008-06-13 09:46:12 UTC
Matt, is this something you could help with?
Comment 7 Mark Miksis 2008-06-13 13:31:55 UTC
If no one has a better idea, I'll make the </dev/null change for 7.1.  We can always change it later if/when something more elegant comes along...
Comment 8 Mark Miksis 2008-06-13 13:32:59 UTC
BTW, has anyone tested this on Debian/Ubuntu?
Comment 9 Ross Levine 2008-06-13 15:57:29 UTC
(In reply to comment #8)
> BTW, has anyone tested this on Debian/Ubuntu?

I have and I cannot reproduce, but I wasn't able to reproduce with CentOS either, and I just tried again on both and still unable. From a remote PC all we're doing is /etc/init.d/squeezecenter -stop as root then starting, then exit/logout, right? 
Comment 10 Mark Miksis 2008-06-18 08:43:57 UTC
I just tested the suggested fix from comment 1 and it doesn't work for me on CentOS 5.  Not sure why...
Comment 11 Mark Miksis 2008-06-20 09:46:27 UTC
Since we don't have a good fix for this yet, I've added a note to the SC RPM wiki page.
Comment 12 Ross Levine 2008-11-13 11:18:54 UTC
Until we can come up with a good fix, the workaround will have to suffice. 
Comment 13 Alan Young 2009-09-29 05:13:02 UTC
This is standard for many applications on Unix and Unix-like systems. Whether it should be is a different question.

The standard workaround is to restart the service using the nohup command. For example:

nohup /etc/init.d/squeezecenter restart &
Comment 14 Ross Levine 2009-10-02 16:45:27 UTC
Per Alan's comments this should be considered in the future.
Comment 15 Mikael Nyberg 2011-02-20 05:39:43 UTC
it's a bug not an enhancement ?

My system:

Version: 7.6.0 - r31915 @ Fri Feb 18 08:39:50 MST 2011
Hostname: hal.home.lan
IP: 192.168.1.5
HTTP Port: 9000
OS: Red Hat - EN - utf8
Platform: i686-linux
Perl Version: 5.8.8 - i686-linux-thread-multi
Database Version: DBD::SQLite 1.32_01 (sqlite 3.7.4)
Total Players Recognized: 3
Comment 16 Mikael Nyberg 2011-02-20 05:41:36 UTC
And restart command does not work due to another bug...
Comment 17 Michael Herger 2012-03-12 23:33:31 UTC
Will this issue be covered by bug 17729?
Comment 18 Michael Herger 2012-03-20 04:24:57 UTC
Fixed as a side effect of cleanup done in 17729. r33893
Comment 19 Mikael Nyberg 2012-05-11 10:28:42 UTC
..and this works for me too as I upgraded my OS never linux and never perl must have done some good .

FYI you may still have this problem if you run CC4.2 OS ,but as I was the only tes tcase for that and have scrapped that server so I can't test anymore.