update-manager assert failure: python: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

Bug #930004 reported by ebnf
322
This bug affects 43 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Occurred when updating.

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: update-manager 1:0.156.4
ProcVersionSignature: Ubuntu 3.2.0-15.24-generic 3.2.5
Uname: Linux 3.2.0-15-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
AssertionMessage: python: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Date: Thu Feb 9 23:36:59 2012
DuplicateOf: https://bugs.launchpad.net/bugs/926238
ExecutablePath: /usr/bin/update-manager
GsettingsChanges:
 com.ubuntu.update-manager first-run false
 com.ubuntu.update-manager launch-time 1327193820
 com.ubuntu.update-manager show-details true
 com.ubuntu.update-manager window-height 600
 com.ubuntu.update-manager window-width 600
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/update-manager --dist-upgrade
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 6
SourcePackage: update-manager
StacktraceTop:
 __assert_fail_base (fmt=<optimized out>, assertion=0x7f20d7ceead8 "!xcb_xlib_threads_sequence_lost", file=0x7f20d7ceed92 "../../src/xcb_io.c", line=<optimized out>, function=<optimized out>) at assert.c:94
 __GI___assert_fail (assertion=0x7f20d7ceead8 "!xcb_xlib_threads_sequence_lost", file=0x7f20d7ceed92 "../../src/xcb_io.c", line=273, function=0x7f20d7ceeeb8 "poll_for_event") at assert.c:103
 ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
 ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
 _XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
Title: update-manager assert failure: python: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
UpgradeStatus: Upgraded to precise on 2012-02-10 (0 days ago)
UserGroups:

Revision history for this message
ebnf (eric-zeitler) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 __assert_fail_base (fmt=<optimized out>, assertion=0x7f20d7ceead8 "!xcb_xlib_threads_sequence_lost", file=0x7f20d7ceed92 "../../src/xcb_io.c", line=<optimized out>, function=<optimized out>) at assert.c:94
 __GI___assert_fail (assertion=0x7f20d7ceead8 "!xcb_xlib_threads_sequence_lost", file=0x7f20d7ceed92 "../../src/xcb_io.c", line=273, function=0x7f20d7ceeeb8 "poll_for_event") at assert.c:103
 poll_for_event (dpy=<optimized out>) at ../../src/xcb_io.c:270
 poll_for_response (dpy=0xc64700) at ../../src/xcb_io.c:288
 _XEventsQueued (dpy=0xc64700, mode=<optimized out>) at ../../src/xcb_io.c:362

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in update-manager (Ubuntu):
status: New → Confirmed
visibility: private → public
Revision history for this message
SlugiusRex (slugiusrex) wrote :

FYI HACK :: sudo aptitude seems like a good work around.

Revision history for this message
Brian Murray (brian-murray) wrote :

This bug and its duplicates seem to have happened during distribution upgrades:

10:24:37 - flash:[...ents/canonical/launchpadlib] ./bug-check-duplicate-properties.py --bug 930004 --keys UpgradeStatus
LP: #930004 has a total of 6 duplicates
UpgradeStatus
  [1] Upgraded to precise on 2012-02-12 (0 days ago): 931064
  [1] Upgraded to precise on 2012-02-11 (0 days ago): 930498
  [3] Upgraded to precise on 2012-02-10 (0 days ago): 930243, 930257, 930417
  [1] Upgraded to precise on 2012-02-13 (0 days ago): 931537

Revision history for this message
Brian Murray (brian-murray) wrote :

Several of the bugs have the following in VarLogDistupgradeAptlog.txt:

MarkUpgrade() called on a non-upgrable pkg: 'brasero'
ERROR:root:Upgrading 'brasero' failed
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:273: poll_for_event: Assertion `! xcb_xlib_threads_sequence_lost' failed.

Revision history for this message
Bryce Harrington (bryce) wrote :

The error message "Unknown sequence number while processing queue" occurs in a chunk of text that has this big fat warning in front of it, about threading safety in client code:

/* Thread-safety rules:
 *
 * At most one thread can be reading from XCB's event queue at a time.
 * If you are not the current event-reading thread and you need to find
 * out if an event is available, you must wait.
 *
 * The same rule applies for reading replies.
 *
 * A single thread cannot be both the the event-reading and the
 * reply-reading thread at the same time.
 *
 * We always look at both the current event and the first pending reply
 * to decide which to process next.
 *
 * We always process all responses in sequence-number order, which may
 * mean waiting for another thread (either the event_waiter or the
 * reply_waiter) to handle an earlier response before we can process or
 * return a later one. If so, we wait on the corresponding condition
 * variable for that thread to process the response and wake us up.
 */

This seems to suggest perhaps this client application could have some faulty logic in its thread handling as relating to the xcb calls?

description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

Btw, xtrace may be useful for helping diagnose what the client is doing exactly.

Changed in update-manager (Ubuntu):
status: Confirmed → Triaged
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Brian Murray (brian-murray) wrote :

Bug 901675 (apport) and bug 938713 (software-center) and bug 927727 (bamf) all have similar assertions.

Changed in update-manager (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → Canonical Desktop Team (canonical-desktop-team)
Revision history for this message
ebnf (eric-zeitler) wrote :

Bug #933988 (java) also has this assertion.

tags: added: bugpattern-needed
Revision history for this message
Max Bowsher (maxb) wrote :

The two machines I've upgraded from precise to quantal (yesterday & today) have both experienced this bug, resulting in the release-upgrader being killed, and requiring manual editing of files within /var/lib/dpkg/ and use of aptitude to complete the upgrade.

jura (zinlun)
Changed in update-manager (Ubuntu):
status: Triaged → Fix Released
Changed in update-manager (Ubuntu):
status: Fix Released → Triaged
Changed in update-manager (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → nobody
To post a comment you must log in.