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

Bug #901675 reported by Martin Albisetti
This bug affects 162 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Martin Pitt
libx11 (Ubuntu)
Invalid
High
Canonical X.org

Bug Description

Tried to cancel uploading a crash that had happened before I suspended/resumed.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: apport-gtk 1.90-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-2.6-generic-pae 3.2.0-rc3
Uname: Linux 3.2.0-2-generic-pae i686
ApportLog:
 ERROR: apport (pid 21331) Thu Dec 8 10:45:22 2011: called for pid 29963, signal 6
 ERROR: apport (pid 21331) Thu Dec 8 10:45:22 2011: script: /usr/share/apport/apport-gtk, interpreted by /usr/bin/python2.7 (command line "/usr/bin/python /usr/share/apport/apport-gtk")
 ERROR: apport (pid 21331) Thu Dec 8 10:45:22 2011: debug: session gdbus call: (true,)

 ERROR: apport (pid 21331) Thu Dec 8 10:45:31 2011: wrote report /var/crash/_usr_share_apport_apport-gtk.1000.crash
ApportVersion: 1.90-0ubuntu1
Architecture: i386
AssertionMessage: python: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Date: Thu Dec 8 10:45:22 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/share/apport/apport-gtk
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/apport/apport-gtk
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 6
SourcePackage: apport
StacktraceTop:
 __kernel_vsyscall ()
 raise () from /lib/i386-linux-gnu/libc.so.6
 abort () from /lib/i386-linux-gnu/libc.so.6
 __assert_fail () from /lib/i386-linux-gnu/libc.so.6
 ?? () from /usr/lib/i386-linux-gnu/libX11.so.6
Title: apport-gtk assert failure: python: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
UpgradeStatus: Upgraded to precise on 2011-12-02 (6 days ago)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

Revision history for this message
Martin Albisetti (beuno) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 __GI___assert_fail (assertion=0xb6536130 "!xcb_xlib_threads_sequence_lost", file=0xb653638a "../../src/xcb_io.c", line=273, function=0xb6536478 "poll_for_event") at assert.c:81
 poll_for_event (dpy=0x8969308) at ../../src/xcb_io.c:270
 poll_for_response (dpy=0x8969308) at ../../src/xcb_io.c:288
 _XEventsQueued (dpy=0x8969308, mode=2) at ../../src/xcb_io.c:362
 XPending (dpy=0x8969308) at ../../src/Pending.c:55

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 apport (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in apport (Ubuntu):
status: New → Confirmed
visibility: private → public
Revision history for this message
Ian Nicholson (imnichol) wrote :

Occurred while I was uploading information about another bug.

tags: added: bugpattern-needed
Revision history for this message
Ian Ross (iankross) wrote :

did upgrade to 12.04 Friday. Everything went really well, although I have a popup telling me that I have a serious kernel problem and it won't allow me to send in the bug. It seems to show up for a period of time and then appears to go away.
I am an end user so I don't have much to offer

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

I got prompted with this crash along with a bug #905686 type crash. Both seem to occur in xcb_io.c; wonder if they're related?

Changed in libx11 (Ubuntu):
importance: Undecided → High
status: New → Triaged
Bryce Harrington (bryce)
Changed in libx11 (Ubuntu):
assignee: nobody → Canonical X.org (canonical-x)
tags: added: qa-manual-testing rls-mgr-p-tracking
Revision history for this message
Supergroove00 (supergroove00) wrote : Re: [Bug 901675] Re: apport-gtk assert failure: python: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

i have no idea if they related. i dont even know what those line mean, i
simply report
every crash that occur with my pc. :)

On Thu, Feb 23, 2012 at 12:27 PM, Jean-Baptiste Lallement <
<email address hidden>> wrote:

> ** Tags added: qa-manual-testing rls-mgr-p-tracking
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (926944).
> https://bugs.launchpad.net/bugs/901675
>
> Title:
> apport-gtk assert failure: python: ../../src/xcb_io.c:273:
> poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
>
> Status in “apport” package in Ubuntu:
> Confirmed
> Status in “libx11” package in Ubuntu:
> Triaged
>
> Bug description:
> Tried to cancel uploading a crash that had happened before I
> suspended/resumed.
>
> ProblemType: Crash
> DistroRelease: Ubuntu 12.04
> Package: apport-gtk 1.90-0ubuntu1
> ProcVersionSignature: Ubuntu 3.2.0-2.6-generic-pae 3.2.0-rc3
> Uname: Linux 3.2.0-2-generic-pae i686
> ApportLog:
> ERROR: apport (pid 21331) Thu Dec 8 10:45:22 2011: called for pid
> 29963, signal 6
> ERROR: apport (pid 21331) Thu Dec 8 10:45:22 2011: script:
> /usr/share/apport/apport-gtk, interpreted by /usr/bin/python2.7 (command
> line "/usr/bin/python /usr/share/apport/apport-gtk")
> ERROR: apport (pid 21331) Thu Dec 8 10:45:22 2011: debug: session gdbus
> call: (true,)
>
> ERROR: apport (pid 21331) Thu Dec 8 10:45:31 2011: wrote report
> /var/crash/_usr_share_apport_apport-gtk.1000.crash
> ApportVersion: 1.90-0ubuntu1
> Architecture: i386
> AssertionMessage: python: ../../src/xcb_io.c:273: poll_for_event:
> Assertion `!xcb_xlib_threads_sequence_lost' failed.
> Date: Thu Dec 8 10:45:22 2011
> EcryptfsInUse: Yes
> ExecutablePath: /usr/share/apport/apport-gtk
> InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
> InterpreterPath: /usr/bin/python2.7
> PackageArchitecture: all
> ProcCmdline: /usr/bin/python /usr/share/apport/apport-gtk
> ProcEnviron:
> PATH=(custom, no user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> Signal: 6
> SourcePackage: apport
> StacktraceTop:
> __kernel_vsyscall ()
> raise () from /lib/i386-linux-gnu/libc.so.6
> abort () from /lib/i386-linux-gnu/libc.so.6
> __assert_fail () from /lib/i386-linux-gnu/libc.so.6
> ?? () from /usr/lib/i386-linux-gnu/libX11.so.6
> Title: apport-gtk assert failure: python: ../../src/xcb_io.c:273:
> poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
> UpgradeStatus: Upgraded to precise on 2011-12-02 (6 days ago)
> UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/apport/+bug/901675/+subscriptions
>

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

The failure is an assertion being hit in libxcb rather than a segfault, which implies that the library isn't bugged itself but rather it's catching a fault higher up in the system.

The xcb assertion code is:

   if (XLIB_SEQUENCE_COMPARE(event_sequence, >,
                                                  dpy->request))
   {
                                throw_thread_fail_assert("Unknown sequence "
                                                         "number while "
                                                         "processing queue",
                                                xcb_xlib_threads_sequence_lost);

There is a big warning in the comments above this 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.
 */

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

See bug #833694, which was a similar bug in gnome-settings-daemon.

Changed in apport (Ubuntu):
assignee: nobody → Canonical X.org (canonical-x)
Changed in libx11 (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Terry (terry-kryogenic) wrote :

I get the following while attempting to submit some log files for another bug report.

$apport-collect 941695
No packages found matching linux.
ERROR: KeyError('ProblemType',)
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.

Gdk-WARNING **: apport-gtk: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

python: ../../src/xcb_io.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.

Martin Pitt (pitti)
tags: added: bugpattern-written
removed: bugpattern-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Reproduces quite reliably for me with "apport-bug libreoffice" (or any uninstalled package). I get either this crash or bug 943661.

I wrote a test case for this.

Changed in apport (Ubuntu):
assignee: Canonical X.org (canonical-x) → Martin Pitt (pitti)
importance: Medium → High
status: Confirmed → In Progress
tags: added: whoopsie-merge
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in trunk r2198.

Changed in apport (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.5 KiB)

This bug was fixed in the package apport - 1.94-0ubuntu1

---------------
apport (1.94-0ubuntu1) precise; urgency=low

  [ Martin Pitt ]
  * New upstream release:
    - apport: Set the group of written reports to "whoopsie" if that group
      exists.
    - Fix tests to run properly against the system-installed modules and
      binaries.
    - test/run: Run under LC_MESSAGES=C to avoid test failures due to
      translated strings.
    - general-hooks/generic.py: Also attach xsession-errors for programs that
      link to libgtk-3.
    - launchpad.py: Properly handle "Expired" status, to avoid marking new
      bugs as duplicates of expired ones. (LP: #941854)
    - apport: Fix crash if the "whoopsie" group does not exist. (LP: #942326)
    - report.py, crash_signature(): Do not put "<module>" frames into Python
      crash signatures that happen outside of function/method calls. Fall back
      to the file/line number as a frame description instead. This will do a
      much better job at disambiguating e. g. different ImportError crashes.
      (LP: #920403)
    - Make "binary changed since the time of the crash" error message more
      comprehensible, thanks Paolo Rotolo. (LP: #942830)
    - crashdb.py, check_duplicate(): It can happen that a bug gets identified
      as being a duplicate of bug S by symbolic signatures and a duplicate of
      bug A by address signatures. Empirical evidence shows that this is due
      to the unavoidable jitter in stack traces (A and S not being identified
      as duplicates as their signatures differ slightly) and not a logic
      error. So instead of erroring out, duplicate all three bugs and keep the
      lowest number as the master ID. (LP: #943117)
    - Revert the usage of multiple nested threads during data collection, and
      switch back to only using one UI thread. The UI implementations can, and
      now do, decide between showing a spinner and showing a progress dialog
      in the ui_*_info_collection_progress() methods. This fixes libX11
      crashes when multiple UI threads do changes concurrently (LP: #901675),
      and also avoids multi-thread induced crashes in Pango (LP: #943661). The
      removal of the collect() method also fixes the new crashes in it.
      (LP: #942098, #939803)
    - ui.py, get_desktop_entry(): Fix crash on uninstalled package.
      (LP: #940984)
    - data/unkillable_shutdown: Fix crash on race condition when PID goes away
      while the report is created. (LP: #546369)
    - apport/hookutils.py, pci_devices(): Fix crash on unexpected lines from
      lspci. (LP: #904489)
    - Drop hardcoded "Ubuntu" words again which crept in with the whoopsie
      support merge. Use the DistroRelease: field.
    - apport-kde: Fix Home page URL in KApplication metadata.
    - apport-gtk: Fix resizability and size after hiding details.
      (LP: #405418)
    - test/run: Drop "local" argument. This now tests against the source tree
      when run in the source tree root, and against the system
      libraries/programs when run from anywhere else.
    - test/run: Consider command line arguments as test names and only run
      those when given. Also support just runni...

Read more...

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
JG (jdogzz-g5) wrote :

I got this error today with a fully updated system (upgrade and dist-upgrade).

Revision history for this message
Bri Easton (bribert10) wrote :

Occurred when clicking on "Update Manager"

Revision history for this message
Swâmi Petaramesh (swami-petaramesh) wrote :

Got it this morning (all updates applied) and yesterday evening on another system (all updates applied) while trying to report another "system software problem". apport crashes trying to report a bug, then reports a bug about itself ;-)

Revision history for this message
marcobra (Marco Braida) (marcobra) wrote :

i get this isse today on Ubuntu 12.04 fully updated/upgraded

Revision history for this message
BALTHAZAR Jean-Robert (balthazarprestations) wrote :

This occurs when sending bug report

Revision history for this message
Mike L (mikerl) wrote :

I still am getting this bug. Apport just reported it, and redirected me here. The fix must not work.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.