strace crashed with SIGABRT in malloc()

Bug #316762 reported by Kjell Braden
10
Affects Status Importance Assigned to Milestone
strace (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: strace

Everytime I strace quanta, it crashes with:
*** glibc detected *** /usr/bin/strace: malloc(): memory corruption (fast): 0x0000000000f11a30 ***

I attached a full gdb backtrace.

$ LC_ALL=C apt-cache policy strace quanta libc6
strace:
  Installed: 4.5.17+cvs080723-2ubuntu1
  Candidate: 4.5.17+cvs080723-2ubuntu1
  Version table:
 *** 4.5.17+cvs080723-2ubuntu1 0
        500 http://archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status
quanta:
  Installed: 4:3.5.10-0ubuntu1
  Candidate: 4:3.5.10-0ubuntu1
  Version table:
 *** 4:3.5.10-0ubuntu1 0
        500 http://archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status
libc6:
  Installed: 2.9-0ubuntu7
  Candidate: 2.9-0ubuntu7
  Version table:
 *** 2.9-0ubuntu7 0
        500 http://archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Kjell Braden (afflux) wrote :
Revision history for this message
skierpage (skierpage) wrote :

I'm getting a similar crash when I try to strace in Kubuntu 9.04, e.g. if I run
 strace kcmshell4 kcmsolidproc > kcsmsolidproc_2.strace
 *** glibc detected *** strace: malloc(): memory corruption (fast): 0x0000000001c72610 ***
a workaround is to use strace -v.

There seems to be a patch for this crash in https://bugzilla.redhat.com/show_bug.cgi?id=478324 ; that bug also comments that newer code in http://strace.cvs.sourceforge.net/viewvc/strace/strace/util.c avoids the bug.

Sometimes I get instead
  *** glibc detected *** strace: munmap_chunk(): invalid pointer: 0x00000000008107d0

Revision history for this message
Giovanni Bajo (giovannibajo) wrote :

Same problem here.

Whenever I run strace on qtconfig-qt4 in ubuntu jaunty, I get this after a few seconds:

*** glibc detected *** strace: malloc(): memory corruption (fast): 0x00000000013877d0 ***
======= Backtrace: =========
/lib/libc.so.6[0x7fd2c71fecb8]
/lib/libc.so.6[0x7fd2c7202351]
/lib/libc.so.6(__libc_malloc+0x98)[0x7fd2c7203828]
strace[0x4087d8]
strace[0x405c0e]
strace[0x404916]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7fd2c71a55a6]
strace[0x402119]
======= Memory map: ========
00400000-00447000 r-xp 00000000 08:01 53585 /usr/bin/strace
00646000-00647000 r--p 00046000 08:01 53585 /usr/bin/strace
00647000-00648000 rw-p 00047000 08:01 53585 /usr/bin/strace
00648000-00656000 rw-p 00648000 00:00 0
01387000-013a8000 rw-p 01387000 00:00 0 [heap]
7fd2c0000000-7fd2c0021000 rw-p 7fd2c0000000 00:00 0
7fd2c0021000-7fd2c4000000 ---p 7fd2c0021000 00:00 0
7fd2c6f6f000-7fd2c6f85000 r-xp 00000000 08:01 66959 /lib/libgcc_s.so.1
7fd2c6f85000-7fd2c7185000 ---p 00016000 08:01 66959 /lib/libgcc_s.so.1
7fd2c7185000-7fd2c7186000 r--p 00016000 08:01 66959 /lib/libgcc_s.so.1
7fd2c7186000-7fd2c7187000 rw-p 00017000 08:01 66959 /lib/libgcc_s.so.1
7fd2c7187000-7fd2c72ef000 r-xp 00000000 08:01 348115 /lib/libc-2.9.so
7fd2c72ef000-7fd2c74ef000 ---p 00168000 08:01 348115 /lib/libc-2.9.so
7fd2c74ef000-7fd2c74f3000 r--p 00168000 08:01 348115 /lib/libc-2.9.so
7fd2c74f3000-7fd2c74f4000 rw-p 0016c000 08:01 348115 /lib/libc-2.9.so
7fd2c74f4000-7fd2c74f9000 rw-p 7fd2c74f4000 00:00 0
7fd2c74f9000-7fd2c7519000 r-xp 00000000 08:01 348112 /lib/ld-2.9.so
7fd2c76f2000-7fd2c76f4000 rw-p 7fd2c76f2000 00:00 0
7fd2c7715000-7fd2c7718000 rw-p 7fd2c7715000 00:00 0
7fd2c7718000-7fd2c7719000 r--p 0001f000 08:01 348112 /lib/ld-2.9.so
7fd2c7719000-7fd2c771a000 rw-p 00020000 08:01 348112 /lib/ld-2.9.so
7fffcf705000-7fffcf71a000 rw-p 7ffffffea000 00:00 0 [stack]
7fffcf7ff000-7fffcf800000 r-xp 7fffcf7ff000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
select(Aborted

Revision history for this message
Anna Jonna Armannsdottir (annaj) wrote :

The same problem appears in jaunty when debugging a local version of gq in gnome:

strace -o gq -p 32371

Process 32371 attached - interrupt to quit
*** glibc detected *** strace: malloc(): memory corruption (fast): 0x0000000001f89be0 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f86c4cb7cb8]
/lib/libc.so.6[0x7f86c4cbb351]
/lib/libc.so.6(__libc_malloc+0x98)[0x7f86c4cbc828]
strace[0x4087d8]
strace[0x405c0e]
strace[0x404916]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f86c4c5e5a6]
strace[0x402119]
======= Memory map: ========
00400000-00447000 r-xp 00000000 fc:01 418192 /usr/bin/strace
00646000-00647000 r--p 00046000 fc:01 418192 /usr/bin/strace
00647000-00648000 rw-p 00047000 fc:01 418192 /usr/bin/strace
00648000-00656000 rw-p 00648000 00:00 0
01f89000-01faa000 rw-p 01f89000 00:00 0 [heap]
7f86c0000000-7f86c0021000 rw-p 7f86c0000000 00:00 0
7f86c0021000-7f86c4000000 ---p 7f86c0021000 00:00 0
7f86c4a28000-7f86c4a3e000 r-xp 00000000 08:02 1441850 /lib/libgcc_s.so.1
7f86c4a3e000-7f86c4c3e000 ---p 00016000 08:02 1441850 /lib/libgcc_s.so.1
7f86c4c3e000-7f86c4c3f000 r--p 00016000 08:02 1441850 /lib/libgcc_s.so.1
7f86c4c3f000-7f86c4c40000 rw-p 00017000 08:02 1441850 /lib/libgcc_s.so.1
7f86c4c40000-7f86c4da8000 r-xp 00000000 08:02 1441921 /lib/libc-2.9.so
7f86c4da8000-7f86c4fa8000 ---p 00168000 08:02 1441921 /lib/libc-2.9.so
7f86c4fa8000-7f86c4fac000 r--p 00168000 08:02 1441921 /lib/libc-2.9.so
7f86c4fac000-7f86c4fad000 rw-p 0016c000 08:02 1441921 /lib/libc-2.9.so
7f86c4fad000-7f86c4fb2000 rw-p 7f86c4fad000 00:00 0
7f86c4fb2000-7f86c4fd2000 r-xp 00000000 08:02 1441808 /lib/ld-2.9.so
7f86c5199000-7f86c519b000 rw-p 7f86c5199000 00:00 0
7f86c51cd000-7f86c51d1000 rw-p 7f86c51cd000 00:00 0
7f86c51d1000-7f86c51d2000 r--p 0001f000 08:02 1441808 /lib/ld-2.9.so
7f86c51d2000-7f86c51d3000 rw-p 00020000 08:02 1441808 /lib/ld-2.9.so
7fffcd1be000-7fffcd1d3000 rw-p 7ffffffea000 00:00 0 [stack]
7fffcd1ff000-7fffcd200000 r-xp 7fffcd1ff000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted

The installed packages are:

LC_ALL=C apt-cache policy strace libc6
strace:
  Installed: 4.5.17+cvs080723-2ubuntu1
  Candidate: 4.5.17+cvs080723-2ubuntu1
  Version table:
 *** 4.5.17+cvs080723-2ubuntu1 0
        500 http://ftp.rhnet.is jaunty/main Packages
        100 /var/lib/dpkg/status
libc6:
  Installed: 2.9-4ubuntu6
  Candidate: 2.9-4ubuntu6
  Version table:
 *** 2.9-4ubuntu6 0
        100 /var/lib/dpkg/status
     2.9-4ubuntu5 0
        500 http://ftp.rhnet.is jaunty/main Packages

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.