Deactivate MALLOC_CHECK_ on x86_64

Michael Pyne mpyne at kde.org
Sat Nov 14 05:10:53 GMT 2009


On Friday 13 November 2009 15:46:32 Raphael Kubo da Costa wrote:
> On Friday 13 November 2009 13:11:57 Alex Fiestas wrote:
> > Hi
> > Seems that MALLOC_CHECK_ feature of glibc is kind of broken in x86_64,
> >  giving false positives. In release mode this has no effect to the user,
> >  just when you're running KDE in development mode, MALLOC_CHECK_ will be
> >  set at 2, which means that malloc will abort the application when one of
> >  that false given errors happen.
> >
> > So I suggest to deactivate MALLOC_CHECK_ on 64 bits systems, at least
> > until it gets fixed.
> >
> > Some applications that usually crash on my system are:
> > - digikam (I'm in digikam sprint right now and I've asked gilles and he
> > agrees)
> > - kdevelop (I'm with apol here and he's concerned about this issue too).
> >
> > Everybody agrees with that?
> >
> > *http://techbase.kde.org/Development/malloc_check
> 
> Are you sure about it being broken only in x86_64? I'm running x86 and
>  always get false positives too. I don't remember mpyne or maelcum
>  perceiving it as a 64-bit-only problem either.

Well I only run development on 64-bit so I can't say one way or the other 
about 32-bit problems.  The initial bug reports all seemed to be x86_64 but 
I've also seen complaints from users running 32-bit CPUs.

glibc 2.10+ is what affects us, I've never been able to figure out why, 
maelcum managed to reduce or eliminate the crashes with the glibc experimental 
malloc implementation IIRC (but the same switch didn't help me much as it 
turns out).

My crash testcases are KNotify (all the damn time), JuK (if using phonon-gst), 
Konq (rarely) and KTorrent.  I'm not 100% convinced that only the malloc 
checking code is affected, but I do know that if glibc in general is 
corrupting memory no matter whether checking is enabled or disabled that I 
should eventually get SIGSEGV in my testcases with checking disabled (and I 
don't get that).

Oh, none of this happens if you export QT_NO_GLIB=1 before running your 
preferred application...

I've been tracking this under bug 196207 [1] if anyone else has an idea what 
to do to debug glibc ;)  I have not opened a glibc bug since I cannot drill 
down to a small testcase (I suspect a threading torture test may do it but I 
haven't tried).

[1] https://bugs.kde.org/show_bug.cgi?id=196207

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20091114/35506a0c/attachment.sig>


More information about the kde-core-devel mailing list