touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #58580
[Bug 1422345] Re: stop being nice does not work
stgraber indicates this is causing issues in lxc containers:
11:14 < stgraber> bdmurray: your unattended-upgrade SRU
is making all my containers crash
once an hour ;)
11:14 < bdmurray> stgraber: hunh?
11:15 < stgraber> you can't set negative nice values in
an unprivileged LXC container even if
you're root inside it
11:15 < stgraber> so now every time unattended-upgrade
runs (in my case every hour), it
crashes on that os.nice call
11:18 < stgraber> what we've done in other tools (like
systemd) is make this non-fatel if
the error is EACCES (typical for
unprivileged containers) or EPERM
(typical for apparmor preventing it)
11:19 < bdmurray> stgraber: but then wouldn't bug
1422345 still happen?
11:22 < stgraber> bdmurray: sure, the bug would still
happen in this case
11:23 < stgraber> bdmurray: root in a userns has the
same rights as a regular user with
regard to process priorities
11:23 < stgraber> bdmurray: and as a regular user, you
can increase the niceness but never
decrease it
11:24 < bdmurray> would it better to first try
decreasing and only increase it if
decreasing works?
11:25 < stgraber> yep, that'd be a good trick
11:25 < stgraber> so -1, if that works then 20,
otherwise keep is it is
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unattended-upgrades in
Ubuntu.
https://bugs.launchpad.net/bugs/1422345
Title:
stop being nice does not work
Status in unattended-upgrades package in Ubuntu:
Fix Released
Status in unattended-upgrades source package in Trusty:
Fix Released
Status in unattended-upgrades source package in Utopic:
Fix Committed
Status in unattended-upgrades package in Debian:
New
Bug description:
Test Case
---------
1) Install apache2 from the -release pocket
2) Run unattended-upgrades
3) Observe apache2 running with a niceness of 19
4) Downgrade apache2 to the version from the -release pocket
5) Install the version of unattended-upgrades from -proposed
6) Run unattended-upgrades
7) Observe apache2 running with a niceness of 0 i.e. no niceness
Since version 0.81, unattended-upgrades does the upgrade calculation with os.nice(19). To finish the nice block in /usr/bin/unattended-upgrade, the following call is used:
os.nice(0)
Since the argument is interpreted as incremental, this should be:
os.nice(-19)
Without this fix, this problem is back:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701850
"unattended-upgrades: nice 19/ionice idle inherited by restarted processes"
Found in the trusty version (0.82.1ubuntu2), but probably in any
version (including Debian) since 0.81.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1422345/+subscriptions
References