dpkg assert failure: dpkg: ../../src/packages.c:245: process_queue:

Bug #1512322 reported by Matthew Jaggard on 2015-11-02
114
This bug affects 17 people
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
High
Unassigned
Bionic
High
Unassigned

Bug Description

I ran do-release-upgrade and had some problems with IBM specific packages. I then ran apt-get dist-upgrade and eventually got this error.

ProblemType: Crash
DistroRelease: Ubuntu 15.10
Package: dpkg 1.18.2ubuntu5
ProcVersionSignature: Ubuntu 3.19.0-31.36-generic 3.19.8-ckt7
Uname: Linux 3.19.0-31-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.19.1-0ubuntu4
Architecture: amd64
AssertionMessage: dpkg: ../../src/packages.c:245: process_queue: Assertion `dependtry <= 4' failed.
Date: Mon Nov 2 11:22:52 2015
ExecutablePath: /usr/bin/dpkg
InstallationDate: Installed on 2015-07-15 (109 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
 LANGUAGE=en_GB:en
Signal: 6
SourcePackage: dpkg
StacktraceTop:
 __assert_fail_base (fmt=0x7f74e0c4f028 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x432360 "dependtry <= 4", file=file@entry=0x4322ee "../../src/packages.c", line=line@entry=245, function=function@entry=0x432bd0 "process_queue") at assert.c:92
 __GI___assert_fail (assertion=0x432360 "dependtry <= 4", file=0x4322ee "../../src/packages.c", line=245, function=0x432bd0 "process_queue") at assert.c:101
 ?? ()
 ?? ()
 ?? ()
Title: dpkg assert failure: dpkg: ../../src/packages.c:245: process_queue: Assertion `dependtry <= 4' failed.
UpgradeStatus: Upgraded to wily on 2015-11-02 (0 days ago)
UserGroups:

StacktraceTop:
 __assert_fail_base (fmt=0x7f74e0c4f028 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x432360 "dependtry <= 4", file=file@entry=0x4322ee "../../src/packages.c", line=line@entry=245, function=function@entry=0x432bd0 <__PRETTY_FUNCTION__.6590> "process_queue") at assert.c:92
 __GI___assert_fail (assertion=assertion@entry=0x432360 "dependtry <= 4", file=file@entry=0x4322ee "../../src/packages.c", line=line@entry=245, function=function@entry=0x432bd0 <__PRETTY_FUNCTION__.6590> "process_queue") at assert.c:101
 process_queue () at ../../src/packages.c:245
 packages (argv=<optimized out>) at ../../src/packages.c:162
 main (argc=<optimized out>, argv=0x7ffcea83a4c8) at ../../src/main.c:899

Changed in dpkg (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
tags: added: zesty

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dpkg (Ubuntu):
status: New → Confirmed
information type: Private → Public
Vincent Gerris (vgerris) wrote :

I got the same issue on an upgrade of 17.10 to 18.04 development release

Brian Murray (brian-murray) wrote :

This also happened to me when upgrading from 17.10 to 18.04 here's the relevant bit of the upgrade log files:

main.log:
2018-01-05 15:22:34,603 DEBUG failed to SystemUnLock() (E:Not locked)
2018-01-05 15:38:49,081 ERROR got an error from dpkg for pkg: 'systemd': 'triggers looping, abandoned'
2018-01-05 15:38:49,081 DEBUG running apport_pkgfailure() systemd: triggers looping, abandoned
2018-01-05 15:40:02,214 ERROR Exception during pm.DoInstall()
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-1fsoxbon/DistUpgrade/DistUpgradeView.py", line 218, in run
    res = pm.do_install(self.writefd)
apt_pkg.Error: E:Sub-process /usr/bin/dpkg exited unexpectedly
2018-01-05 15:40:02,265 ERROR SystemError from cache.commit(): installArchives() failed
2018-01-05 15:40:02,265 ERROR found exception: 'E:Sub-process /usr/bin/dpkg exited unexpectedly'

apt-term.log:
Setting up gstreamer1.0-plugins-bad:amd64 (1.12.4-2ubuntu1) ...^M
dpkg: ../../src/packages.c:245: process_queue: Assertion `dependtry <= 4' failed.^M

tags: added: bionic rls-bb-incoming
summary: - Problem upgrading IBM owned system to 15.10
+ dpkg assert failure: dpkg: ../../src/packages.c:245: process_queue:

Also happened to me during an upgrade from 17.10 to 18.04. I'm raising the importance.

Changed in dpkg (Ubuntu):
importance: Medium → High
Brian Murray (brian-murray) wrote :

Here's some more details from apt-term.log for my upgrade.

4411 dpkg: cycle found while processing triggers:^M
4412 chain of packages whose triggers are or may be responsible:^M
4413 gnome-icon-theme -> bamfdaemon^M
4414 packages' pending triggers which are or may be unresolvable:^M
4415 systemd: /etc/init.d^M
4416 libc-bin: ldconfig^M
4417 bamfdaemon: /usr/share/applications^M
4418 gnome-icon-theme: /usr/share/icons/gnome^M
4419 sgml-base: update-sgmlcatalog^M
4420 initramfs-tools: update-initramfs^M
4421 shim-signed: shim-secureboot-policy^M
4422 libgdk-pixbuf2.0-0:amd64: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders^M
4423 dictionaries-common: update-default-wordlist^M
4424 ureadahead: /etc/init.d^M
4425 gconf2: /usr/share/GConf/gsettings: /usr/share/gconf/defaults^M
4426 dpkg: error processing package systemd (--configure):^M
4427 triggers looping, abandoned^M
....
4835 Setting up gstreamer1.0-plugins-bad:amd64 (1.12.4-2ubuntu1) ...^M
4836 dpkg: ../../src/packages.c:245: process_queue: Assertion `dependtry <= 4' failed.^M

tags: added: id-5a8770510f2c767f1820d61c
Steve Langasek (vorlon) on 2018-02-22
tags: removed: rls-bb-incoming
Julian Andres Klode (juliank) wrote :

So, from what I saw there indeed 4 dependtry with different semantics - see src/configure.c:deferred_configure comment. It seems that dpkg is trying to break a cycle but fails, and then hits the assert (which should, and will be, an internerr).

@Brian: The error tracker says it cannot find the problem.

I don't completely understand trigger looping, but maybe it's one of the situations again where some triggers are "interest" and can be made "interest-noawait"?

tags: added: id-5ab94cb1c5f881e307a2751b
Brian Murray (brian-murray) wrote :

Here's a better link for the crash report in the Error Tracker:

https://errors.ubuntu.com/problem/07b782dcfeb6404740f227f16789748f68ff9b8b

The next one looks similar to the one above although it has a much lower count:

https://errors.ubuntu.com/problem/75ca0e78d6ab023ff6843d9a4b38d27ee17be28c

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers