double free error when at-spi is installed

Bug #32029 reported by Shaya Potter
14
Affects Status Importance Assigned to Milestone
at-spi (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

I'm using gaim 2.0 from CVS, and when at-spi is installed, it dies whenever I switch away messages w/ a libc double free error.

gdb logs shows a back trace as

*** glibc detected *** double free or corruption (!prev): 0x085b9a00 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread 927209152 (LWP 18922)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x376459a1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0x376472b9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0x3767987a in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6
#4 0x3767ffd4 in malloc_usable_size () from /lib/tls/i686/cmov/libc.so.6
#5 0x3768034a in free () from /lib/tls/i686/cmov/libc.so.6
#6 0x377a7edc in g_free () from /usr/lib/libglib-2.0.so.0
#7 0x372d67cd in gail_combo_box_new ()
   from /usr/lib/gtk-2.0/modules/libgail.so
#8 0x37a4f8f2 in atk_object_get_name () from /usr/lib/libatk-1.0.so.0
#9 0x37f0765b in gnome_accessibility_module_shutdown ()
   from /usr/lib/gtk-2.0/modules/libatk-bridge.so
#10 0x37f07712 in gnome_accessibility_module_shutdown ()
   from /usr/lib/gtk-2.0/modules/libatk-bridge.so
#12 0x37f06d33 in gnome_accessibility_module_shutdown ()
   from /usr/lib/gtk-2.0/modules/libatk-bridge.so
#13 0x3782053a in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#14 0x37822238 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#15 0x37822589 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#16 0x37a5025c in atk_object_notify_state_change ()
   from /usr/lib/libatk-1.0.so.0
#17 0x372f791d in gail_widget_new () from /usr/lib/gtk-2.0/modules/libgail.so

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for your bug report. Is this recent Dapper? C ould you try to get a back trace with the instructions on https://wiki.ubuntu.com/DebuggingProgramCrash (minus the compilation) and install libc6-dbg, libglib2.0-0-dbg, libgail-dbg, libgail-gnome-dbg, libatspi-dbg to get a more complete backtrace?

Changed in at-spi:
status: Unconfirmed → Needs Info
Revision history for this message
Shaya Potter (spotter) wrote :

this is on a dapper box

can't reproduce the gdb, as it wont run within gdb context

spotter@dent:~$ gdb /opt/gaim/bin/gaim
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) run
Starting program: /opt/gaim/bin/gaim
[Thread debugging using libthread_db enabled]
[New Thread 927110848 (LWP 6460)]
GTK Accessibility Module initialized
[New Thread 910715824 (LWP 6477)]
[New Thread 902323120 (LWP 6478)]
[New Thread 902056880 (LWP 6482)]
[Thread 902056880 (LWP 6482) exited]
thread_db_get_info: cannot get thread info: generic error
(gdb) c
Continuing.
Cannot remove breakpoints because program is no longer writable.
It might be running in another process.
Further execution is probably impossible.
0x00000000 in ?? ()
ptrace: No such process.
(gdb)

Changed in at-spi:
assignee: nobody → dholbach
Revision history for this message
Daniel Holbach (dholbach) wrote :

What happens if you type "thread apply all bt" instead of "c"?

Revision history for this message
Daniel Holbach (dholbach) wrote :

Could you upgrade do the newest versions and answer the questions above?

Changed in at-spi:
assignee: dholbach → desktop-bugs
Revision history for this message
Shaya Potter (spotter) wrote :

to answer the first question. it causes gdb to segfault (but gaim keeps running)

spotter@dent:~/cvs/gaim$ gdb /opt/gaim/bin/gaim
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) run
Starting program: /opt/gaim/bin/gaim
[Thread debugging using libthread_db enabled]
[New Thread 2001340096 (LWP 11413)]
GTK Accessibility Module initialized
[New Thread 1984539568 (LWP 11426)]
[New Thread 1976146864 (LWP 11427)]
[New Thread 1975880624 (LWP 11431)]
[Thread 1975880624 (LWP 11431) exited]
thread_db_get_info: cannot get thread info: generic error
(gdb) thread apply all bt
Segmentation fault

to answer the second question, still have the double free error (and still can't reproduce the gdb log, with same error as above).

Revision history for this message
Daniel Holbach (dholbach) wrote :

And the double free still only happens with at-spi installed?

Revision history for this message
Shaya Potter (spotter) wrote :

yes. it works fine w/o at-spi installed.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Luke: do you have an idea how to figure out what's going wrong? We don't have gaim2 in the archive at all. Did you hear of any problems with gaim2 and current GNOME a11y stuff?

Revision history for this message
Luke Schierer (lschiere) wrote :

I don't know what's going on here. the one BT he was able to get doesn't have any gaim code in it at all. the one idea I'd have would be to see if he can get a bt with MALLOC_CHECK_=2 set (since malloc is in the bt). I'm going to forward this to Mark and see if he has any ideas.

Revision history for this message
Shaya Potter (spotter) wrote :

so I just retried gdb w/ a just updated CVS gaim.

without at-spi installed, gdb has no problem running it (i.e. no cannot get thread info" error)

with at-spi installed, that error is present.

Revision history for this message
Mark Doliner (thekingant) wrote :

Sorry for the late reply. Does the crash happen when at-spi is INSTALLED? Or do you have to actually be running some sort of assistive technology program? Or maybe you have some sort of assistive technology daemon running in the background that attaches to Gaim ("GTK Accessibility Module initialized")? Does it still crash if you disable that background process?

While trying to debug this, you'll definitely want to "export MALLOC_CHECK_=2" in the same terminal that you use to start Gaim (see the bottom of the malloc man page for info). It may not necessarily help in this case, but it certainly won't hurt.

The symptoms and stacktrace make me feel like this is a problem with at-spi and not with Gaim. Although it is curious that it only happens when you change your away message. And I assume you're only having the problem with Gaim?

Could it be a version/library mismatch? Did you compile Gaim on your machine? Or, was it compiled against the specific versions of gtk/atk that you are using on your machine? Was at-spi compiled specifically for the versions of gtk/atk that you are using? (If you're getting everything from the Dapper repositories, then my guess is that everything should be fine in this area.)

Revision history for this message
Shaya Potter (spotter) wrote :

AFAIK I'm not running any atk using program in the background (i.e. gnopernicus or gok, they aren't even installed).

I had some issues w/ gnome-terminal earlier, but not seeing them at the moment.

spotter@dent:~$ /opt/gaim/bin/gaim
GTK Accessibility Module initialized
*** glibc detected *** double free or corruption (fasttop): 0x085bba98 ***
Aborted
spotter@dent:~$ MALLOC_CHECK_=2 /opt/gaim/bin/gaim
GTK Accessibility Module initialized
Aborted
spotter@dent:~$

this is cvs head gaim (I keep fairly up to date) that I compiled on my own. Everything is from dapper besides gaim, which is installed in /opt/gaim/

THOUGH, I just tried gdb in gaim again, and it gave the errors I'm getting (gdb not liking thread creation/deletetion that happen rapidly, which the gdb developers have claimed they've fixed, but haven't, and it's not just an NPTL issue, as if i move /lib/tls away, it still happens). But while I left it hanging in gdb, I went off to do something else, and that did hang gnome-terminal. I then tried to open a new gnome-terminal and that was hung as well. i switched to console, killall -9 gaim, that freed it up.

at-spi seems to have serious issues. :(

Revision history for this message
Shaya Potter (spotter) wrote :
Download full text (10.4 KiB)

persistance, I managed to get a whole trace (as because gaim kept on crashing, AIM locked me out changing execution order of gaim)

spotter@dent:~$ gdb /opt/gaim/bin/gaim
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/ lib/tls/i686/cmov/libthread_db.so.1".

(gdb) r
Starting program: /opt/gaim/bin/gaim
[Thread debugging using libthread_db enabled]
[New Thread 2001635008 (LWP 13767)]
GTK Accessibility Module initialized
[New Thread 1984826288 (LWP 13777)]
[New Thread 1976433584 (LWP 13778)]
[New Thread 1976167344 (LWP 13785)]
[Thread 1976167344 (LWP 13785) exited]
thread_db_get_info: cannot get thread info: generic error
(gdb) c
Continuing.
Cannot remove breakpoints because program is no longer writable.
It might be running in another process.
Further execution is probably impossible.
0x00000000 in ?? ()
ptrace: No such process.
(gdb) c
Continuing.
Cannot remove breakpoints because program is no longer writable.
It might be running in another process.
Further execution is probably impossible.
0x00000000 in ?? ()
ptrace: No such process.
(gdb) c
Continuing.
*** glibc detected *** double free or corruption (fasttop): 0x083af038 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread 2001635008 (LWP 13767)]
0xffffe410 in __kernel_vsyscall ()
(gdb) thread apply all bt

Thread 3 (Thread 1976433584 (LWP 13778)):
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x77782904 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0x778496e8 in g_main_context_iterate (context=0x84dfb88, block=1,
    dispatch=1, self=0x84dfdc8) at gmain.c:2849
#3 0x77849bb8 in IA__g_main_loop_run (loop=0x84dfb20) at gmain.c:2751
#4 0x7723970e in link_thread_io_context () from /usr/lib/libORBit-2.so.0
#5 0x77862472 in g_thread_create_proxy (data=0x84dfdc8) at gthread.c:582
#6 0x776b6341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7 0x7778c52e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 1984826288 (LWP 13777)):
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x77782904 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0x778496e8 in g_main_context_iterate (context=0x84df240, block=1,
    dispatch=1, self=0x84e2070) at gmain.c:2849
#3 0x77849bb8 in IA__g_main_loop_run (loop=0x84df220) at gmain.c:2751
#4 0x771ae82b in e_book_set_default_source () from /usr/lib/libebook-1.2.so.5
#5 0x77862472 in g_thread_create_proxy (data=0x778a6254) at gthread.c:582
#6 0x776b6341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7 0x7778c52e in clone () from /lib/tls/i686/cmov/libc.so.6

---Type <return> to continue, or q <return> to quit---
Thread 1 (Thread 2001635008 (LWP 13767)):
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x776eb9a1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0x776ed2b9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0x7771f87a in __libc_message () from...

Revision history for this message
Shaya Potter (spotter) wrote :

ok, this is weird.

openoffice.org-gnome forced me to install at-spi.

I figured ok, might as well, then tried it w/ my current build of gaim cvs (a little old now, but not too old) and no more crashing. so if you want to close this, that's ok.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thank you very much for following up.

Changed in at-spi:
status: Needs Info → Fix Released
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.