[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#271816: libc6: Random segfault in malloc()



Package: libc6
Version: 2.2.5-11.5
Severity: critical

Hi !

I'm trying to use aftpd 0.7 on a Woody. It has been compiled from the
sources available at ftp://ftp.mamalinux.com/pub/atftp/ with gcc 2.95.4.

Sometimes, after receiving a transfer request, atftpd segfaults.
With the help of ddd, I got the following backtrace:

(gdb) core-file /root/core.7890
Core was generated by /usr/sbin/atftpd --daemon --no-fork --port 69
--retry-timeout 5 --no-multicast'.
Program terminated with signal 11, Segmentation fault.
#0  0x400bc998 in chunk_alloc (ar_ptr=0x401636a0, nb=120) at malloc.c:2989
        in malloc.c

(gdb) bt
#0  0x400bc998 in chunk_alloc (ar_ptr=0x401636a0, nb=120) at malloc.c:2989
#1  0x400bd942 in __libc_calloc (n=1, elem_size=112) at malloc.c:3852
#2  0x08049f84 in main (argc=14, argv=0xbffffad4) at tftpd.c:409


Other info:
- This is not a compiler bug. Same problem with gcc 3.0.
- This is not a memory problem. Same behaviour on different systems.
- The md5sum of my libc.so is ok
- One month ago I had a similar problem with a program called 'chntpw':
random segfaults in libc's malloc(). I solved the segfaults by compiling it
as a static executable under a debian testing (glibc 2.3.+++), and using it
under my woody.
- Googling for 'segfault chunk_alloc' shows that lots of users had the same
problem. Most of them seem to use the glibc 2.2.5 (sometimes under RH 7.3).
- RH seems to have applied more patches for malloc related problems. (See
their changelog)
- Interesting message, more patches should be applied ? :
http://sources.redhat.com/ml/libc-alpha/2004-05/msg00181.html

So it really seems to be a glibc 2.2.5 problem...

In particular the patch
http://kegel.com/crosstool/current/patches/glibc-linuxthreads-2.2.5/threadparam.patch
, seems not to be applied. Could it solve my problem ?
(Sorry but I couldn't check myself, I did not succeed to 'debuild' the libc6)

Cheers,

  Ludovic.

-- System Information
Debian Release: 3.0
Kernel Version: Linux joebar.freealter.fr 2.6.4-1-686 #1 Sat Mar 13 19:25:38 EST 2004 i686 unknown





Reply to: