This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/3824] New: Malloc reentrant occurs and corrupt memory even if _REENTRANT or/and THREAD_SAFE is set
- From: "sanjeewaherath at yahoo dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 4 Jan 2007 09:46:29 -0000
- Subject: [Bug libc/3824] New: Malloc reentrant occurs and corrupt memory even if _REENTRANT or/and THREAD_SAFE is set
- Reply-to: sourceware-bugzilla at sourceware dot org
In dual thread test program,
1]One thread calls vfork, execv continuously
2]Other thread calls malloc, free continuously.
Program crashes after some time with signal 11.
Purify complains malloc reentrant at fork. Same test program runs on Solaris
without this memory corruption.
I got the following memory dump by purify when this MRE occurs,
Breakpoint 1, 0x0808101f in purify_stop_here ()
(gdb) bt
#0 0x0808101f in purify_stop_here ()
#1 0x080620ce in malloc ()
#2 0xb709ff53 in malloc_atfork ()
from
/opt/rational/releases/purify.i386_linux2.2003a.06.15/cache/v65x-4/lib/t
ls/libc.so.6_pure_p3_c0_104011552_2421-15ELsmp_32
#3 0xb7097cf5 in __malloc ()
from
/opt/rational/releases/purify.i386_linux2.2003a.06.15/cache/v65x-4/lib/t
ls/libc.so.6_pure_p3_c0_104011552_2421-15ELsmp_32
#4 0x0806216d in malloc ()
#5 0x08084174 in SecThread::Run (this=0x84f4808,
_pOPFile=0x8501440)
at
/home/purifylnx/amex/src/BMReceiverDual/SecThread.cpp:33
#6 0x08083fe3 in SecThread::Init (_pOPFile=0x8501440)
at
/home/purifylnx/amex/src/BMReceiverDual/SecThread.cpp:22
#7 0xb75567b9 in start_thread ()
from
/opt/rational/releases/purify.i386_linux2.2003a.06.15/cache/v65x-4/lib/t
ls/libpthread.so.0_pure_p3_c0_104011552_2421-15ELsmp_32
#8 0xb71b2a42 in clone ()
from
/opt/rational/releases/purify.i386_linux2.2003a.06.15/cache/v65x-4/lib/t
ls/libc.so.6_pure_p3_c0_104011552_2421-15ELsmp_32
(gdb) info thr
* 2 Thread -1233200208 (LWP 26382) 0x0808101f in
purify_stop_here ()
1 Thread -1225230336 (LWP 26380) 0x080818a1 in
_p2267static ()
(gdb) thr 1
[Switching to thread 1 (Thread -1225230336 (LWP
26380))]#0 0x080818a1 in _p2267
static ()
(gdb) bt
#0 0x080818a1 in _p2267static ()
#1 0x08070502 in _p1940static ()
#2 0x080707fa in _p1940static ()
#3 0x0807b085 in _p2155static ()
#4 0x0807b23f in _p2155static ()
#5 0x0807c184 in _p2029static ()
#6 0x0807c5ca in socket ()
#7 0xb7516db3 in SSocketMan::CreateListener
(this=0x80c1e10,
zIPAddress=0xb753ce26 "127.0.0.1", iPortNo=54812,
pCB=0x80c1038,
iTimeOut=5)
at
/home/aemi_12/7/src/tools/Serendib/be/libs/API/1/SSocketSUN.C:1923
#8 0xb749e4f7 in SEventMan::CreateListener
(this=0x80c1038, iServiceID=5006,
pCallback=0xbfff8f70)
at
/home/aemi_12/7/src/tools/Serendib/be/libs/API/1/SEventMan.C:1627
#9 0x08088411 in SRMDestroyListener::OnTimer
(this=0xbfff8f70,
pTimer=0x84ed810)
at
/home/purifylnx/amex/src/BMReceiverDual/SRMDesListener.cpp:207
#10 0xb74a4579 in SEventMan::OnTimer (this=0x80c1038)
at
/home/aemi_12/7/src/tools/Serendib/be/libs/API/1/SEventMan.C:2245
#11 0xb751d94e in SSocketMan::Run (this=0x80c1e10,
zName=0x8097527 "MAIN")
at
/home/aemi_12/7/src/tools/Serendib/be/libs/API/1/SSocketSUN.C:2843
#12 0xb749142c in SEventMan::Run (this=0x80c1038,
zName=0x8097527 "MAIN",
pErrCB=0xbfff8f74)
---Type <return> to continue, or q <return> to quit---
at
/home/aemi_12/7/src/tools/Serendib/be/libs/API/1/SEventMan.C:548
#13 0x08087e46 in SRMDestroyListener::Run
(this=0xbfff8f70, iService=5001,
dStatInterval=1)
at
/home/purifylnx/amex/src/BMReceiverDual/SRMDesListener.cpp:176
#14 0x080838be in main (argc=7, argv=0xbfff9864)
at
/home/purifylnx/amex/src/BMReceiverDual/main.cpp:97
(gdb)
--
Summary: Malloc reentrant occurs and corrupt memory even if
_REENTRANT or/and THREAD_SAFE is set
Product: glibc
Version: 2.3.2
Status: NEW
Severity: critical
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: sanjeewaherath at yahoo dot com
CC: glibc-bugs at sources dot redhat dot com,sanjeewaherath
at yahoo dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3824
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.