Just happened to me on trusty, installed yesterday.

Looking at my unattended-upgrades-dpkg log, it was immediately clear
that in my case it had nothing to do with unattended-upgrades itself.
There was a minor problem with the configuration options of one of the
programs that got invoked through the scriptlets in
/etc/apt/apt.conf.d/.  This caused that program (git, if you have to
know) to exit with an error.  The error travelled up the call chain,
finally arriving at unattended-upgrades which gets the blame.

I guess that most of the people commenting here are experiencing
something similar: unattended-upgrades getting blamed for an error
condition that happens somewhere completely else.  Please look at the
unattended-upgrades-dpkg log before blaming unattended-upgrades.

Re #14, looks like some other process grabbed the lock sometime before
unattended-upgrades got to call dpkg (via apt?).  It could perhaps be
somewhat cleverer about that but if dpkg cannot do its work, there's not
much unattended-upgrades can do about that than complain and exit with
an error status.  In case of a lock, it could reschedule itself or wait
until the lock becomes available.

Re #11, could be a botched PATH when run from cron.

Writing this up, I get the impression that apport is being (ab?)used to
report cron jobs that exited unsuccessfully.  In the not-so-old days, I
would have expected something like this in the mail.  Not a popup
inviting me to send a crash report.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1052360

Title:
  unattended-upgrade crashed with SystemError: E:Sub-process
  /usr/bin/dpkg returned an error code (2) for an unknown reason

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1052360/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to