software-center crashed with signal 5 in _XError()

Bug #834403 reported by James Schriver
426
This bug affects 107 people
Affects Status Importance Assigned to Milestone
libcanberra (Ubuntu)
Fix Released
Undecided
Unassigned
software-center (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Start U-S-C > Launches briefly > Crash

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: software-center 4.1.20
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
NonfreeKernelModules: wl
Architecture: amd64
CrashCounter: 1
Date: Fri Aug 26 01:28:11 2011
ExecutablePath: /usr/share/software-center/software-center-gtk3
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110803.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-center-gtk3
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 5
SourcePackage: software-center
StacktraceTop:
 ?? () from /usr/lib/libgdk-3.so.0
 ?? () from /usr/lib/libgdk-3.so.0
 _XError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
 ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
 _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
Title: software-center-gtk3 crashed with signal 5 in _XError()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
James Schriver (dashua) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 _gdk_x11_display_error_event (display=<optimized out>, error=<optimized out>) at /build/buildd/gtk+3.0-3.1.12/./gdk/x11/gdkdisplay-x11.c:2374
 gdk_x_error (error=0x7fff50bf0dc0, xdisplay=<optimized out>) at /build/buildd/gtk+3.0-3.1.12/./gdk/x11/gdkmain-x11.c:312
 gdk_x_error (xdisplay=<optimized out>, error=0x7fff50bf0dc0) at /build/buildd/gtk+3.0-3.1.12/./gdk/x11/gdkmain-x11.c:275
 _XError (dpy=0x2425370, rep=<optimized out>) at ../../src/XlibInt.c:1583
 handle_error (dpy=0x2425370, err=0x7fd408707980, in_XReply=<optimized out>) at ../../src/xcb_io.c:212

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 software-center (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
James Schriver (dashua)
visibility: private → public
Changed in software-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Halse Rogers (raof) wrote : Re: software-center-gtk3 crashed with signal 5 in _XError()

Hm. The XGetWindowProperty call in the backtrace looks suspicious - from window_is_xembed in canberra-gtk-module.c:373 it's asking for the window properties on Window ID 0, which is unlikely to be valid.

I think that might be where to look.

Revision history for this message
gianfry71 (gianfry71) wrote :

software center run only root

 sudo software-center

Revision history for this message
Lars Renström (lars-renstrom) wrote :

I can confirm that it works if I issue a sudo software-center in terminal. But how am I supposed to do that from the launcher in Unity...?

Revision history for this message
Markus1978 (mk-cactus) wrote :

At-F2 -> gksu software-center

works for me, but if that's the real reason for the crash, it should be possible to iron this out 'til Beta2 :-)

As always... Thanks guys!

Revision history for this message
Roy H Huddleston (archspader) wrote : Re: [Bug 834403] Re: software-center-gtk3 crashed with signal 5 in _XError()

On Wed, 14 Sep 2011 15:14:45 -0000
Markus1978 <email address hidden> wrote:

> At-F2 -> gksu software-center
>
> works for me, but if that's the real reason for the crash, it should be
> possible to iron this out 'til Beta2 :-)
>
> As always... Thanks guys!
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/834403
>
> Title:
> software-center-gtk3 crashed with signal 5 in _XError()
>
> Status in “software-center” package in Ubuntu:
> Confirmed
>
> Bug description:
> Start U-S-C > Launches briefly > Crash
>
> ProblemType: Crash
> DistroRelease: Ubuntu 11.10
> Package: software-center 4.1.20
> ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
> Uname: Linux 3.0.0-9-generic x86_64
> NonfreeKernelModules: wl
> Architecture: amd64
> CrashCounter: 1
> Date: Fri Aug 26 01:28:11 2011
> ExecutablePath: /usr/share/software-center/software-center-gtk3
> InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110803.1)
> InterpreterPath: /usr/bin/python2.7
> PackageArchitecture: all
> ProcCmdline: /usr/bin/python /usr/bin/software-center-gtk3
> ProcEnviron:
> PATH=(custom, no user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> Signal: 5
> SourcePackage: software-center
> StacktraceTop:
> ?? () from /usr/lib/libgdk-3.so.0
> ?? () from /usr/lib/libgdk-3.so.0
> _XError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
> ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
> _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
> Title: software-center-gtk3 crashed with signal 5 in _XError()
> UpgradeStatus: No upgrade log present (probably fresh install)
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/834403/+subscriptions

--
Roy H Huddleston <email address hidden>
My Nvidia problems are gone. The 280.13 driver is working great. At this time Software Center blinks on then off. Streamtuner2 doesn't get that far. But my regular Streamtuner is working great. I am using the updated 3.0.0.11.18 kernel. Gimp was just up updated in this last update.

Revision history for this message
Wes (wessjunk) wrote : Re: software-center-gtk3 crashed with signal 5 in _XError()

Yes its true that it works if you run it has root. But I don't think you're supposed to need to run it as root. Before it stopped working, I think I was able to run it and browse applications to install, and then only enter my password (for sudoing) after choosing to install something. So I'm pretty sure something is wrong with the program, not just the launcher command.

Revision history for this message
John (john-deactivatedaccount) wrote :

Oddly enough, the centre works with 'new' or 'vanilla' user accounts, or on a guest session. But not, seemingly, on 'old' acocunts from natty.

summary: - software-center-gtk3 crashed with signal 5 in _XError()
+ software-center crashed with signal 5 in _XError()
Revision history for this message
Roy H Huddleston (archspader) wrote :

I had this same problem from Alpha 3, Beta1 and now Beta2. The kernels were working fine with recovery mode until 3.0.0.11.18. I notice the same problem with that last kernel mentioned in Beta1 and now Beta2 with recovery mode. Recovery mode was working fine to kernel 3.0.0.11.

Revision history for this message
Richard Cain (richardcain2) wrote :

I've just had to reinstall Natty from scratch, and now I have this same problem - I can only open Software Center using
"sudo software-center"
in a terminal.
"At-F2 -> gksu software-center"
doesn't work either. I've tried removing and reinstalling it, but no improvement.

Revision history for this message
Roberto Valderrama (rvalde04) wrote :

+1.. count me into the sudo club w/ Oneiric Beta 2

Revision history for this message
Richard Cain (richardcain2) wrote :

I managed to fix this, after noticing the same problem with zeitgeist.

I used "sudo chown -chR" to change ownership of my home directory to my user, and hey presto, it's working OK.

Revision history for this message
Michael Vogt (mvo) wrote :

There is a call in the backtrace that looks like this:

XGetWindowProperty (dpy=0x2425370, w=0, ...

now "0" is most certainly wrong.

Revision history for this message
Michael Vogt (mvo) wrote :

The backtrace indicates that this is happening inside canbera:

...
#4 gdk_x_error (xdisplay=<optimized out>, error=0x7fff50bf0dc0) at /build/buildd/gtk+3.0-3.1.12/./gdk/x11/gdkmain-#5 0x00007fd41d5a301f in _XError (dpy=0x2425370, rep=<optimized out>) at ../../src/XlibInt.c:1583
#6 0x00007fd41d59fdd1 in handle_error (dpy=0x2425370, err=0x7fd408707980, in_XReply=<optimized out>) at ../../src#7 0x00007fd41d5a0d27 in _XReply (dpy=0x2425370, rep=0x7fff50bf0f60, extra=0, discard=0) at ../../src/xcb_io.c:698
#8 0x00007fd41d5852fb in XGetWindowProperty (dpy=0x2425370, w=0, property=348, offset=0, length=2, delete=#9 0x00007fd41938269e in window_is_xembed (w=<optimized out>, d=<optimized out>) at canberra-gtk-module.c:373
#10 dispatch_sound_event (d=0x32f6a30) at canberra-gtk-module.c:454
...

I suspect there is a missing gdk_error_trap_push/gdk_error_trap_pop_ignored() here.I attach a small test program that demos the crash.

Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

To test the crash run:
$ gcc $(pkg-config --cflags gtk+-2.0) lala.c $(pkg-config --libs gtk+-2.0) && ./a.out

Revision history for this message
Michael Vogt (mvo) wrote :

The error is:
(a.out:25566): Gdk-WARNING **: The program 'a.out' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 131 error_code 3 request_code 20 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Adding:
gdk_error_trap_push(); ... gdk_error_trap_pop_ignored();
around the XGetWindowProperty() fixes the problem

Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Because apport only looks at StackTop the duplicates of this may or may not be this crash. It may also be that something else is crashing or if all of it is releated to libcanberra (or none of it and canberra is just the symptom).

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

If this bug affects you, could you please check if you can reproduce it at all? And if so, does it happens all the time?
Or just sometimes? What is printed on the terminal (or ~/.xsession-errors) when this happens?

Michael Vogt (mvo)
Changed in software-center (Ubuntu):
status: Confirmed → In Progress
Changed in libcanberra (Ubuntu):
status: New → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :
Michael Vogt (mvo)
Changed in software-center (Ubuntu):
status: In Progress → Invalid
Changed in libcanberra (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libcanberra - 0.28-0ubuntu9

---------------
libcanberra (0.28-0ubuntu9) oneiric; urgency=low

  * debian/patches/10_no_nonnative_crash.patch:
    - trap BadWindow (and similar) X errors when calling
      XGetWindowProperty() (LP: #834403). This got forwarded to
      upstream and is commited to git already (thanks to
      Lennart Poettering for the super quick review/merge)
 -- Michael Vogt <email address hidden> Thu, 29 Sep 2011 14:32:31 +0200

Changed in libcanberra (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Lars Renström (lars-renstrom) wrote :

I can confirm that I am now able to execute USC without using sudo. However, the update seems to have broken other things in my install, see LP #862553.

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.