Summary: | deadlock in malloc/tst-malloc-stats-cancellation | ||
---|---|---|---|
Product: | glibc | Reporter: | Andreas Schwab <schwab> |
Component: | malloc | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | adhemerval.zanella, nsz, nszabolcs, tuliom |
Priority: | P2 | ||
Version: | 2.33 | ||
Target Milestone: | 2.33 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Andreas Schwab
2021-01-25 11:01:34 UTC
i cannot reproduce this. in fact on i686 there is no difference between stripped libc.so.6, libpthread.so.0, ld-linux.so.2 and tst-malloc-stats-cancellation binaries before and after that commit (as expected: the commit should have no effect on i386). what binutils/gcc/.. are you using? i have a gcc-10.2 and binutils-2.35 what config options are you using? and what environment in case there is anything relevant. https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:glibc/glibc:testsuite/f/i586 https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:glibc/glibc:testsuite/p/ppc i used the exact same configuration, with a default pie toolchain (since that's what you seem to be using) and still cannot reproduce the issue. so i guess the problem is in your toolchain/glibc patches. @@ -57,6 +57,7 @@ SYMBOL TABLE: 000024e8 l O .eh_frame 00000000 __FRAME_END__ 00000000 l df *ABS* 00000000 00003edc l .init_array 00000000 __init_array_end +00002004 l O .rodata 00000004 _IO_stdin_used 00003ee0 l O .dynamic 00000000 _DYNAMIC 00003ed8 l .init_array 00000000 __init_array_start 00002234 l .eh_frame_hdr 00000000 __GNU_EH_FRAME_HDR @@ -87,7 +88,6 @@ SYMBOL TABLE: 00000000 w *UND* 00000000 __gmon_start__ 00004074 g O .data 00000000 .hidden __dso_handle 00000000 F *UND* 00000000 fdopen@@GLIBC_2.1 -00002004 g O .rodata 00000004 _IO_stdin_used 00000000 F *UND* 00000000 __libc_start_main@@GLIBC_2.0 00000000 F *UND* 00000000 fprintf@@GLIBC_2.0 00001870 g F .text 0000005d __libc_csu_init This is broken everywhere. _IO_stdin_used is defined in csu/init.c which is built as gcc init.c -c -std=gnu11 -fgnu89-inline -O2 [...] -D_LIBC_REENTRANT -include /work/build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o /work/build/csu/init.o [...] i think it should have -DLIBC_NONSHARED=1 since crt files end up in dynamic linked binaries, so that's the actual bug. on new targets _IO_stdin_used is unused (it's for bw compat with < glibc 2.1). and the reason i could not reproduce this on i386 is that my gcc is multi arch and then NO_HIDDEN_EXTERN_FUNC_IN_PIE is set, so the visibility pragma is not present. The master branch has been updated by Szabolcs Nagy <nsz@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=df359a25ba6f6bda06104229fbfe284c1fb30915 commit df359a25ba6f6bda06104229fbfe284c1fb30915 Author: Szabolcs Nagy <szabolcs.nagy@arm.com> Date: Wed Jan 27 09:44:19 2021 +0000 Revert "Make libc symbols hidden in static PIE" [BZ #27237] This reverts commit 2682695e5c7acf1e60dd3b5c3a14d4e82416262c. Fixes bug 27237. That commit turned out to be too intrusive affecting crt files, test system and benchmark files. They should not be affected, but the build system does not set the MODULE_NAME and LIBC_NONSHARED reliably. Fixed upstream. |