unattended-upgrade-shutdown crashes with apt_pkg.Error: E:Syntax error /etc/apt/apt.conf:2: Extra junk at end of file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Fix Released
|
Undecided
|
Balint Reczey | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Unattended-
* The fix would not warrant an SRU itself but it is part of the full backport SRU tracked in LP: #1702793.
[Test Case]
* Buggy version:
root@x-
root@x-
● unattended-
Loaded: loaded (/lib/systemd/
Active: active (exited) since Fri 2019-02-08 12:55:16 UTC; 39s ago
Docs: man:unattended-
Tasks: 0
Memory: 0B
CPU: 0
Feb 08 12:55:16 x-uu-1702793 systemd[1]: Started Unattended Upgrades Shutdown.
root@x-
root@x-
● unattended-
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Fri 2019-02-08 12:56:02 UTC; 2s ago
Docs: man:unattended-
Process: 602 ExecStop=
Feb 08 12:55:16 x-uu-1702793 systemd[1]: Started Unattended Upgrades Shutdown.
Feb 08 12:56:02 x-uu-1702793 systemd[1]: Stopping Unattended Upgrades Shutdown...
Feb 08 12:56:02 x-uu-1702793 unattended-
Feb 08 12:56:02 x-uu-1702793 unattended-
Feb 08 12:56:02 x-uu-1702793 unattended-
Feb 08 12:56:02 x-uu-1702793 unattended-
Feb 08 12:56:02 x-uu-1702793 systemd[1]: unattended-
Feb 08 12:56:02 x-uu-1702793 systemd[1]: Stopped Unattended Upgrades Shutdown.
Feb 08 12:56:02 x-uu-1702793 systemd[1]: unattended-
Feb 08 12:56:02 x-uu-1702793 systemd[1]: unattended-
root@x-
root@x-
● unattended-
Loaded: loaded (/lib/systemd/
Active: active (exited) since Fri 2019-02-08 12:56:28 UTC; 2s ago
Docs: man:unattended-
Process: 602 ExecStop=
* Fixed version:
root@dd-uu-ref:~# echo extra-junk >> /etc/apt/
root@dd-uu-ref:~# service unattended-upgrades status
● unattended-
Loaded: loaded (/lib/systemd/
Active: active (running) since Fri 2019-02-08 08:59:58 UTC; 3h 42min ago
Docs: man:unattended-
Main PID: 259 (unattended-upgr)
Tasks: 2 (limit: 4915)
Memory: 12.4M
CGroup: /system.
└─259 /usr/bin/python3 /usr/share/
Feb 08 08:59:58 dd-uu-ref systemd[1]: Started Unattended Upgrades Shutdown.
root@dd-uu-ref:~# service unattended-upgrades stop
root@dd-uu-ref:~# cat /var/log/
2019-02-07 16:08:14,675 WARNING - SIGTERM or SIGHUP received, stopping unattended-upgrades only if it is running
root@dd-uu-ref:~# service unattended-upgrades status
● unattended-
Loaded: loaded (/lib/systemd/
Active: inactive (dead) since Fri 2019-02-08 12:50:35 UTC; 7min ago
Docs: man:unattended-
Process: 760 ExecStart=
Main PID: 760 (code=exited, status=0/SUCCESS)
Feb 08 12:49:39 dd-uu-ref systemd[1]: Started Unattended Upgrades Shutdown.
Feb 08 12:50:35 dd-uu-ref systemd[1]: Stopping Unattended Upgrades Shutdown...
Feb 08 12:50:35 dd-uu-ref systemd[1]: unattended-
[Regression Potential]
* U-u.service used to stop crashing, now it exits normally when the APT configuration was valid when it was started. There is little chance for regressing here since the configuration file is not read again.
* There is also an enhancement request tracked to start u-u-s with a default config when parsing the config fails to be able to act on shutdown:
https:/
[Original Bug Text]
The Ubuntu Error Tracker has been receiving reports about a problem regarding unattended-
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://
Traceback (most recent call last):
File "/usr/share/
apt_
apt_pkg.Error: E:Syntax error /etc/apt/
Changed in unattended-upgrades (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Balint Reczey (rbalint) |
description: | updated |
summary: |
- /usr/share/unattended-upgrades/unattended-upgrade- - shutdown:apt_pkg.Error:/usr/share/unattended-upgrades/unattended- - upgrade-shutdown@136 + unattended-upgrade-shutdown crashes with apt_pkg.Error: E:Syntax error + /etc/apt/apt.conf:2: Extra junk at end of file |
description: | updated |
This bug was fixed in the package unattended-upgrades - 0.99ubuntu2
---------------
unattended-upgrades (0.99ubuntu2) bionic; urgency=medium
* Run upgrade- between- snapshots only on amd64. upgrade' s Python code and uses
The test exercises only unattented-
dependencies from the frozen Debian snapshot archive thus running
it on all architectures would provide little benefit.
-- Balint Reczey <email address hidden> Tue, 13 Feb 2018 11:41:20 +0700