libavg segfaults on startup

Bug #815922 reported by Ronald McCollam
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libavg (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This is a followup to bug 807730.

libavg applications crash on startup on one system I have access to, but not others. Example backtrace:

fader@simon:~$ gdb python
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run /usr/games/empcommand -w -r 800x600
Starting program: /usr/bin/python /usr/games/empcommand -w -r 800x600
[Thread debugging using libthread_db enabled]
[11-07-25 10:16:16.834] APP: Setting resolution to: [800, 600]
/usr/share/games/empcommand/engine.pyc
/usr/share/games/empcommand/fonts
[New Thread 0x5067b70 (LWP 1756)]
[Thread 0x5067b70 (LWP 1756) exited]
[New Thread 0x5067b70 (LWP 1757)]
python: ../../src/xcb_io.c:515: _XReply: Assertion `!dpy->xcb->reply_data' failed.

Program received signal SIGABRT, Aborted.
0x0012e416 in __kernel_vsyscall ()
(gdb) bt
#0 0x0012e416 in __kernel_vsyscall ()
#1 0x00349e71 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0x0034d34e in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x00342888 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6
#4 0x0219cdc7 in _XReply () from /usr/lib/i386-linux-gnu/libX11.so.6
#5 0x021983d7 in XSync () from /usr/lib/i386-linux-gnu/libX11.so.6
#6 0x00f6d5cf in ?? () from /usr/lib/fglrx/libGL.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

This also happens with a test python session:
fader@simon:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libavg
>>> libavg.AVGApp.start(resolution=(640,480))
Segmentation fault
fader@simon:~$

This system is using an ATI Radeon graphics adapter:
01:05.0 VGA compatible controller: ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics]

I will attach more hardware data to this bug. Please let me know if there is more information I can provide.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: python-libavg 1.5.4-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
Uname: Linux 2.6.38-10-generic i686
NonfreeKernelModules: wl fglrx
Architecture: i386
Date: Mon Jul 25 10:16:36 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: libavg
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ronald McCollam (fader) wrote :
Revision history for this message
Ulrich von Zadow (uzadow) wrote :

Can you do two things:

- Attach the output of glxinfo to the bug.
- See if the error still happens if you use the classic desktop without effects.

Thanks,

  Uli

Revision history for this message
Ronald McCollam (fader) wrote :
Revision history for this message
Ronald McCollam (fader) wrote :

This also happens when running in Classic mode (without Unity) as well as in "no effects" mode (without compiz).

Revision history for this message
Ulrich von Zadow (uzadow) wrote :

Ok, so your graphics setup looks absolutely sane - sorry for asking :-).

Since I have no way of reproducing this bug (No one here has the hardware), I'm going to need your help to isolate the cause. Unfortunately, the backtrace is broken as well. When you're in gdb, can you do

(gdb) info threads
(gdb) thread 1
(gdb) bt
...
etc. for all the threads so we have the rest of the threads as well?

Also, can you try:

$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libavg
>>> libavg.Player.get().setFramerate(60)
>>> libavg.AVGApp.start(resolution=(640,480))

Revision history for this message
Ronald McCollam (fader) wrote :
Download full text (3.2 KiB)

Thanks for the help, Ulrich! I don't mind providing any information I can. This is also not my main system so I don't mind trying things that are potentially destructive as I can always reinstall.

Here are the backtraces from (I think) the only two threads after empcommand segfaults:

fader@simon:~$ gdb python
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run /usr/games/empcommand -w -r 800x600
Starting program: /usr/bin/python /usr/games/empcommand -w -r 800x600
[Thread debugging using libthread_db enabled]
[11-08-02 12:33:35.212] APP: Setting resolution to: [800, 600]
/usr/share/games/empcommand/engine.pyc
/usr/share/games/empcommand/fonts
[New Thread 0x5067b70 (LWP 7413)]
[Thread 0x5067b70 (LWP 7413) exited]
[New Thread 0x5067b70 (LWP 7414)]

Program received signal SIGSEGV, Segmentation fault.
0x02850625 in xcb_writev () from /usr/lib/i386-linux-gnu/libxcb.so.1
(gdb) bt
#0 0x02850625 in xcb_writev () from /usr/lib/i386-linux-gnu/libxcb.so.1
#1 0x0219c42b in _XSend () from /usr/lib/i386-linux-gnu/libX11.so.6
#2 0x0219ca5a in _XReply () from /usr/lib/i386-linux-gnu/libX11.so.6
#3 0x021983d7 in XSync () from /usr/lib/i386-linux-gnu/libX11.so.6
#4 0x00f6d5cf in ?? () from /usr/lib/fglrx/libGL.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) info threads
  3 Thread 0x5067b70 (LWP 7414) 0x0012e416 in __kernel_vsyscall ()
* 1 Thread 0xb7feb6c0 (LWP 7408) 0x02850625 in xcb_writev ()
   from /usr/lib/i386-linux-gnu/libxcb.so.1
(gdb) thread 1
[Switching to thread 1 (Thread 0xb7feb6c0 (LWP 7408))]#0 0x02850625 in xcb_writev () from /usr/lib/i386-linux-gnu/libxcb.so.1
(gdb) bt
#0 0x02850625 in xcb_writev () from /usr/lib/i386-linux-gnu/libxcb.so.1
#1 0x0219c42b in _XSend () from /usr/lib/i386-linux-gnu/libX11.so.6
#2 0x0219ca5a in _XReply () from /usr/lib/i386-linux-gnu/libX11.so.6
#3 0x021983d7 in XSync () from /usr/lib/i386-linux-gnu/libX11.so.6
#4 0x00f6d5cf in ?? () from /usr/lib/fglrx/libGL.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) thread 3
[Switching to thread 3 (Thread 0x5067b70 (LWP 7414))]#0 0x0012e416 in __kernel_vsyscall ()
(gdb) bt
#0 0x0012e416 in __kernel_vsyscall ()
#1 0x003e11c9 in ppoll () from /lib/i386-linux-gnu/libc.so.6
#2 0x022b2442 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#3 0x022b2b84 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#4 0x0103af16 in ?? () from /usr/lib/libSDL-1.2.so.0
#5 0x0100c690 in ?? () from /usr/lib/libSDL-1.2.so.0
#6 0x01014e4e in ?? () from /usr/lib/libSDL-1.2.so.0
#7 0x0105c12d in ?? () from /usr/lib/libSDL-1.2.so.0
#8 0x00134e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so....

Read more...

Revision history for this message
Ronald McCollam (fader) wrote :

Calling setFramerate(60) causes the test to *not* crash, interestingly. I.e.

fader@simon:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libavg
>>> libavg.AVGApp.start(resolution=(640,480))
Segmentation fault
fader@simon:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libavg
>>> libavg.Player.get().setFramerate(60)
>>> libavg.AVGApp.start(resolution=(640,480))
>>>
Segmentation fault
fader@simon:~$

(The last segfault is not generated until I close the AVGApp window that is created and abort gdb -- it will run for an hour or more with no problems until I close it.)

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in libavg (Ubuntu):
status: New → Confirmed
Revision history for this message
Linus Tufvesson (linus-tufvesson) wrote :

I have almost the same problem. When I close the libavg window, it doesn't close until I exit process that started it ( ie the interpreter, gdb or whatever) and then I get a segfault as the last thing that happens.

geo-lap01@geo-laptop01:~/Downloads/libavg-1.6.0$ gdb python
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/python
[Thread debugging using libthread_db enabled]
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libavg
>>> libavg.AVGApp.start(resolution=(800,640))
[New Thread 0xb346ab70 (LWP 9878)]
[Thread 0xb346ab70 (LWP 9878) exited]
[New Thread 0xb346ab70 (LWP 9880)]
>>>

Program received signal SIGSEGV, Segmentation fault.
0x0378420a in ?? () from /usr/lib/fglrx/dri/fglrx_dri.so
(gdb) info threads
  3 Thread 0xb346ab70 (LWP 9880) 0x0012d422 in __kernel_vsyscall ()
* 1 Thread 0xb7fe86c0 (LWP 9822) 0x0378420a in ?? () from /usr/lib/fglrx/dri/fglrx_dri.so
(gdb) thread 1
[Switching to thread 1 (Thread 0xb7fe86c0 (LWP 9822))]#0 0x0378420a in ?? () from /usr/lib/fglrx/dri/fglrx_dri.so
(gdb) bt
#0 0x0378420a in ?? () from /usr/lib/fglrx/dri/fglrx_dri.so
#1 0x7fffffff in ?? ()
#2 0x00000140 in ?? ()
#3 0x00000100 in ?? ()
#4 0x00000100 in ?? ()
#5 0x00000100 in ?? ()
#6 0x00000012 in ?? ()
#7 0x00000012 in ?? ()
#8 0x00000200 in ?? ()
#9 0x00000100 in ?? ()
#10 0x00000000 in ?? ()
(gdb) thread 3
[Switching to thread 3 (Thread 0xb346ab70 (LWP 9880))]#0 0x0012d422 in __kernel_vsyscall ()
(gdb) bt
#0 0x0012d422 in __kernel_vsyscall ()
#1 0x003e3dbe in ppoll () from /lib/tls/i686/cmov/libc.so.6
#2 0x02095b2a in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#3 0x02097a13 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#4 0x010aafc6 in ?? () from /usr/lib/libSDL-1.2.so.0
#5 0x0107cc0d in ?? () from /usr/lib/libSDL-1.2.so.0
#6 0x010849ce in ?? () from /usr/lib/libSDL-1.2.so.0
#7 0x010cf25d in ?? () from /usr/lib/libSDL-1.2.so.0
#8 0x0013396e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9 0x003f1a4e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb)

Revision history for this message
Ulrich von Zadow (uzadow) wrote :

I've reproduced this and checked a fix in upstream (svn rev. 6715). A patch is attached.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ati-segfault-on-startup-fix.diff" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Stefano Rivera (stefanor) wrote :

libavg was removed from Debian because it's a RC buggy leaf package. It'll probably be removed from Ubuntu next cycle. http://packages.qa.debian.org/liba/libavg/news/20110906T104743Z.html

Revision history for this message
Ulrich von Zadow (uzadow) wrote :

Note that while the Debian libavg package is outdated, buggy and a leaf package, the Ubuntu package is up-to-date, maintained and not a leaf package. In short: A completely different thing. There is no reason to remove it.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Yeah, I spoke too soon. I hadn't noticed that it had an ubuntu-only rdepend. Please consider maintaining it in Debian if you can.

I can't test this patch, but I'll take your word on it, as an upstream author.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libavg - 1.5.4-0ubuntu4

---------------
libavg (1.5.4-0ubuntu4) oneiric; urgency=low

  * Work around segfault when using fglrx (LP: #815922)
 -- Stefano Rivera <email address hidden> Sun, 09 Oct 2011 23:30:53 +0200

Changed in libavg (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Ronald McCollam (fader) wrote :

I can confirm that this fixed the bug and I am able to use libavg applications. Thank you very much!

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.