Bug 17440 - SBS can not be stopped and it always runs as "perl" not squeezeboxserver
: SBS can not be stopped and it always runs as "perl" not squeezeboxserver
Status: RESOLVED DUPLICATE of bug 17729
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.6.0
: PC RedHat Linux
: P1 normal with 3 votes (vote)
: 7.6.1
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-13 01:41 UTC by Mikael Nyberg
Modified: 2012-03-20 04:14 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Nyberg 2011-08-13 01:41:17 UTC
As discussed in http://forums.slimdevices.com/showthread.php?t=89497

The SBS server can not be stopped on rpm installed platforms .

"service squeezeboxserver stop" does nothing usefull

[root@hal ~]# service squeezeboxserver stop
/sbin/service: line 68:  6433 Terminated              env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
[root@hal ~]# 

And it always runs as "perl" instead of squeezeboxserver as it should do .

This change have been introduced very recently .

Fyi. If I do a server restart via the web-UI the squeezeboxserver process has always been replaced by an perl process.

I have not updated or installed any new plugin , so I have not yet investigated if restart from web-UI also is broken, but given the nature of things you may safely assume that it is.

This seems related to the 2 year old bug where the "service squeezeboxserver restart" command is broken this is however easily worked around by using stop followed by start.

Would just killing the process introduce corruption somewher if done frequently (as in every time i install nighlies to test )
Comment 1 Adrian Smith 2011-08-13 02:24:03 UTC
This is a side effect of changing the shebang from #!/usr/bin/perl
Comment 2 Mikael Nyberg 2011-08-13 02:51:49 UTC
Still trying to find the rigth file on my server.

slimserver should be squeezeboxserver on RedHat .

But not with an *.pm extension so it' one of these ?

# find / -name squeezeboxserver*
/etc/sysconfig/squeezeboxserver
/etc/rc.d/init.d/squeezeboxserver
/etc/logrotate.d/squeezeboxserver
/etc/squeezeboxserver
/var/lib/squeezeboxserver
/var/lib/squeezeboxserver/cache/templates/usr/share/squeezeboxserver
/var/lib/squeezeboxserver/cache/templates/var/lib/squeezeboxserver
/var/lock/subsys/squeezeboxserver
/var/log/squeezeboxserver
/usr/share/doc/squeezeboxserver-7.6.1
/usr/share/squeezeboxserver
/usr/sbin/squeezeboxserver-cleanup
/usr/libexec/squeezeboxserver-scanner
/usr/libexec/squeezeboxserver 

I would try Adrians fix asap i can figure how .

But why such a random change is it a typo or does it serves some purpose ?
Comment 3 Mikael Nyberg 2011-08-13 03:47:40 UTC
/usr/libexec/squeezeboxserver

was the file i had to edit

chaning the first line back to #!/usr/bin/perl from #!/usr/bin/env perl

Solved the issue .

Can this change be patched into the 7.6.1 beta, is there a problem doing so ?
Comment 4 Mikael Nyberg 2011-08-13 06:25:29 UTC
It was broken here:

http://svn.slimdevices.com/slim/7.6/trunk/server/slimserver.pl?revision=32967&view=markup

In rev 32967
Comment 5 Charles Razzell 2011-08-13 08:05:11 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 Charles Razzell 2011-08-13 08:43:49 UTC
The changes in revision 32967 need to be reversed. "let's use /usr/bin/env perl, it's more portable," is a bit too casual given the consequences are:
1) Whichever perl executable is first in the user's path with now be invoked. This may not be the official system perl, but could be any perl the user is interested in, e.g. he is experimenting with perl 6.
2) The script now returns the PID of the env program and not the perl program, rendering start, stop and status scripts (on most Linux systems) useless.
3) It's arguably a security issue, when you effectively say, "give me a perl, any perl you might happen to have in your path."

Also, you will get a lot of support requests from this with almost no benefit. It will harm many more users than it helps.
Comment 7 SVN Bot 2011-08-14 16:33:46 UTC
 == Auto-comment from SVN commit #33075 to the slim repo by agrundman ==
 == http://svn.slimdevices.com/slim?view=revision&revision=33075 ==

Fixed bug 17440, I guess /usr/bin/env perl was not such a good idea after all
Comment 8 Mikael Nyberg 2011-09-19 08:30:47 UTC
This is still broken but in a more subtle fashion .

if SBS is restarted from the web-UI it migth run as "perl" not "squeezeboxserver" and then the stop comand won't work .
it migth even be that a second restart from the web-UI won't work ?
You get prompted to restart after plugin updates, this migth not happen that often and consequntly you have rebooted the machine anyway.

normal start and stop works ( but not restart, another bug ) fine a before.

7.6.2 33449
Comment 9 Michael Herger 2012-03-20 03:24:47 UTC
would this be a dupe of bug 17729?
Comment 10 Michael Herger 2012-03-20 04:14:07 UTC

*** This bug has been marked as a duplicate of bug 17729 ***