Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59635 - timidity shutdown script causes error such as: Error: Can't kill process: no such pid <pid number>
Summary: timidity shutdown script causes error such as: Error: Can't kill process: no ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
: 59229 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-06 14:56 UTC by Carter
Modified: 2004-09-16 01:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to /etc/init.d/timidity to shutdown cleanly (timidity.patch,30 bytes, patch)
2004-09-08 07:16 UTC, Anno v. Heimburg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carter 2004-08-06 14:56:14 UTC
I had originally reported this as Bug 59229 to the Baselayout developers.  After filing this bug, I will mark Bug 59229 as a duplicate.  I would like this bug passed on to the maintainer of Timidity, and to whomever writes it's init scripts.  This Error occurs at every shutdown(INIT LEVEL 0).  I believe the cause to be as follows:
the program probably exited after it collected the pid, but before it killed it
Thanks to Ashitaka from the Gentoo IRC channel.  Also after further research, I believe this error is caused by the Startup init script supplied with timidity not providing enough of an error trap.  

Reproducible: Always
Steps to Reproduce:
1.Issue shutdown -h now command in a non bootsplashed system.
2.Watch console during shutdown

Actual Results:  
Errors appeared on console as the shutdown script was running

Expected Results:  
the shutdown script should run w/o producing errors

the programs i have emerged that cause the erroror are Timidity++ and nas.  If 
needed I will post my emerge info
Comment 1 Carter 2004-08-06 14:58:26 UTC
*** Bug 59229 has been marked as a duplicate of this bug. ***
Comment 2 Carter 2004-08-18 20:12:22 UTC
See http://forums.gentoo.org/viewtopic.php?t=206862&highlight= to see the troubleshooting procedures I've used thus far.  Any comments would be greatly appreciated
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-08-29 03:27:15 UTC
it works fine for me... can you please try to find the cause and suggest a fix?  Thanks.
Comment 4 Carter 2004-08-29 15:37:40 UTC
That's nice that it works for the person in Comment #3, but I reported it as a bug because it doesn't work for some people.  Check the post noted in Comment #2, and you'll see what I mean.  I can't post a fix because I don't have one.
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2004-08-29 18:57:56 UTC
Right, but I'm saying that I can't reproduce it, so please either figure out how to reproduce it or provide us with a fix... If I can't tell what's broken, I can't fix it.
Comment 6 Carter 2004-08-29 21:58:26 UTC
I believe that the startup script for timidity /etc/init.d/timidity is being prematurely killed at bootup, but no error is reported at bootup, because the error trapping code does not contain logic to trap something like an unknown error... If you or me can rewrite the startup script I think that would be a start 
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2004-08-29 23:54:29 UTC
        start-stop-daemon --start --quiet --background \
                --make-pidfile --pidfile /var/run/timidity.pid \
                --exec /usr/bin/timidity -- -iA ${TIMIDITY_OPTS}
        eend $?

So if the timidity process exits with an error exit code, it will cause the script to exit with an error...
Comment 8 Anno v. Heimburg 2004-09-08 07:16:21 UTC
Created attachment 39202 [details, diff]
Patch to /etc/init.d/timidity to shutdown cleanly

Okay, this fixed it for me:

The problem seems to be that alsa ist stopped before timidity. When timidity is
then stopped, an error occured. I modified my /etc/init.d/timtidity to read:
...
depend() {
	use alsasound esound
	after alsasound esound
}
...

Then, use rc-update to remove and add timidity in order to refresh the
dependency info.

The new line is the "after" line. Apparently, the "use" line will make timidity
start after alsa, but it will not cause it to stop before that. Adding the
"after" line accomplishes that. Whether that behavior of use is an bug in and
of itself would be interesting.
Comment 9 Andy 2004-09-13 04:04:46 UTC
Inserting
	after alsasound esound
solved it for me too. Thanks.
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-15 11:48:56 UTC
I changed use to after in the init script... that should make it work.  thanks for solving this..
Comment 11 Carter 2004-09-16 01:59:17 UTC
See comment #1 regarding NAS.  The fix in Comment #8 and #9 was also missing from /etc/init.d/nas.  Added and fixed both