FS#4128 - Packages not working with glib2 2.10.x

Attached to Project: Arch Linux
Opened by Thomas Bächler (brain0) - Wednesday, 08 March 2006, 13:42 GMT
Last edited by Jan de Groot (JGC) - Thursday, 09 March 2006, 08:57 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Jan de Groot (JGC)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I am referring to my experience and to this thread: http://bbs.archlinux.org/viewtopic.php?p=147711

Some people have reported the following message with the new testing glibc:
While executing different programs, they crash with this message:

*** glibc detected *** free(): invalid pointer: 0x0822a808 ***
Aborted

I have experienced this when exiting irssi, two other people reported having the exact same message when starting jpilot and gcalculator. This may be a glibc bug or a glibc build error.
This task depends upon

Closed by  Jan de Groot (JGC)
Wednesday, 15 March 2006, 23:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  Guess these are fixed now.
Comment by Jan de Groot (JGC) - Wednesday, 08 March 2006, 15:39 GMT
Most of these bugs are caused by glib2 in testing, somehow the new slice allocator causes problems. Try disabling it:

export G_SLICE=always-malloc

then start your program, it should run fine again.
Comment by Thomas Bächler (brain0) - Wednesday, 08 March 2006, 16:09 GMT
[thomas@architect ~]$ export G_SLICE=always-malloc
[thomas@architect ~]$ irssi
*** glibc detected *** free(): invalid pointer: 0x0822a6b0 ***
Abgebrochen (core dumped)
[thomas@architect ~]$

So in my case, this doesn't help (irssi shows the invalid pointer error when it exits).
Comment by Jan de Groot (JGC) - Wednesday, 08 March 2006, 19:22 GMT
It's not only the G_SLICE thing, it's also the new floating stacks thingy in glib that makes sure these programs malfunction.

What happens is that a program creates objects with g_object_new, but frees them with g_free. This is not the right method, as a g_object should be free'd with g_object_unref. Calling g_free on these things makes sure you get invalid or double frees. Fixing applications is easy, I already patched galculator to do the right things.

I will keep this bug open, as I want to have all apps patched by the time gnome 2.14 comes into extra. Please report all crashing applications with the ***glibc detected*** things here if they have a dependency to glib2 somewhere in the dependency tree.
Comment by Thomas Bächler (brain0) - Wednesday, 08 March 2006, 20:05 GMT
ok, thanks for your concern. I think I already mentioned that irssi is affected. I looked if I can fix it quickly, but a quick grep resulted in 1394 g_free's to be checked and potentially fixed, no time for this atm :(
Comment by Jan de Groot (JGC) - Wednesday, 08 March 2006, 22:18 GMT
The easiest way to detect these things is to compile the package with CFLAGS="${CFLAGS} -g" and build the package with -n (nostrip). After that, run the resulting binary with valgrind and do your action to make it abort. Valgrind will catch it and report the file and line number with the offended free command :).

I'll look into jpilot and irssi and commit fixed versions to testing.

Loading...