Bug#1099624: libc6 2.41 pthread cause pari to FTBFS
On 2025-03-06 19:03, Bill Allombert wrote:
> On Thu, Mar 06, 2025 at 07:02:25AM +0100, Aurelien Jarno wrote:
> > Hi Bill,
> >
> > On 2025-03-05 21:30, Bill Allombert wrote:
> > > Package: libc6
> > > Version: 2.41-7
> > > Severity: normal
> > >
> > > Hello Aurelien,
> > >
> > > During a test build pari FTBFS due to a test-suite failure in a test involving pthread.
> > > this failure is only reproducible with libc6 2.41.
> >
> > Do you have more details about that? I have tried to build pari locally,
> > and it builds fine. On which architecture is that? In which version?
>
> Is there a way to do a bisection ? I think this would settle the matter.
>
It's what I was currently doing. I found that the issue is caused by this
upstream commit:
https://sourceware.org/git/?p=glibc.git;a=commit;h=89b53077d2a58f00e7debdfe58afabe953dac60d
This is the corresponding bug that got fixed by this commit:
https://sourceware.org/bugzilla/show_bug.cgi?id=12683
Compiling pari with -fsanitize=address, I get this trace for the double
free:
==3034379==ERROR: AddressSanitizer: attempting double-free on 0x511000010800 in thread T12:
^[[A #0 0x7f3b35ef3918 in free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52
#1 0x7f3b357be3ec in pari_free ../src/headers/pariinl.h:1166
#2 0x7f3b357be3ec in pari_stack_delete ../src/headers/pariinl.h:960
#3 0x7f3b357be3ec in pari_close_evaluator ../src/language/eval.c:531
#4 0x7f3b358027ad in pari_thread_close ../src/language/init.c:1206
#5 0x7f3b359c01df in mt_queue_run ../src/mt/pthread.c:171
#6 0x7f3b35e5b1d5 in asan_thread_start ../../../../src/libsanitizer/asan/asan_interceptors.cpp:234
#7 0x7f3b34354abc in start_thread nptl/pthread_create.c:448
#8 0x7f3b343d27b7 in __clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
0x511000010800 is located 0 bytes inside of 256-byte region [0x511000010800,0x511000010900)
freed by thread T12 here:
#0 0x7f3b35ef3918 in free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52
#1 0x7f3b357be3ec in pari_free ../src/headers/pariinl.h:1166
#2 0x7f3b357be3ec in pari_stack_delete ../src/headers/pariinl.h:960
#3 0x7f3b357be3ec in pari_close_evaluator ../src/language/eval.c:531
previously allocated by thread T12 here:
#0 0x7f3b35ef4c77 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f3b357bdfc7 in pari_realloc_ip ../src/headers/pariinl.h:1200
#2 0x7f3b357bdfc7 in pari_stack_alloc ../src/headers/pariinl.h:949
#3 0x7f3b357bdfc7 in pari_init_evaluator ../src/language/eval.c:514
Thread T12 created by T0 here:
#0 0x7f3b35eecb01 in pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:245
#1 0x7f3b359c204b in mt_queue_start_lim ../src/mt/pthread.c:399
Regards
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
Reply to: