This issue also seems to be the cause of difficulties with minidlna if
the -R flag is added to rescan the media files directory because
minidlnad creates an additional process to do the rescanning.  So if
expect daemon is used for the two process at startup, then the shutdown
runs into difficulties because there is only one process to be killed,
the rescan process having ended by itself.

So until a fix is found for upstart, users should be advised not to add
-R for rescan to the upstart configuration file, and that if they need
to do a rescan at startup, use the traditional sysV  rc init.d script
and not upstart to start and stop the daemon.

It would also be very useful if there was some initctl command to wipe that 
state of service jobs which are in a bad state eg
 minidlna stop/killed, process 5114  or minidlna start/killed, process 5114
since once the upstart job gets into this state, using start or stop results in 
upstart hanging on

connect(3, {sa_family=AF_FILE, path=@"/com/ubuntu/upstart"}, 22) = 0
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
geteuid32()                             = 0
getsockname(3, {sa_family=AF_FILE, NULL}, [2]) = 0
poll([{fd=3, events=POLLOUT}], 1, 0)    = 1 ([{fd=3, revents=POLLOUT}])
send(3, "\0", 1, MSG_NOSIGNAL)          = 1
send(3, "AUTH EXTERNAL 30\r\n", 18, MSG_NOSIGNAL) = 18
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
read(3, "OK 37d274edad794a392790c969525d3"..., 2048) = 37
poll([{fd=3, events=POLLOUT}], 1, -1)   = 1 ([{fd=3, revents=POLLOUT}])
send(3, "NEGOTIATE_UNIX_FD\r\n", 19, MSG_NOSIGNAL) = 19
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
read(3, "AGREE_UNIX_FD\r\n", 2048)      = 15
poll([{fd=3, events=POLLOUT}], 1, -1)   = 1 ([{fd=3, revents=POLLOUT}])
send(3, "BEGIN\r\n", 7, MSG_NOSIGNAL)   = 7
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
sendmsg(3, {msg_name(0)=NULL, 
msg_iov(2)=[{"l\1\2\1\r\0\0\0\1\0\0\0_\0\0\0\1\1o\0\23\0\0\0/com/ubu"..., 112}, 
{"\10\0\0\0minidlna\0", 13}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 
125
clock_gettime(CLOCK_MONOTONIC, {13369, 479497006}) = 0
poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, 
msg_iov(1)=[{"l\2\1\1&\0\0\0\1\0\0\0\17\0\0\0\5\1u\0\1\0\0\0\10\1g\0\1o\0\0"...,
 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 70
recvmsg(3, 0xbfd42610, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily 
unavailable)
sendmsg(3, {msg_name(0)=NULL, 
msg_iov(2)=[{"l\1\2\1\4\0\0\0\2\0\0\0x\0\0\0\1\1o\0!\0\0\0/com/ubu"..., 136}, 
{"\0\0\0\0", 4}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 140
clock_gettime(CLOCK_MONOTONIC, {13369, 504154425}) = 0
poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, 
msg_iov(1)=[{"l\2\1\1(\0\0\0\2\0\0\0\17\0\0\0\5\1u\0\2\0\0\0\10\1g\0\1o\0\0"...,
 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 72
recvmsg(3, 0xbfd425d0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily 
unavailable)
sendmsg(3, {msg_name(0)=NULL, 
msg_iov(2)=[{"l\1\2\1\10\0\0\0\3\0\0\0q\0\0\0\1\1o\0!\0\0\0/com/ubu"..., 136}, 
{"\0\0\0\0\1\0\0\0", 8}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 144
clock_gettime(CLOCK_MONOTONIC, {13369, 509531849}) = 0
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, 
msg_iov(1)=[{"l\4\1\1\t\0\0\0\3\0\0\0w\0\0\0\1\1o\0#\0\0\0/com/ubu"..., 2048}], 
msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 145
recvmsg(3, 0xbfd42700, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily 
unavailable)
clock_gettime(CLOCK_MONOTONIC, {13369, 516260329}) = 0
poll([{fd=3, events=POLLIN}], 1, -7)    = ? ERESTART_RESTARTBLOCK (To be 
restarted)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/406397

Title:
  init: job stuck with expect fork/daemon when parent reaps child

To manage notifications about this bug go to:
https://bugs.launchpad.net/upstart/+bug/406397/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to