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
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 92790c969525d3" ..., 2048) = 37 UNIX_FD\ r\n", 19, MSG_NOSIGNAL) = 19 UNIX_FD\ r\n", 2048) = 15 POLLIN| POLLOUT} ], 1, -1) = 1 ([{fd=3, revents=POLLOUT}]) 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_MONOTONIC , {13369, 479497006}) = 0 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 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_MONOTONIC , {13369, 504154425}) = 0 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 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_MONOTONIC , {13369, 509531849}) = 0 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 CLOCK_MONOTONIC , {13369, 516260329}) = 0 RESTARTBLOCK (To be restarted)
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 37d274edad794a3
poll([{fd=3, events=POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
send(3, "NEGOTIATE_
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "AGREE_
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=
sendmsg(3, {msg_name(0)=NULL, msg_iov(
clock_gettime(
poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(
recvmsg(3, 0xbfd42610, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(3, {msg_name(0)=NULL, msg_iov(
clock_gettime(
poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(
recvmsg(3, 0xbfd425d0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(3, {msg_name(0)=NULL, msg_iov(
clock_gettime(
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(
recvmsg(3, 0xbfd42700, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(
poll([{fd=3, events=POLLIN}], 1, -7) = ? ERESTART_