synaptic assert failure: synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed.

Reported by jiaguilera on 2010-01-13
This bug affects 618 people
Affects Status Importance Assigned to Milestone
xlibs
Confirmed
Medium
libx11 (Ubuntu)
Medium
Unassigned
Lucid
High
Unassigned
Natty
Medium
Unassigned
Oneiric
Medium
Unassigned

Bug Description

Binary package hint: synaptic

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu.

Description: Ubuntu lucid (development branch)
Release: 10.04

2) The version of the package you are using, via 'apt-cache policy packagename' or by checking in Synaptic.

synaptic:
  Installed: 0.63ubuntu2
  Candidate: 0.63ubuntu2
  Version table:
 *** 0.63ubuntu2 0
        500 http://archive.ubuntu.com lucid/main Packages
        100 /var/lib/dpkg/status

3) What you expected to happen

filter package list for packages matching some criteria

4) What happened instead

application crashes

#0 0x007d9422 in __kernel_vsyscall ()
No symbol table info available.
#1 0x05cfa5b1 in *__GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 resultvar = <value optimized out>
 pid = 98648052
 selftid = 6040
#2 0x05cfda12 in *__GI_abort () at abort.c:92
 act = {__sigaction_handler = {sa_handler = 0xbffa00b0,
    sa_sigaction = 0xbffa00b0}, sa_mask = {__val = {97783645, 104, 88,
      3220832672, 3220832460, 104, 88, 82, 157336880, 98648052, 82, 81,
      3220832632, 97714674, 157336888, 82, 3220832672, 157336888, 0,
      4222451712, 157336888, 157336888, 157336888, 157336888, 157336969,
      157336988, 157336888, 157336988, 0, 0, 0, 0}}, sa_flags = 0,
  sa_restorer = 0x20}
 sigs = {__val = {32, 0 <repeats 31 times>}}
#3 0x05cf3718 in *__GI___assert_fail (assertion=0x16927e5 "ret != inval_id",
    file=0x16927a9 "../../src/xcb_io.c", line=385,
    function=0x1692964 "_XAllocID") at assert.c:81
 buf = 0x960c538 "synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed.\n"
#4 0x01622cf9 in _XAllocID (dpy=0x9385600) at ../../src/xcb_io.c:385
 ret = 4294967295
 __PRETTY_FUNCTION__ = "_XAllocID"
#5 0x015f8288 in XCreatePixmap (dpy=0x9385600, d=56788585, width=252,
    height=24, depth=32) at ../../src/CrPixmap.c:58
No locals.
#6 0x00455e39 in _cairo_xlib_surface_create_similar_with_format (
    abstract_src=0x944c230, format=<value optimized out>, width=252,
    height=24) at /build/buildd/cairo-1.8.8/src/cairo-xlib-surface.c:155
 dpy = (Display *) 0x9385600
 pix = 154686976
 xrender_format = <value optimized out>
#7 0x0045ad6c in _cairo_xlib_surface_clone_similar (
    abstract_surface=0x944c230, src=0x955e648, src_x=0, src_y=0, width=252,
    height=24, clone_offset_x=0xbffa0568, clone_offset_y=0xbffa056c,
    clone_out=0xbffa08bc)
    at /build/buildd/cairo-1.8.8/src/cairo-xlib-surface.c:1201
 status = <value optimized out>
....

ProblemType: Crash
Architecture: i386
AssertionMessage: synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed.
Date: Wed Jan 13 11:52:41 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/sbin/synaptic
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20091209)
Package: synaptic 0.63ubuntu2
ProcAttrCurrent: unconfined (enforce)
ProcCmdline: /usr/sbin/synaptic
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-10.14-generic
Signal: 6
SourcePackage: synaptic
StacktraceTop:
 __kernel_vsyscall ()
 raise () from /lib/tls/i686/cmov/libc.so.6
 abort () from /lib/tls/i686/cmov/libc.so.6
 __assert_fail () from /lib/tls/i686/cmov/libc.so.6
 _XAllocID () from /usr/lib/libX11.so.6
Tags: lucid
Title: synaptic assert failure: synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed.
Uname: Linux 2.6.32-10-generic i686
UserGroups:

jiaguilera (jiaguilera) wrote :

StacktraceTop:
 __kernel_vsyscall ()
 *__GI_raise (sig=6)
 *__GI_abort () at abort.c:92
 *__GI___assert_fail (assertion=0x16927e5 "ret != inval_id",
 _XAllocID (dpy=0x9385600) at ../../src/xcb_io.c:385

Changed in synaptic (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
visibility: private → public
Dave Stroud (bigdavesr) wrote :

am up to date. Have experienced this when I try a search and also updating.

Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

Affecting to libxcb

affects: synaptic (Ubuntu) → libxcb (Ubuntu)
Bryce Harrington (bryce) wrote :

Hi jiaguilera,

Thanks for including the attached files. Could you also include your /var/log/Xorg.0.log (or Xorg.0.log.old) from after reproducing the issue?

Please attach the output of `lspci -vvnn` too.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: crash
tags: added: needs-xorglog
Timo Aaltonen (tjaalton) wrote :

I'm sure this was a dupe of bugs 458989 and 519576, closing. Fixed in lucid.

Changed in libxcb (Ubuntu):
status: New → Fix Released
Sebastien Bacher (seb128) wrote :

The issue seems to still be there on lucid

Changed in libxcb (Ubuntu):
status: Fix Released → Confirmed
Changed in libxcb (Ubuntu Lucid):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
importance: Medium → High
affects: libxcb (Ubuntu Lucid) → libx11 (Ubuntu Lucid)
Changed in libx11 (Ubuntu Lucid):
status: Confirmed → Triaged
Timo Aaltonen (tjaalton) wrote :

the one that I thought this was a dupe of was fixed by this:

http://cgit.freedesktop.org/xorg/lib/libXext/commit/?id=956fd30e1046e5779ac0b6c07ec4f0e87250869a

perhaps something similar is needed.

tags: added: iso-testing

libx11, 1.3.2 (sorry, I didn't see a libX11 component)

We are getting tons of crash reports in Ubuntu (https://launchpad.net/bugs/507062) about programs crashing with

  _XAllocID: Assertion `ret != inval_id' failed

At first we thought this would be the same problem that was recently discussed and fixed in libXext:

http://lists.freedesktop.org/archives/xcb/2009-October/005102.html
http://cgit.freedesktop.org/xorg/lib/libXext/commit/?id=956fd30e1046e5779ac0b6c07ec4f0e87250869a

However, we already have that fixed version, and the stack traces of above bug reports does not go through XShmAttach(), so it does seem to be a different cause.

They all have this piece in common:

#4 0xb74d7199 in _XAllocID (dpy=0x8116770) at ../../src/xcb_io.c:378
 ret = 4294967295
 __PRETTY_FUNCTION__ = "_XAllocID"
#5 0xb74ad048 in XCreatePixmap (dpy=0x8116770, d=265, width=24, height=24,
    depth=32) at ../../src/CrPixmap.c:58

i. e. they all come through XCreatePixmap() (which is called from various functions in the duplicate bugs, like XcursorImageLoadCursor(), _cairo_xlib_surface_create_similar_with_format(), etc.)

I checked that the current libX11's XCreatePixmap() already calls _XAllocID() in a LockDisplay() block, so it's not the same cause as the recent libXext fix.

Beyond that I'm afraid I don't know enough about this API to be able to continue debugging on my own. Obviously nothing must call _XAllocID() two times in succession without an _XIDHandler() in between (the only other place where next_xid is set is _XConnectXCB(), but that's only called on program initialization through XOpenDisplay(), right?)

Do you have some further hints how to debug this, or what could go wrong here?

For reference, here are some links to the full stack traces:
http://launchpadlibrarian.net/23717282/Stacktrace.txt
http://launchpadlibrarian.net/35702381/Stacktrace.txt
http://launchpadlibrarian.net/39577843/Stacktrace.txt
http://launchpadlibrarian.net/37855566/Stacktrace.txt

Thanks!

Martin Pitt (pitti) wrote :

Timo,

I checked our current libX11, and XCreatePixmap() already calls _XAllocID() inside a LockDisplay() block, so it seems that's not it?

Martin Pitt (pitti) wrote :

Looking at the stack traces, I'm convinced that bug 458989 and its dupes are not fixed, but duplicates of this bug. 458989 hasn't been closed with an upload, just with an "I do not get this any more", but since this bug happens randomy and there is no known reproducer, it's probably still relevant. Bug 519576 indeed seems like a related, but not identical problem, which was fixed with the referenced upstream patch.

Martin Pitt (pitti) wrote :

Does anyone have a recipe how to reproduce these crashes?

Martin Pitt (pitti) wrote :

(not "triaged" yet -- the bug isn't understood, and no reproducer)

Changed in libx11 (Ubuntu Lucid):
status: Triaged → Incomplete
Thomas N (konstigt) wrote :

Hello

I can actually not find in my emails how I got subscribed to this bug but if it's the one with core dump every time you install a package (I think I reported a duplicate) I get it every time I use aptitude from terminal.

*** glibc detected *** aptitude: double free or corruption (!prev): 0x098aebd0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b581)[0x676581]
/lib/tls/i686/cmov/libc.so.6(+0x6cdd8)[0x677dd8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x67aebd]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x388741]
/usr/lib/libstdc++.so.6(_ZdaPv+0x1d)[0x38879d]
aptitude[0x81693bf]
aptitude[0x81872dd]
aptitude[0x8183512]
aptitude[0x81492a0]
aptitude[0x8120f94]
aptitude[0x805f2af]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x621bd6]
aptitude[0x805c6a1]

..and so on.

It would be really nice to know where the last call to XIDAlloc was before the one that fails, and for that I'd love to have a minimal test case.

Any chance these applications are using libX11 from more than one thread? I notice in some stack traces, like <http://launchpadlibrarian.net/31837770/ThreadStacktrace.txt> that a second thread is waiting in libpulse; and in <http://launchpadlibrarian.net/31032259/ThreadStacktrace.txt>, g_main_loop_run is in a different thread than the cairo call that precedes the assert.

I could believe there's a race in how Xlib asks XCB for XIDs, but I'd like to know if that would be a plausible explanation for the reports you're actually seeing. It looks like a fair number of the reported stack traces are single-threaded, making that an unlikely explanation for those reports. :-) It's possible there are two separate bugs here, I suppose...

In lieu of a minimal test, perhaps you can tell me which X extensions these applications have in common? Perhaps the client library for some extension allocates an XID but is missing a SyncHandle call; if the next X request also tries to allocate an XID you'd get this assertion failure.

I've just reviewed everything in xorg/lib, just in case, for bad use of SyncHandle, XAllocID, or XAllocIDs. I found quite a few things to quibble with, but nothing that seems likely to have caused these reports. I've pushed fixes in these modules, so you can check whether anything there seems plausible.

libXcomposite/
libXdamage/
libXext/
libXfixes/
libXi/
libXrender/
libXTrap/

In short, I don't have a good hypothesis yet.

> http://launchpadlibrarian.net/23717282/Stacktrace.txt

I'm ignoring this one: the application was exiting, and a destructor tried to access the Display to free a resource. I'd guess the display was already gone at that point. I've seen that kind of pattern in quite a few Qt stack traces.

Thomas; I am not an IT guy. Talk of synatic assert failure and subscribing to a bug is all Greek to me. At times I've received a notice of a bug on my computer and reported the fact, but no knowledge of any action needed from me.  My use of the computer is e-mails. Bill Kiskaddon.
--- On Fri, 4/9/10, ThomasNovin <email address hidden> wrote:

From: ThomasNovin <email address hidden>
Subject: [Bug 507062] Re: synaptic assert failure: synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed.
To: <email address hidden>
Date: Friday, April 9, 2010, 11:25 AM

Hello

I can actually not find in my emails how I got subscribed to this bug
but if it's the one with core dump every time you install a package (I
think I reported a duplicate) I get it every time I use aptitude from
terminal.

*** glibc detected *** aptitude: double free or corruption (!prev): 0x098aebd0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b581)[0x676581]
/lib/tls/i686/cmov/libc.so.6(+0x6cdd8)[0x677dd8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x67aebd]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x388741]
/usr/lib/libstdc++.so.6(_ZdaPv+0x1d)[0x38879d]
aptitude[0x81693bf]
aptitude[0x81872dd]
aptitude[0x8183512]
aptitude[0x81492a0]
aptitude[0x8120f94]
aptitude[0x805f2af]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x621bd6]
aptitude[0x805c6a1]

..and so on.

--
synaptic assert failure: synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed.
https://bugs.launchpad.net/bugs/507062
You received this bug notification because you are a direct subscriber
of a duplicate bug.

(In reply to comment #1)
> It would be really nice to know where the last call to XIDAlloc was before the
> one that fails, and for that I'd love to have a minimal test case.

Indeed; I'm afraid I can't say more about this myself, but I asked for a reproduction recipe on the downstream bug a few days ago. Once we have a way to reproduce this, we can strip that down to a test case.

> Any chance these applications are using libX11 from more than one thread?

Some certainly do, but amongst the many duplicates are a lot of progams which are single-threaded; for example services-admin (from gnome-system-tools, LP#432122) or gigolo (LP#468544)

> It looks like a fair number of the reported stack traces are
> single-threaded, making that an unlikely explanation for those reports. :-)
> It's possible there are two separate bugs here, I suppose...

Possibly. It seems that about half of the reports are in gnome-panel and firefox, but since they are also much more popular than the apps mentioned above that kind of bias is expected.

> In lieu of a minimal test, perhaps you can tell me which X extensions these
> applications have in common? Perhaps the client library for some extension
> allocates an XID but is missing a SyncHandle call; if the next X request also
> tries to allocate an XID you'd get this assertion failure.

The bugs unfortunately don't have Xorg logs, but I don't think that they will differ that much between different installations. I searched Launchpad for a few Xorg logs for various drivers, and in fact for a given graphics driver the extension lists were exactly identical (I took samples of about 5 per driver):

common for intel, ati, fglrx, nvidia: MIT-SCREEN-SAVER XFree86-VidModeExtension XFree86-DGA DPMS XVideo XVideo-MotionCompensation X-Resource DOUBLE-BUFFER GLX RECORD XFree86-DRI DRI2

extra extensions for fglrx: ATIFGLRXDRI FGLRXEXTENSION GLESX AMDXVOPL (I suppose those are uninteresting)

I asked in the downstram bug for a few Xorg logs from those people who can reproduce the crash. Perhaps it will turn out that they are all using the same graphics driver.

(In reply to comment #2)
> > In lieu of a minimal test, perhaps you can tell me which X extensions these
> > applications have in common? Perhaps the client library for some extension
> > allocates an XID but is missing a SyncHandle call; if the next X request also
> > tries to allocate an XID you'd get this assertion failure.
>
> I asked in the downstram bug for a few Xorg logs from those people who can
> reproduce the crash. Perhaps it will turn out that they are all using the same
> graphics driver.

I don't expect it to be a server-side issue, but then there was a recent report that turned out to be a byte-swapping bug in the server, and I didn't expect it then either... :-)

I meant, which extensions are these applications actually using? I'm hoping to pin the blame on a client-side extension library rather than libX11 itself. ;-) The list of loaded libraries from GDB would be a start. Is there some Launchpad way to download all the attachments from all the public duplicate bugs at once?

I don't have very high hopes though, especially after I went through checking for SyncHandle bugs in every extension library I could find, last week.

Regardless, I hope your effort to get more information from downstream bug reporters works out.

Martin Pitt (pitti) wrote :

Could some people who got a crash like this please attach their /var/log/Xorg.0.log? I'm interested in seeing whether this only affects particular video drivers/graphics cards, or only particular extensions. Thank you!

W. Scott Lockwood III (wsl3) wrote :

xorg.0.log as requested.

W. Scott Lockwood III (wsl3) wrote :

And here is the old xorg.0.log that was rotated in case it contains anything valuable.

Robert Sander (gurubert) wrote :

old xorg logfile

fredrik (fredrik-pipemore) wrote :

Attach my xorg as requested
//Fredrik

Just to collect more puzzle pieces, I got three replies by now about my "which driver" question, and these three are all using the proprietary NVIDIA driver. It might be just pure luck with a sample size of three, of course, so I asked whether anyone who got this crash has a different card/driver.

(In reply to comment #3)

> I meant, which extensions are these applications actually using? I'm hoping to
> pin the blame on a client-side extension library rather than libX11 itself. ;-)
> The list of loaded libraries from GDB would be a start.

We routinely collect /proc/<pid>/maps in crash reports, they all have a "ProcMaps.txt" attachment. However, this just says which libraries the program dynamically links against, not which extensions it's actually using, right?

Is there a better way to see which extensions a program is currently using? Some command that I could ask the bug reporters to run? We could even add that to our standard Apport hooks, so that it's collected for all crash reports.

> Is there some Launchpad way to download all the attachments from all the public duplicate bugs at once?

Bryce Harrington (CC added) has put together a lot of scripts for these purposes (X.org bug triaging). Bryce, do you have a script like that?

Anyway, it's really easy using the Python API, so for this particular purpose I wrote a quick hack which downloads a particular attachment name from a bug and all its duplicates and dumps them to stdout:

$ ./cat-bugattachment.py 507062 ProcMaps.txt
---- 507062 ---
00110000-001ae000 r-xp 00000000 08:05 526394 /usr/lib/libgdk-x11-2.0.so.0.1902.0
[...]
---- 340441 ---
00400000-00408000 r-xp 00000000 09:01 94936 /usr/lib/firefox-3.0.7/firefox
[...]

and so on. The script takes the master bug number and an attachment name, I put it on http://people.canonical.com/~pitti/scripts/cat-bugattachment.py for now.

When I do some simple post-processing of the output of above command (which I directed into file "out") I get this:

$ grep lib/libX out | awk '{print $6}' | sort -u
/usr/lib/libX11.so.6.2.0
/usr/lib/libX11.so.6.3.0
/usr/lib/libXau.so.6.0.0
/usr/lib/libXcomposite.so.1.0.0
/usr/lib/libXcursor.so.1.0.2
/usr/lib/libXdamage.so.1.1.0
/usr/lib/libXdmcp.so.6.0.0
/usr/lib/libXext.so.6.4.0
/usr/lib/libXfixes.so.3.1.0
/usr/lib/libXft.so.2.1.13
/usr/lib/libXinerama.so.1.0.0
/usr/lib/libXi.so.6.0.0
/usr/lib/libXi.so.6.1.0
/usr/lib/libXmu.so.6.2.0
/usr/lib/libXrandr.so.2.2.0
/usr/lib/libXrender.so.1.3.0
/usr/lib/libXRes.so.1.0.0
/usr/lib/libXss.so.1.0.0
/usr/lib/libXt.so.6.0.0
/usr/lib/libXtst.so.6.1.0
/usr/lib/libXxf86misc.so.1.1.0
/usr/lib/libXxf86vm.so.1.0.0

Not sure how helpful that actually is, though, since those are still a fair number of extensions.

Thank you!

(In reply to comment #4)
> Just to collect more puzzle pieces, I got three replies by now about my "which
> driver" question, and these three are all using the proprietary NVIDIA driver.
> It might be just pure luck with a sample size of three, of course, so I asked
> whether anyone who got this crash has a different card/driver.

Got another reply that someone is using Intel, so let's discard the "driver dependent" theory for now.

> $ grep lib/libX out | awk '{print $6}' | sort -u

Ah, BS, sorry. We want the intersection, not the union.

$ sed -n '/^-/ p; /lib\/libX/ { s/^.*usr.lib.//; s/\.so\..*$//; p}' out|uniq|less

By inspection, it seems that those bugs have only a very small set:

---- 528503 ---
libXfixes
libXrender
libXcursor
libXdmcp
libXau
libX11
---- 558407 ---
libXt
libXext
libX11
libXmu
libXau
libXdmcp

So I believe the common set is libXdmcp, libXau, and libX11 itself.

Martin Pitt (pitti) wrote :

Thanks Scott, Robert, fredrik. The three of you are all using the proprietary Nvidia driver. It might be a coincidence, or just pure luck with a sample size of three. :-) Did anyone here experience this kind of crash who is _not_ using the proprietary driver? I. e. either an NVidia card with the free default driver (Nouveau), or an ATI/Intel card? Thank you!

I will test an open source driver. Testing beta 2 now

On Apr 16, 2010 4:36 AM, "Martin Pitt" <email address hidden> wrote:

Thanks Scott, Robert, fredrik. The three of you are all using the
proprietary Nvidia driver. It might be a coincidence, or just pure luck
with a sample size of three. :-) Did anyone here experience this kind of
crash who is _not_ using the proprietary driver? I. e. either an NVidia
card with the free default driver (Nouveau), or an ATI/Intel card? Thank
you!

-- synaptic assert failure: synaptic: ../../src/xcb_io.c:385: _XAllocID:
Assertion `ret != inval_i...

Yes, I have the Intel GMA 500 integrated chipset on my PC.

On 16 April 2010 09:29, Martin Pitt <email address hidden> wrote:

> Thanks Scott, Robert, fredrik. The three of you are all using the
> proprietary Nvidia driver. It might be a coincidence, or just pure luck
> with a sample size of three. :-) Did anyone here experience this kind of
> crash who is _not_ using the proprietary driver? I. e. either an NVidia
> card with the free default driver (Nouveau), or an ATI/Intel card? Thank
> you!
>
> --
> synaptic assert failure: synaptic: ../../src/xcb_io.c:385: _XAllocID:
> Assertion `ret != inval_id' failed.
> https://bugs.launchpad.net/bugs/507062
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in Modular X11 Libraries: Unknown
> Status in “libx11” package in Ubuntu: Incomplete
> Status in “libx11” source package in Lucid: Incomplete
>
> Bug description:
> Binary package hint: synaptic
>
> 1) The release of Ubuntu you are using, via 'lsb_release -rd' or System ->
> About Ubuntu.
>
> Description: Ubuntu lucid (development branch)
> Release: 10.04
>
> 2) The version of the package you are using, via 'apt-cache policy
> packagename' or by checking in Synaptic.
>
> synaptic:
> Installed: 0.63ubuntu2
> Candidate: 0.63ubuntu2
> Version table:
> *** 0.63ubuntu2 0
> 500 http://archive.ubuntu.com lucid/main Packages
> 100 /var/lib/dpkg/status
>
> 3) What you expected to happen
>
> filter package list for packages matching some criteria
>
> 4) What happened instead
>
> application crashes
>
> ProblemType: Crash
> Architecture: i386
> AssertionMessage: synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion
> `ret != inval_id' failed.
> Date: Wed Jan 13 11:52:41 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/sbin/synaptic
> InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20091209)
> Package: synaptic 0.63ubuntu2
> ProcAttrCurrent: unconfined (enforce)
> ProcCmdline: /usr/sbin/synaptic
> ProcEnviron:
> PATH=(custom, no user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.32-10.14-generic
> Signal: 6
> SourcePackage: synaptic
> StacktraceTop:
> __kernel_vsyscall ()
> raise () from /lib/tls/i686/cmov/libc.so.6
> abort () from /lib/tls/i686/cmov/libc.so.6
> __assert_fail () from /lib/tls/i686/cmov/libc.so.6
> _XAllocID () from /usr/lib/libX11.so.6
> Tags: lucid
> Title: synaptic assert failure: synaptic: ../../src/xcb_io.c:385:
> _XAllocID: Assertion `ret != inval_id' failed.
> Uname: Linux 2.6.32-10-generic i686
> UserGroups:
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/xlibs/+bug/507062/+subscribe
>

Apologies, GMA 950.

On 16 April 2010 09:40, David Pothecary <email address hidden> wrote:

> Yes, I have the Intel GMA 500 integrated chipset on my PC.
>
>
> On 16 April 2010 09:29, Martin Pitt <email address hidden> wrote:
>
>> Thanks Scott, Robert, fredrik. The three of you are all using the
>> proprietary Nvidia driver. It might be a coincidence, or just pure luck
>> with a sample size of three. :-) Did anyone here experience this kind of
>> crash who is _not_ using the proprietary driver? I. e. either an NVidia
>> card with the free default driver (Nouveau), or an ATI/Intel card? Thank
>> you!
>>
>> --
>> synaptic assert failure: synaptic: ../../src/xcb_io.c:385: _XAllocID:
>> Assertion `ret != inval_id' failed.
>> https://bugs.launchpad.net/bugs/507062
>> You received this bug notification because you are a direct subscriber
>> of a duplicate bug.
>>
>> Status in Modular X11 Libraries: Unknown
>> Status in “libx11” package in Ubuntu: Incomplete
>> Status in “libx11” source package in Lucid: Incomplete
>>
>> Bug description:
>> Binary package hint: synaptic
>>
>> 1) The release of Ubuntu you are using, via 'lsb_release -rd' or System ->
>> About Ubuntu.
>>
>> Description: Ubuntu lucid (development branch)
>> Release: 10.04
>>
>> 2) The version of the package you are using, via 'apt-cache policy
>> packagename' or by checking in Synaptic.
>>
>> synaptic:
>> Installed: 0.63ubuntu2
>> Candidate: 0.63ubuntu2
>> Version table:
>> *** 0.63ubuntu2 0
>> 500 http://archive.ubuntu.com lucid/main Packages
>> 100 /var/lib/dpkg/status
>>
>> 3) What you expected to happen
>>
>> filter package list for packages matching some criteria
>>
>> 4) What happened instead
>>
>> application crashes
>>
>> ProblemType: Crash
>> Architecture: i386
>> AssertionMessage: synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion
>> `ret != inval_id' failed.
>> Date: Wed Jan 13 11:52:41 2010
>> DistroRelease: Ubuntu 10.04
>> ExecutablePath: /usr/sbin/synaptic
>> InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20091209)
>> Package: synaptic 0.63ubuntu2
>> ProcAttrCurrent: unconfined (enforce)
>> ProcCmdline: /usr/sbin/synaptic
>> ProcEnviron:
>> PATH=(custom, no user)
>> LANG=en_US.UTF-8
>> SHELL=/bin/bash
>> ProcVersionSignature: Ubuntu 2.6.32-10.14-generic
>> Signal: 6
>> SourcePackage: synaptic
>> StacktraceTop:
>> __kernel_vsyscall ()
>> raise () from /lib/tls/i686/cmov/libc.so.6
>> abort () from /lib/tls/i686/cmov/libc.so.6
>> __assert_fail () from /lib/tls/i686/cmov/libc.so.6
>> _XAllocID () from /usr/lib/libX11.so.6
>> Tags: lucid
>> Title: synaptic assert failure: synaptic: ../../src/xcb_io.c:385:
>> _XAllocID: Assertion `ret != inval_id' failed.
>> Uname: Linux 2.6.32-10-generic i686
>> UserGroups:
>>
>> To unsubscribe from this bug, go to:
>> https://bugs.launchpad.net/xlibs/+bug/507062/+subscribe
>>
>
>

David Pothecary [2010-04-16 8:57 -0000]:
> Apologies, GMA 950.

Thanks. So let's discard the idea that this is driver specific.

I followed up on the upstream bug with some analysis of all the
duplicates and the used client-side extensions.

Robert Sander (gurubert) wrote :

Hi,

I reported bug #484387 back in November. To trace the issue I also tried the open source nv driver for X, but it also crashed:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-180/+bug/484387/comments/4

Paul Broadhead (pjbroad) wrote :
Robert Sander (gurubert) wrote :

I just experienced another crash using the nv driver.

This often happens when a second user is active. The session of the first user crashes. I suspect my IM client (kopete) and its notifications, but that's not reproducible.

Just for the record, I also got the bug without the nvidia proprietary driver. (I'm using the graphics integrated into the Core i5 CPU. I think it's "Arrandale", but might be misremembering -- commenting on this bug from another computer.)

Bryce Harrington (bryce) on 2010-04-29
description: updated
Changed in libx11 (Ubuntu Lucid):
assignee: Canonical Desktop Team (canonical-desktop-team) → Chris Halse Rogers (raof)
Chris Halse Rogers (raof) wrote :

There has recently been work done upstream to fix these sort of bugs. I've pushed some testing packages incorporating these fixes to https://edge.launchpad.net/~raof/+archive/aubergine/+packages.

These changes look pretty extensive, so it might not be possible to push an SRU fixing this, but it would be good to get some testing.

There are similar error messages over on bug #419501 and these packages fix at least one testcase posted there.

Bryce Harrington (bryce) wrote :

xcb has a history of threading problems, and the bug reported here is probably no exception.

bug #86103 - Locking assertions caused java to totally break. We held off on shipping libxcb-enablement for libx11 for some time due to this bug, until java could be sufficiently fixed to work around it.

bug #87947 - when we finally enabled libxcb in libx11 (we needed it in order to start using Compiz) it spawned a slew of bug reports about locking problems, particularly in (older?) java apps. The main issues were resolved and remaining ones deferred to 185311

bug #185311 - more locking problems. We worked with upstream to resolve many of the asserts and issues that were reported. See comment #156 in particular as my analysis of the issue. Ultimately we "solved" it by switching to sloppy locking.

bug #232364 - A libxcb race condition in dbus plagued several different apps. We figured out we could workaround it by adjusting the order that afflicted apps started things up.

Anyway, I don't know if this history lesson is of much use for the current bug in question, but in case it gives insights or just context, here you go.

Bryce Harrington (bryce) on 2010-04-30
Changed in libx11 (Ubuntu Lucid):
status: Incomplete → Triaged
Changed in libx11 (Ubuntu):
assignee: Chris Halse Rogers (raof) → nobody
Changed in libx11 (Ubuntu Lucid):
assignee: Chris Halse Rogers (raof) → nobody

The same problem has been reported for ktorrent:

https://bugs.kde.org/show_bug.cgi?id=242306

(In reply to comment #6)
> The same problem has been reported for ktorrent:
>
> https://bugs.kde.org/show_bug.cgi?id=242306

In that bug report, you wrote, "Nothing we can do about, the X people have to figure this one out." You could try providing information I've asked for in this bug. Above all, if I have a minimal test application that demonstrates the bug, I'm likely to be able to fix it quickly.

As things stand now, I can't reproduce the problem and I have no reasonable hypotheses about its cause, so it is unlikely that I'll be able to fix it.

One thing I hadn't asked for yet that might help: Run a failing application under `xtrace` and attach the log to this bug.

Changed in xlibs:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in xlibs:
importance: Medium → Unknown
Changed in xlibs:
importance: Unknown → Medium
Paul White (paulw2u) on 2011-03-28
tags: added: natty
Changed in libx11 (Ubuntu Natty):
milestone: none → ubuntu-11.04-beta-2
Martin Pitt (pitti) on 2011-04-08
Changed in libx11 (Ubuntu Natty):
importance: High → Medium
milestone: ubuntu-11.04-beta-2 → none
Timo Aaltonen (tjaalton) on 2011-04-15
Changed in libx11 (Ubuntu Natty):
status: Triaged → Incomplete
Timo Aaltonen (tjaalton) on 2011-04-15
Changed in libx11 (Ubuntu Natty):
status: Incomplete → Triaged
39 comments hidden view all 119 comments
Leo E. Larios (larios-leo) wrote :

upon login to my acct

Leo E. Larios (larios-leo) wrote :

upon logging in to my acct

Gary M (garym) on 2011-09-25
tags: added: oneiric
Andre Fernandez (zookafg3) wrote :

After installation, performed all the updates and upgrades, rebooted with out problems, then install JAVA jre and SDK, restarted and signed in to gnome and the problem started. I have a 32 bit machine, downloaded on sept 23rd iso beta 2.

Mike Kupfer (mkupfer37) wrote :

After upgrading from Natty to Oneiric today, I got this failure once in a Unity 2D session. I clicked on the trash icon in the Launcher. This brought up a file manager chooser (Nautilus, Thunar, PCMan FM). I clicked on Cancel. I then emptied the trash (right-clicked on the trash icon, etc).

A short time later, I clicked on the Dash icon in the Launcher, then clicked on the "x" to close the bottom portion of the Dash (Media Apps etc). This left the top portion (Search) displayed. Then in fairly quick succession I clicked on the desktop and on the session control icon in the far right of the top panel. The Search portion of the Dash disappeared, the session management menu came up, and another window came up saying that Nautilus had died. I eventually got taken to this bug in Launchpad.

I haven't been able to reproduce the failure.

This was in a VirtualBox image. The host is running Lucid; 32-bit hardware.

Jeffrey Tees (jeff-tees) wrote :

I got this error after running an update on 11.10-->Update Manager-->Chose Restart From 'Power' Menu due to message 'This system needs a restart to apply updates' (Unity). After Reboot I logged into Gnome3 and this error popped up almost immediately.

A H (ah-c) wrote :

I get when running NX client from www.nomachine.com and attempting to switch to full screen.

sayth (flebber-crue) wrote :

i had thought this bug was related to ATI drivers, as my gnome shell is corrupted and this is a known ATI driver issue which was supposed to be solved in the latest ATI 11-9 catalyst.

Shelby Cain (alyandon) wrote :

Using nx client here with x2go packages. Error occurred with no interaction on my part. Firefox was open and the system was otherwise idle.

Another "me too". Installed from 2nd beta 32-bit iso today and applied all the updates, switched to pae kernel.
$ uname -svrp
Linux 3.0.0-12-generic-pae #19-Ubuntu SMP Fri Sep 23 23:10:56 UTC 2011 i686
$ lsb_release -ds
Ubuntu oneiric (development branch)
$ lspci -nn | grep VGA
01:00.0 VGA compatible controller [0300]: nVidia Corporation GT218 [GeForce 210] [10de:0a65] (rev a2)

Was running jockey when the crash happened.

Extender (msveshnikov) wrote :

In my case synaptic is closed with
terminate called after throwing an instance of 'std::out_of_range'
  what(): vector::_M_range_check
Аварийный останов (core dumped)
just after launch (1 second)

18 comments hidden view all 119 comments
16 comments hidden view all 119 comments
juliobispo (juliobispo) wrote :

The problem happened when I was putting the icon on the favorites in the Gnome interface.

Paul (p37307) wrote :

I got this bug after a Landscape restart.

karaluh (karaluh) wrote :

It's 100% reproducable for me with OnericKDE and Google Earth.

This happens to me on a Precise i386 system in gnome-fallback. gnome-panel crashes, probably on logout. Apport informed me that this was the bug I was trying to report, but before that I had reported two bugs with bad stack traces, which contain more detailed descriptions of the events leading to the crash; in case that's relevant, those duplicates are bug 876799 and bug 887189.

tags: added: precise

To clarify https://bugs.launchpad.net/ubuntu/+source/libx11/+bug/507062/comments/94, both bugs are duplicates of this and contain detailed descriptions, but only bug 887189 is in Precise.

As a separate matter, it's interesting how, looking here and at public duplicates, this bug appears to happen far more often on i386 than amd64. There is, however, a Natty amd64 system (duplicate bug 736997), as well as a Maverick amd64 system that probably shouldn't be considered a duplicate (bug 659397), and even a Maverick powerpc system (duplicate bug 659060).

tags: added: amd64 maverick powerpc

I'm also getting this as a nautilus crash on an Oneiric i386 system, reported some of the time when I log in to an Xubuntu session after having previously been logged in to a Unity, Unity 2D, GNOME, or GNOME Classic session.

Bryce Harrington (bryce) wrote :

Eliah, thanks for the analysis you've done, that's quite helpful. You mention that the bug you encountered is "almost certainly" a dupe of this one, however looking at both bug 876799 and bug 887189, I'm not immediately spotting clear evidence that it is indeed a dupe. Would you mind elaborating on how you're determining it?

From the stacktraces on your bug reports, it looks like the only thing in common is the _kernel_vsyscall line, but that could mean anything. What really must match in your backtrace for it to be a dupe is this bit:

#3 0x05cf3718 in *__GI___assert_fail (assertion=0x16927e5 "ret != inval_id",
    file=0x16927a9 "../../src/xcb_io.c", line=385,
    function=0x1692964 "_XAllocID") at assert.c:81
 buf = 0x960c538 "synaptic: ../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed.\n"

I suspect the "Assertion `ret != inval_id' failed." error message should show up in one of your logs (probably .xsession-errors, but also check /var/log/lightdm/* and /var/log/Xorg.0.log).

I'm going to drop the 'precise' tag until there is stronger verification that the bug does exist.

tags: removed: precise
Bryce Harrington (bryce) wrote :

Fwiw, the code in question where the assert is being hit is:

static const XID inval_id = ~0UL;

/* _XAllocID - resource ID allocation routine. */
XID _XAllocID(Display *dpy)
{
        XID ret = dpy->xcb->next_xid;
        assert (ret != inval_id);
        dpy->xcb->next_xid = inval_id;
        _XSetPrivSyncFunction(dpy);
        return ret;
}

So it looks like cairo is calling into X holding an invalid X id, and this trips the assert. libx11 is certainly catching the error, but might not be the root cause of the problem. The question is why does dpy->xcb hold an invalid next_xid - backtraces aren't going to help answer that, I think it'll need some deeper examination of the execution flow either in gdb or with printf's sprinkled in strategic places.

Alternatively, looking at cairo-1.8.8/src/cairo-xlib-surface.c:155 might turn up something as to why the Display object has invalid xids in it.

Any chances to fix libXcb in LTS Lucid?!

Bib (bybeu) wrote :

Trying to find why the bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/765813 recently came to my PC:
I logged in Ubuntu Classic no effects
This bug maybe related to huge log saturation : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/765813/comments/14

I've seen a nautilus related error popup . I was guided here .

xorg.0.log below

Bib (bybeu) wrote :

as required

yamo (stephane-gregoire) wrote :

Bib, I do not see any error :

$ grep '\(EE\|WW\)' /tmp/Xorg.0.log
 (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 1688.342] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 1688.351] (II) Loading extension MIT-SCREEN-SAVER
[ 1705.701] (II) XKB: reuse xkmfile /var/lib/xkb/server-2C44DA88DF8F3B7D39C8A6DC19EE93B455864072.xkm

Th. Sievers (th-sievers) wrote :

also 12.04 GNOME session, crashreport after login

dust (hannes-b) wrote :

the whole desktop crashed closing all applications and losing the data of the open applications

Paul (p37307) wrote :

I got this bug for the first time after install of tonight's updates listed below.

What I did was log-off and restart my computer, then opened dash home. I am not sure if Unity is the culprit, just adding to this report.

Updates:
unity (4.24.0-0ubuntu2.1 to 4.28.0-ubuntu2)
unity-services (4.24.0-0ubuntu2.1 to 4.28.0-ubuntu2)
libunity-core-4.0-4 (4.24.0-0ubuntu2.1 to 4.28.0-ubuntu2)
unity-common (4.24.0-0ubuntu2.1 to 4.28.0-ubuntu2)

JoseLuisTriana (theunfor) wrote :

I have annoying messages when I start session that something goes wrong, then apport sends me to this page.

Using Ubuntu 11.10 32 .bit.

This happens in Unity, Gnome-shell, Gnome classic, everything that uses gnome core.

Sad to say, folks, that I've been seeing this bug VERY intermittently on multiple generations of hardware, although I think I can safely make these assertions:
-only since GTK became widespread (this definitely did not occur back in the Athena, Motif, OpenWindows, etc. days)
 **specifically, I don't think I've ever seen this bug appear when I wasn't running GTK+-linked or GTK2-linked software**
-only since GL extensions became widespread (including software, e.g. MESA)
-mostly but not exclusively on Linux systems (at least once under Solaris shortly after GNOME became the default desktop)
-some (hardware) systems tended to produce this error more than others
-certain applications tend to cause it more often than others (notably Synaptic, per the Ubuntu reports)
-I *think* higher compiler optimization causes it to happen more often, not sure
-not exclusively on multiprocessor systems: I've definitely seen this error on a Pentium III 1.0GHz (ULV mobile) and a Sparc IIi (~400MHz?).

It's almost certainly a race condition, since nothing else would produce this sort of intermittent behaviour across 10+ years and multiple hardware platforms.
It may not be a regression - it's likely we're dealing with a design flaw that has existed since <some piece of code> was written, but is being triggered more and more often because of the proliferation of multiprocessor platforms with multithreaded libs and multithread-generating-compilers.

Unfortunately, this all means that finding it will be nearly impossible. So much for the "all bugs are shallow" theory :-).

Or it could just be something low-level in GTK, which would explain why it's been cropping up more and more.

1 comments hidden view all 119 comments

Thanks Adam...

On a slightly different but still a little connected topic... just how
resistent to viruses/virii is LINUX namely UBUNTU 11.04???

I have reverted to this version from 11.10 as I prefer all the
widgets... Am using the KDE desktop although it does run a little slower
than the GDE DT...

Are there are hints etc that you may be able to offer about keeping all
the dangerous things out???

regards

arthur

On 02/23/2012 05:16 PM, Adam Thompson wrote:
> Sad to say, folks, that I've been seeing this bug VERY intermittently on multiple generations of hardware, although I think I can safely make these assertions:
> -only since GTK became widespread (this definitely did not occur back in the Athena, Motif, OpenWindows, etc. days)
> **specifically, I don't think I've ever seen this bug appear when I wasn't running GTK+-linked or GTK2-linked software**
> -only since GL extensions became widespread (including software, e.g. MESA)
> -mostly but not exclusively on Linux systems (at least once under Solaris shortly after GNOME became the default desktop)
> -some (hardware) systems tended to produce this error more than others
> -certain applications tend to cause it more often than others (notably Synaptic, per the Ubuntu reports)
> -I *think* higher compiler optimization causes it to happen more often, not sure
> -not exclusively on multiprocessor systems: I've definitely seen this error on a Pentium III 1.0GHz (ULV mobile) and a Sparc IIi (~400MHz?).
>
> It's almost certainly a race condition, since nothing else would produce this sort of intermittent behaviour across 10+ years and multiple hardware platforms.
> It may not be a regression - it's likely we're dealing with a design flaw that has existed since<some piece of code> was written, but is being triggered more and more often because of the proliferation of multiprocessor platforms with multithreaded libs and multithread-generating-compilers.
>
> Unfortunately, this all means that finding it will be nearly impossible.
> So much for the "all bugs are shallow" theory :-).
>
> Or it could just be something low-level in GTK, which would explain why
> it's been cropping up more and more.
>

1 comments hidden view all 119 comments
dino99 (9d9) wrote :

on Precise i386 logged as gnome-classic:

nautilus: ../../src/xcb_io.c :528 : _XAllocID: L'assertion « ret != inval_id » a échoué.

tags: added: precise
dino99 (9d9) on 2012-03-12
tags: removed: crash needs-xorglog
dino99 (9d9) wrote :

Got a new crash on Precise i386 logged as gnome-classic, with nautilus 3.4.0

reported as bug #969824

Paul Crawford (psc-sat) wrote :

In my case crash was gnome-panel but same message "gnome-panel assert failure: gnome-panel: ../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed." so I guess its the same bug.

Running 10.04 LTS 32-bit on AMD CPU.

dino99 (9d9) on 2012-06-26
tags: added: quantal
1 comments hidden view all 119 comments
Paul Crawford (psc-sat) wrote :

Happened again today, presumably nothing has been done to fix anything? LTS?

Bib (bybeu) wrote :

One less affected (no more): PC died

dino99 (9d9) wrote :
tags: removed: maverick natty oneiric
Changed in libx11 (Ubuntu Natty):
status: Triaged → Invalid
Changed in libx11 (Ubuntu Oneiric):
status: Triaged → Invalid
Andrew Fossey (andrewfossey) wrote :

Still not fixed.

Changed in libx11 (Ubuntu):
status: Triaged → New
papukaija (papukaija) wrote :

@Khalid: Please do not change bugs' statuses without a comment. Thanks in advance.

@bug-control: Could you please reset this bug's status to Triaged for libx11 (Ubuntu)? Thanks in advance.

Changed in libx11 (Ubuntu):
status: New → Triaged
Displaying first 40 and last 40 comments. View all 119 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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