Upstart job hangs at "start/killed"

Bug #438313 reported by Daniel Hahler
48
This bug affects 11 people
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: upstart

I have the following upstart job:

$ cat /etc/init/freenet.conf
start on runlevel 2
chdir /mnt/datanr/freenet
exec sudo -u freenet ./run.sh start
nice 5
expect daemon

Upstart starts it during boot, but is unable to stop it.

$ sudo status freenet
freenet start/killed, process 2444

Process with pid 2444 does not exist, I guess there are too many forks.

I'll try using "su" instead of "sudo", but cannot change/start nor stop the process really.

$ status freenet
freenet start/killed, process 2444
$ sudo stop freenet
^C
$ status freenet
freenet stop/killed, process 2444
$ sudo stop freenet
stop: Job has already been stopped: freenet

All the time, there's no process 2444.

I'm attaching straces of the hanging start and stop actions, and a core dump.

ProblemType: Bug
Architecture: i386
Date: Mon Sep 28 20:26:28 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: upstart 0.6.3-5
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-11.36-generic
SourcePackage: upstart
Uname: Linux 2.6.31-11-generic i686

Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :

core dump, as requested by sadmac2 on IRC.
I hope this will work.
$ sudo gcore 1
warning: process 1 is a cloned process
[Thread debugging using libthread_db enabled]
0x00571422 in __kernel_vsyscall ()
Saved corefile core.1

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

What happens if you use "expect fork" instead of daemon? Are you sure that this forks once or twice?

I notice that it's a shell script you're running, if this runs *any* other commands (even cat, etc.) this can confuse things

Attach the "run.sh" script

Changed in upstart (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
importance: Medium → Low
Revision history for this message
Daniel Hahler (blueyed) wrote :

I have not checked how often it forks, just have been trying/fooling around.

Attaching the run.sh script.

Changed in upstart (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in upstart (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.