setuid 1000 in guest upstart job hangs container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
New
|
Undecided
|
James Hunt |
Bug Description
Hi,
When I run the following upstart job:
# myservice - myservice job file
description "vnc"
author "Me <myself@i.com>"
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect fork
env HOME=/home/ubuntu
setuid 1000 # using the username here works just fine
# Start the process
exec vnc4server
the container hangs.
---
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
BootLog:
DistroRelease: Ubuntu 14.10
NonfreeKernelMo
Package: upstart 1.13.2-0ubuntu2
PackageArchitec
ProcEnviron:
TERM=rxvt-unicode
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdline: BOOT_IMAGE=
ProcVersionSign
Tags: utopic
Uname: Linux 3.16.0-23-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UpstartBugCategory: System
UpstartRunningS
UserGroups: sudo
_MarkForUpload: True
Changed in upstart: | |
assignee: | nobody → James Hunt (jamesodhunt) |
Changed in upstart: | |
status: | New → Incomplete |
status: | Incomplete → New |
no longer affects: | lxc |
There's more to this bug, it seems that in general whenever I make any error in an upstart job, the container hangs. Further, even with the successful job above, if I try to stop the container, it hangs with:
root 15596 0.2 0.1 35004 2716 ? Ss 10:07 0:00 lxc-start -n u1 d/K01sendsigs stop
root 15643 1.9 0.1 28936 3708 ? Ss 10:07 0:01 \_ /sbin/init
root 16306 0.0 0.0 4448 656 ? Ss 10:07 0:00 \_ /bin/sh -e /proc/self/fd/9
root 16351 0.0 0.0 4448 1580 ? S 10:07 0:00 \_ /bin/sh /etc/init.d/rc 0
root 16367 0.1 0.0 4448 1508 ? S 10:07 0:00 \_ /bin/sh /etc/rc0.
root 16960 0.0 0.0 4352 816 ? S 10:07 0:00 \_ sleep 1