This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10748] New: program crashes when loading and unloading shared library in a thread
- From: "arthur_salazar at playstation dot sony dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 8 Oct 2009 18:12:27 -0000
- Subject: [Bug libc/10748] New: program crashes when loading and unloading shared library in a thread
- Reply-to: sourceware-bugzilla at sourceware dot org
I believe this to be related to 10069. I modified the test case so that the
open and close was done in two threads. Since my application actually does this,
it is a real problem for us.
We have traced this to the same data structure as in 10069.
Test case is attached.
I have tried this on two systems:
Linux sd-asalazar-c5.989studios.com 2.6.18-53.1.13.el5 #1 SMP Tue Feb 12
13:01:45 EST 2008 i686 i686 i386 GNU/Linux
and
Linux blob060.scea.com 2.6.18-128.el5PAE #1 SMP Wed Jan 21 11:19:46 EST 2009
i686 i686 i386 GNU/Linux
I have a test case and I am trying to figure out how to upload it.
Additional configuration information is available if needed.
output is:
[asalazar@sd-asalazar-c5 glibc_testcase]$ ./main
count = 0
id 1 count = 0
id 2 count = 0
id 1 count = 1
id 2 count = 1
id 1 count = 2
id 2 count = 2
id 1 count = 3
id 2 count = 3
id 1 count = 4
id 2 count = 4
id 1 count = 5
id 2 count = 5
id 1 count = 6
id 2 count = 6
id 1 count = 7
id 2 count = 7
*** glibc detected *** ./main: realloc(): invalid next size: 0x0814f0a0 ***
======= Backtrace: =========
/lib/libc.so.6[0x4e91d0]
/lib/libc.so.6(realloc+0xfe)[0x4ea05e]
/lib/ld-linux.so.2[0x46e7f5]
/lib/ld-linux.so.2[0x46fac4]
/lib/ld-linux.so.2[0x46bc36]
/lib/ld-linux.so.2[0x46f212]
/lib/libdl.so.2[0x5ebc2d]
/lib/ld-linux.so.2[0x46bc36]
/lib/libdl.so.2[0x5ec2ac]
/lib/libdl.so.2(dlopen+0x44)[0x5ebb64]
./main(__gxx_personality_v0+0x23c)[0x8048838]
/lib/libpthread.so.0[0x5f643b]
/lib/libc.so.6(clone+0x5e)[0x54dfde]
======= Memory map: ========
0020d000-0020e000 r-xp 0020d000 00:00 0 [vdso]
0045e000-00477000 r-xp 00000000 08:02 1214595 /lib/ld-2.5.so
00477000-00478000 r-xp 00019000 08:02 1214595 /lib/ld-2.5.so
00478000-00479000 rwxp 0001a000 08:02 1214595 /lib/ld-2.5.so
00480000-005ba000 r-xp 00000000 08:02 1214612 /lib/libc-2.5.so
005ba000-005bc000 r-xp 00139000 08:02 1214612 /lib/libc-2.5.so
005bc000-005bd000 rwxp 0013b000 08:02 1214612 /lib/libc-2.5.so
005bd000-005c0000 rwxp 005bd000 00:00 0
005c2000-005e7000 r-xp 00000000 08:02 1214619 /lib/libm-2.5.so
005e7000-005e8000 r-xp 00024000 08:02 1214619 /lib/libm-2.5.so
005e8000-005e9000 rwxp 00025000 08:02 1214619 /lib/libm-2.5.so
005eb000-005ed000 r-xp 00000000 08:02 1214613 /lib/libdl-2.5.so
005ed000-005ee000 r-xp 00001000 08:02 1214613 /lib/libdl-2.5.so
005ee000-005ef000 rwxp 00002000 08:02 1214613 /lib/libdl-2.5.so
005f1000-00604000 r-xp 00000000 08:02 1214614 /lib/libpthread-2.5.so
00604000-00605000 r-xp 00012000 08:02 1214614 /lib/libpthread-2.5.so
00605000-00606000 rwxp 00013000 08:02 1214614 /lib/libpthread-2.5.so
00606000-00608000 rwxp 00606000 00:00 0
00870000-0087b000 r-xp 00000000 08:02 1212632 /lib/libgcc_s-4.1.2-
20070626.so.1
0087b000-0087c000 rwxp 0000a000 08:02 1212632 /lib/libgcc_s-4.1.2-
20070626.so.1
0091e000-009fe000 r-xp 00000000 08:02 1684391 /usr/lib/libstdc++.so.6.0.8
009fe000-00a02000 r-xp 000df000 08:02 1684391 /usr/lib/libstdc++.so.6.0.8
00a02000-00a03000 rwxp 000e3000 08:02 1684391 /usr/lib/libstdc++.so.6.0.8
00a03000-00a09000 rwxp 00a03000 00:00 0
00ac8000-00ac9000 r-xp 00000000 08:05 32309257
/usr/local/home/asalazar/wrk/glibc_testcase/glibc_testcase/dummyso1.so
00ac9000-00aca000 rwxp 00000000 08:05 32309257
/usr/local/home/asalazar/wrk/glibc_testcase/glibc_testcase/dummyso1.so
00ec4000-00ec5000 r-xp 00000000 08:05 32309258
/usr/local/home/asalazar/wrk/glibc_testcase/glibc_testcase/dummyso2.so
00ec5000-00ec6000 rwxp 00000000 08:05 32309258
/usr/local/home/asalazar/wrk/glibc_testcase/glibc_testcase/dummyso2.so
08048000-08049000 r-xp 00000000 08:05 32309259
/usr/local/home/asalazar/wrk/glibc_testcase/glibc_testcase/main
08049000-0804a000 rw-p 00000000 08:05 32309259
/usr/local/home/asalazar/wrk/glibc_testcase/glibc_testcase/main
0814f000-08170000 rw-p 0814f000 00:00 0
b6a00000-b6a21000 rw-p b6a00000 00:00 0
b6a21000-b6b00000 ---p b6a21000 00:00 0
b6be4000-b6be5000 ---p b6be4000 00:00 0
b6be5000-b75e5000 rw-p b6be5000 00:00 0
b75e5000-b75e6000 ---p b75e5000 00:00 0
b75e6000-b7fe9000 rw-p b75e6000 00:00 0
b7ffb000-b7ffc000 rw-p b7ffb000 00:00 0
bffa8000-bffbd000 rw-p bffa8000 00:00 0 [stack]
Aborted
--
Summary: program crashes when loading and unloading shared
library in a thread
Product: glibc
Version: 2.8
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: arthur_salazar at playstation dot sony dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10748
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.