Bug#1054656: perl: segfault in a threaded script after a Ctrl-C

Vincent Lefevre vincent at vinc17.net
Fri Oct 27 14:31:49 BST 2023


Package: perl
Version: 5.32.1-4+deb11u2
Severity: normal

I've done a Ctrl-C to terminate a Perl script. But it was terminated
with a segmentation fault:

[...]
Reading tmp/tst-arbre-1698058266-44878-8.results ...
^CInterrupt
Perl exited with active threads:
        1 running and unjoined
        9 finished and unjoined
        0 running and detached
t3-secstep --minlen=32 --minpwc=150 -r=$file --remove -l=10 -q=3600 -c=archre  11396.09s user 513.34s system 70% cpu 4:41:06.62 total
citron:~/eftests[SEGV]>

The script has

$SIG{'INT'} = sub
  { maplepid and quitmaple;
    $SIG{'PIPE'} = 'DEFAULT';
    warn "Interrupt\n";
    exit; };

I'm seeing the "Interrupt" above.

citron:~/eftests> gdb /usr/bin/perl core-t3-secstep
[...]
Reading symbols from /usr/bin/perl...
(No debugging symbols found in /usr/bin/perl)
[New LWP 3342618]
[New LWP 3342617]
[New LWP 2467061]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `perl /home/vlefevre/eftests/bin/t3-secstep --minlen=32 --minpwc=150 -r=results.'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000561b58a7f898 in ?? ()
[Current thread is 1 (Thread 0x7fd04ffff700 (LWP 3342618))]

The full backtrace:

Thread 3 (Thread 0x7fd05dde2280 (LWP 2467061)):
#0  0x0000561b589beecd in ?? ()
No symbol table info available.
#1  0x0000561b589bf2d8 in Perl_vmess ()
No symbol table info available.
#2  0x0000561b589bebe4 in Perl_vcroak ()
No symbol table info available.
#3  0x0000561b589bee3e in Perl_croak_nocontext ()
No symbol table info available.
#4  0x0000561b58a0898d in perl_clone ()
No symbol table info available.
#5  0x00007fd05dbeee51 in ?? () from /usr/lib/x86_64-linux-gnu/perl/5.32/auto/threads/threads.so
No symbol table info available.
#6  0x0000561b589e8157 in Perl_pp_entersub ()
No symbol table info available.
#7  0x0000561b589de846 in Perl_runops_standard ()
No symbol table info available.
#8  0x0000561b5894cb1c in perl_run ()
No symbol table info available.
#9  0x0000561b5891f482 in main ()
No symbol table info available.

Thread 2 (Thread 0x7fd05cbc6700 (LWP 3342617)):
#0  0x00007fd05e165180 in __do_global_dtors_aux () from /home/vlefevre/debian11/gmp/broadwell/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Math/MPFR/Prec/Prec.so
No symbol table info available.
#1  0x00007fd05e1b0373 in _dl_fini () at dl-fini.c:138
        do_audit = <optimized out>
        __PRETTY_FUNCTION__ = "_dl_fini"
#2  0x00007fd05de594d7 in __run_exit_handlers (status=0, listp=0x7fd05dfec718 <__exit_funcs>, run_list_atexit=run_list_atexit at entry=true, run_dtors=run_dtors at entry=true) at exit.c:108
        atfct = <optimized out>
        onfct = <optimized out>
        cxafct = <optimized out>
        f = <optimized out>
        new_exitfn_called = 1
        cur = 0x7fd05dfede20 <initial>
        restart = <optimized out>
#3  0x00007fd05de5967a in __GI_exit (status=<optimized out>) at exit.c:139
No locals.
#4  0x0000561b58942b2c in ?? ()
No symbol table info available.
#5  0x0000561b58948ddc in Perl_my_exit ()
No symbol table info available.
#6  0x00007fd05dbee452 in ?? () from /usr/lib/x86_64-linux-gnu/perl/5.32/auto/threads/threads.so
No symbol table info available.
#7  0x00007fd05dff9ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140532885776128, -2739285261268925267, 140727011263854, 140727011263855, 140532885774272, 8396800, 2764264495803679917, 2764261766375425197}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#8  0x00007fd05df19a2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.

Thread 1 (Thread 0x7fd04ffff700 (LWP 3342618)):
#0  0x0000561b58a7f898 in ?? ()
No symbol table info available.
#1  0x0000561b58a81e97 in Perl_setlocale ()
No symbol table info available.
#2  0x00007fd05dbede9a in ?? () from /usr/lib/x86_64-linux-gnu/perl/5.32/auto/threads/threads.so
No symbol table info available.
#3  0x00007fd05dff9ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140532672100096, -2739285261268925267, 140727011263854, 140727011263855, 140532672098240, 8396800, 2764230981636998317, 2764261766375425197}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#4  0x00007fd05df19a2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.

-- System Information:
Debian Release: 11.8
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-26-amd64 (SMP w/28 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages perl depends on:
ii  dpkg               1.20.13
ii  libperl5.32        5.32.1-4+deb11u2
ii  perl-base          5.32.1-4+deb11u2
ii  perl-modules-5.32  5.32.1-4+deb11u2

Versions of packages perl recommends:
ii  netbase  6.3

Versions of packages perl suggests:
pn  libtap-harness-archive-perl                             <none>
pn  libterm-readline-gnu-perl | libterm-readline-perl-perl  <none>
ii  make                                                    4.3-4.1
ii  perl-doc                                                5.32.1-4+deb11u2

-- no debconf information

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




More information about the Perl-maintainers mailing list