Problem with blocking upstart commands in a vserver

Christopher Armstrong radix at twistedmatrix.com
Fri May 6 22:38:07 UTC 2011


Hi all. I've set up some vservers and am having a bit of trouble with
upstart. The hosts are Ubuntu 10.04 LTS as are the vserver guests (and I'm
using the version of upstart from that release of Ubuntu).

I've managed to get upstart working to the point where it starts all of my
services on boot. However, any management that I do post-boot will block the
client commands (stop, start, restart).

I've tried using --verbose, and I see the upstart output that's emitted when
the vserver boots, but none of my start/stop/restart commands after boot are
emitting anything to the console (I've created a real /dev/console in the
guest and enabled bootlogd on the host to see my console output, and
verified that "echo hi > /dev/console" in the guest outputs it to the host
bootlogd log file).

Here's a description of the behavior I see:

$ stop cron # stops cron and blocks forever
$ restart cron # stops cron and blocks forever (doesn't start it back up)

I've straced a 'restart cron' run, also while stracing pid 1, to try to
learn anything valuable. I can't extract any useful information from the
outputs, so I've attached them.

I'm curious if anyone can say whether they've seen Ubuntu/upstart working
under a vserver to such an extent that they can stop/restart services at
runtime (in any version, or Ubuntu 10.04 specifically).

I'm expecting that I must have a misconfiguration of some init script, or a
wrong device file, or some file with incorrect permissions, or something
like that. I doubt this is a bug in upstart, so please forgive me for
posting to the -devel list about something that's probably a -user
discussion.

Thanks!

-- 
Christopher Armstrong
http://radix.twistedmatrix.com/
http://planet-if.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20110506/8de9f9b3/attachment.html>
-------------- next part --------------
Process 1 attached - interrupt to quit
select(10, [4 6 7 8 9], [], [8 9], NULL) = 1 (in [8])
accept(8, {sa_family=AF_FILE, NULL}, [2]) = 10
fcntl(10, F_GETFD)                      = 0
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
fcntl(10, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(10, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f8622d70af0}, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f8622d70af0}, 8) = 0
read(4, 0x7fff8eef568f, 1)              = -1 EAGAIN (Resource temporarily unavailable)
waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WSTOPPED|WCONTINUED, NULL) = 0
select(11, [4 6 7 8 9 10], [], [8 9 10], NULL) = 1 (in [10])
recvmsg(10, {msg_name(0)=NULL, msg_iov(1)=[{"\0", 1}], msg_controllen=0, msg_flags=0}, 0) = 1
getsockopt(10, SOL_SOCKET, SO_PEERCRED, "\25\2\0\0\0\0\0\0\0\0\0\0", [12]) = 0
read(10, "AUTH EXTERNAL 30\r\n", 2048)  = 18
read(4, 0x7fff8eef568f, 1)              = -1 EAGAIN (Resource temporarily unavailable)
waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WSTOPPED|WCONTINUED, NULL) = 0
select(11, [4 6 7 8 9], [10], [8 9 10], NULL) = 1 (out [10])
write(10, "OK 164253c1c51a6c7bbe73ee924dc1d"..., 37) = 37
read(4, 0x7fff8eef568f, 1)              = -1 EAGAIN (Resource temporarily unavailable)
waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WSTOPPED|WCONTINUED, NULL) = 0
select(11, [4 6 7 8 9 10], [], [8 9 10], NULL) = 1 (in [10])
read(10, "BEGIN\r\n", 2048)             = 7
geteuid()                               = 0
read(4, 0x7fff8eef568f, 1)              = -1 EAGAIN (Resource temporarily unavailable)
waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WSTOPPED|WCONTINUED, NULL) = 0
select(11, [4 6 7 8 9 10], [], [8 9 10], NULL) = 1 (in [10])
read(10, "l\1\2\1\t\0\0\0\1\0\0\0_\0\0\0\1\1o\0\23\0\0\0/com/ubu"..., 2048) = 121
write(5, "\0", 1)                       = 1
read(10, 0x7f86256083d0, 2048)          = -1 EAGAIN (Resource temporarily unavailable)
read(4, "\0", 1)                        = 1
read(4, 0x7fff8eef568f, 1)              = -1 EAGAIN (Resource temporarily unavailable)
waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WSTOPPED|WCONTINUED, NULL) = 0
writev(10, [{"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", 32}, {"\35\0\0\0/com/ubuntu/Upstart/jobs/cro"..., 34}], 2) = 66
select(11, [4 6 7 8 9 10], [], [8 9 10], NULL) = 1 (in [10])
read(10, "l\1\2\1\10\0\0\0\2\0\0\0i\0\0\0\1\1o\0\35\0\0\0/com/ubu"..., 2048) = 136
write(5, "\0", 1)                       = 1
read(10, 0x7f86256083d0, 2048)          = -1 EAGAIN (Resource temporarily unavailable)
read(4, "\0", 1)                        = 1
read(4, 0x7fff8eef568f, 1)              = -1 EAGAIN (Resource temporarily unavailable)
waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WSTOPPED|WCONTINUED, NULL) = 0
write(5, "\0", 1)                       = 1
select(11, [4 6 7 8 9 10], [], [8 9 10], NULL) = 1 (in [4])
read(4, "\0", 1)                        = 1
read(4, 0x7fff8eef568f, 1)              = -1 EAGAIN (Resource temporarily unavailable)
waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WSTOPPED|WCONTINUED, NULL) = 0
select(11, [4 6 7 8 9 10], [], [8 9 10], NULL <unfinished ...>
Process 1 detached
-------------- next part --------------
execve("/sbin/restart", ["restart", "cron"], [/* 12 vars */]) = 0
brk(0)                                  = 0x7ff4b48a2000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff4b3b13000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=11070, ...}) = 0
mmap(NULL, 11070, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff4b3b10000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnih.so.1", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0Pf\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=92208, ...}) = 0
mmap(NULL, 2187640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff4b36df000
mprotect(0x7ff4b36f5000, 2093056, PROT_NONE) = 0
mmap(0x7ff4b38f4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7ff4b38f4000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnih-dbus.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 2\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=38952, ...}) = 0
mmap(NULL, 2134056, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff4b34d5000
mprotect(0x7ff4b34dd000, 2097152, PROT_NONE) = 0
mmap(0x7ff4b36dd000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7ff4b36dd000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libdbus-1.so.3", O_RDONLY)   = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 at j\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=256768, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff4b3b0f000
mmap(NULL, 2352648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff4b3296000
mprotect(0x7ff4b32d3000, 2097152, PROT_NONE) = 0
mmap(0x7ff4b34d3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3d000) = 0x7ff4b34d3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360Y\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=135745, ...}) = 0
mmap(NULL, 2212736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff4b3079000
mprotect(0x7ff4b3091000, 2093056, PROT_NONE) = 0
mmap(0x7ff4b3290000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7ff4b3290000
mmap(0x7ff4b3292000, 13184, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff4b3292000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/librt.so.1", O_RDONLY)       = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31744, ...}) = 0
mmap(NULL, 2128848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff4b2e71000
mprotect(0x7ff4b2e78000, 2093056, PROT_NONE) = 0
mmap(0x7ff4b3077000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7ff4b3077000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\355\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1572232, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff4b3b0e000
mmap(NULL, 3680296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff4b2aee000
mprotect(0x7ff4b2c68000, 2093056, PROT_NONE) = 0
mmap(0x7ff4b2e67000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x179000) = 0x7ff4b2e67000
mmap(0x7ff4b2e6c000, 18472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff4b2e6c000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff4b3b0d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff4b3b0c000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff4b3b0b000
arch_prctl(ARCH_SET_FS, 0x7ff4b3b0c700) = 0
mprotect(0x7ff4b2e67000, 16384, PROT_READ) = 0
mprotect(0x7ff4b3077000, 4096, PROT_READ) = 0
mprotect(0x7ff4b3290000, 4096, PROT_READ) = 0
mprotect(0x7ff4b34d3000, 4096, PROT_READ) = 0
mprotect(0x7ff4b36dd000, 4096, PROT_READ) = 0
mprotect(0x7ff4b38f4000, 4096, PROT_READ) = 0
mprotect(0x7ff4b3d32000, 4096, PROT_READ) = 0
mprotect(0x7ff4b3b15000, 4096, PROT_READ) = 0
munmap(0x7ff4b3b10000, 11070)           = 0
set_tid_address(0x7ff4b3b0c9d0)         = 533
set_robust_list(0x7ff4b3b0c9e0, 0x18)   = 0
futex(0x7fff3efd5c9c, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fff3efd5c9c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7ff4b3b0c700) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7ff4b307e870, [], SA_RESTORER|SA_SIGINFO, 0x7ff4b30888f0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7ff4b307e900, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7ff4b30888f0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0)                                  = 0x7ff4b48a2000
brk(0x7ff4b48c3000)                     = 0x7ff4b48c3000
getuid()                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
connect(3, {sa_family=AF_FILE, path=@"/com/ubuntu/upstart"}, 22) = 0
fcntl(3, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
geteuid()                               = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7ff4b2b21af0}, {SIG_DFL, [], 0}, 8) = 0
poll([{fd=3, events=POLLOUT}], 1, 0)    = 1 ([{fd=3, revents=POLLOUT}])
write(3, "\0", 1)                       = 1
write(3, "AUTH EXTERNAL 30\r\n", 18)    = 18
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
read(3, "OK 164253c1c51a6c7bbe73ee924dc1d"..., 2048) = 37
poll([{fd=3, events=POLLOUT}], 1, -1)   = 1 ([{fd=3, revents=POLLOUT}])
write(3, "BEGIN\r\n", 7)                = 7
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"l\1\2\1\t\0\0\0\1\0\0\0_\0\0\0\1\1o\0\23\0\0\0/com/ubu"..., 112}, {"\4\0\0\0cron\0", 9}], 2) = 121
poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
read(3, "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) = 66
read(3, 0x7ff4b48a4370, 2048)           = -1 EAGAIN (Resource temporarily unavailable)
writev(3, [{"l\1\2\1\10\0\0\0\2\0\0\0i\0\0\0\1\1o\0\35\0\0\0/com/ubu"..., 128}, {"\0\0\0\0\1\0\0\0", 8}], 2) = 136
poll([{fd=3, events=POLLIN}], 1, -1 <unfinished ...>


More information about the upstart-devel mailing list