Bug#1014617: libfcgi-perl: perl is segfaulting and I think it's CGI::Fast

Ian Jackson ijackson at chiark.greenend.org.uk
Fri Jul 8 22:38:34 BST 2022


Package: libfcgi-perl
Version: 0.79+ds-2
Severity: normal

I recently upgraded my system from jessie i386 to bullseye amd64.
Since I did this, a long-established web application has become flaky
(returning no output from requests).  Associated with its failures I
see log messages like this:

Jul  8 21:59:42 chiark kernel: [354982.615451] perl[7671]: segfault at 22 ip 000055b443da11b1 sp 00007ffe01ca1e50 error 6 in perl[55b443d9d000+185000]

The same hardware has been running an amd64 kernel (albeit i386
userland) forever with no unexplained problems, so I trust the
hardware.  Other Perl programs on the system are fine.

I looked through the memory map of a relevant perl process (see below)
and I think it very likely that the problem is a bug in libfcgi or in
FCGI.so.  The failures are intermittent and I don't have a reliable
repro.

Due to the convoluted arrangements by which this webapp is invoked in
my environment, it is not entirely straightforward to get coredumps or
stack traces, etc.  I can try to provide better information if it is
likely to be useful.

But first I thought I would ask: is this at all a plausible theory ?
Is it worth my time upending everything so that I can get a stack
trace or attach a debugger ?

My alternative is to reorganise my invocation method entirely.  My
webapp is in Mason 1 (libhtml-mason-perl), so I think my options may
be limited.

-- System Information:
Debian Release: 11.3
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-15-amd64 (SMP w/8 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages libfcgi-perl depends on:
ii  libc6                       2.31-13+deb11u3
ii  libfcgi0ldbl                2.4.2-2
ii  perl                        5.32.1-4+deb11u2
ii  perl-base [perlapi-5.32.0]  5.32.1-4+deb11u2

libfcgi-perl recommends no packages.

libfcgi-perl suggests no packages.

-- no debconf information


55a3d95e8000-55a3d962f000 r--p 00000000 fe:09 106888                     /usr/bin/perl
55a3d962f000-55a3d97b4000 r-xp 00047000 fe:09 106888                     /usr/bin/perl
55a3d97b4000-55a3d9959000 r--p 001cc000 fe:09 106888                     /usr/bin/perl
55a3d995a000-55a3d9969000 r--p 00371000 fe:09 106888                     /usr/bin/perl
55a3d9969000-55a3d996c000 rw-p 00380000 fe:09 106888                     /usr/bin/perl
55a3d996c000-55a3d9972000 rw-p 00000000 00:00 0 
55a3dafe6000-55a3dc656000 rw-p 00000000 00:00 0                          [heap]
7fcfcd97e000-7fcfcde0a000 r--p 00000000 fe:09 213000                     /usr/lib/locale/locale-archive
7fcfcde0a000-7fcfcde1a000 r--p 00000000 fe:09 234768                     /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fcfcde1a000-7fcfcdf12000 r-xp 00010000 fe:09 234768                     /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fcfcdf12000-7fcfcdf46000 r--p 00108000 fe:09 234768                     /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fcfcdf46000-7fcfcdf4a000 r--p 0013b000 fe:09 234768                     /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fcfcdf4a000-7fcfcdf4d000 rw-p 0013f000 fe:09 234768                     /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fcfcdf70000-7fcfcdf75000 r--p 00000000 fe:09 306657                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBD/SQLite/SQLite.so
7fcfcdf75000-7fcfcdf8e000 r-xp 00005000 fe:09 306657                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBD/SQLite/SQLite.so
7fcfcdf8e000-7fcfcdf99000 r--p 0001e000 fe:09 306657                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBD/SQLite/SQLite.so
7fcfcdf99000-7fcfcdf9a000 r--p 00028000 fe:09 306657                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBD/SQLite/SQLite.so
7fcfcdf9a000-7fcfcdf9b000 rw-p 00029000 fe:09 306657                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBD/SQLite/SQLite.so
7fcfcdf9b000-7fcfcdfbc000 rw-p 00000000 00:00 0 
7fcfcdfbc000-7fcfcdfbf000 r--p 00000000 fe:09 241993                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBI/DBI.so
7fcfcdfbf000-7fcfcdfd7000 r-xp 00003000 fe:09 241993                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBI/DBI.so
7fcfcdfd7000-7fcfcdfdd000 r--p 0001b000 fe:09 241993                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBI/DBI.so
7fcfcdfdd000-7fcfcdfde000 r--p 00020000 fe:09 241993                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBI/DBI.so
7fcfcdfde000-7fcfcdfdf000 rw-p 00021000 fe:09 241993                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/DBI/DBI.so
7fcfcdfdf000-7fcfcdfe1000 r--p 00000000 fe:09 231616                     /usr/lib/x86_64-linux-gnu/perl/5.32.1/auto/Data/Dumper/Dumper.so
7fcfcdfe1000-7fcfcdfe7000 r-xp 00002000 fe:09 231616                     /usr/lib/x86_64-linux-gnu/perl/5.32.1/auto/Data/Dumper/Dumper.so
7fcfcdfe7000-7fcfcdfe8000 r--p 00008000 fe:09 231616                     /usr/lib/x86_64-linux-gnu/perl/5.32.1/auto/Data/Dumper/Dumper.so
7fcfcdfe8000-7fcfcdfe9000 r--p 00008000 fe:09 231616                     /usr/lib/x86_64-linux-gnu/perl/5.32.1/auto/Data/Dumper/Dumper.so
7fcfcdfe9000-7fcfcdfea000 rw-p 00009000 fe:09 231616                     /usr/lib/x86_64-linux-gnu/perl/5.32.1/auto/Data/Dumper/Dumper.so
7fcfcdfea000-7fcfcdfeb000 r--p 00000000 fe:09 356005                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/BSD/Resource/Resource.so
7fcfcdfeb000-7fcfcdfed000 r-xp 00001000 fe:09 356005                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/BSD/Resource/Resource.so
7fcfcdfed000-7fcfcdfee000 r--p 00003000 fe:09 356005                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/BSD/Resource/Resource.so
7fcfcdfee000-7fcfcdfef000 r--p 00003000 fe:09 356005                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/BSD/Resource/Resource.so
7fcfcdfef000-7fcfcdff0000 rw-p 00004000 fe:09 356005                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/BSD/Resource/Resource.so
7fcfcdff0000-7fcfcdff6000 r--p 00000000 fe:09 232078                     /usr/lib/x86_64-linux-gnu/perl-base/auto/POSIX/POSIX.so
7fcfcdff6000-7fcfce003000 r-xp 00006000 fe:09 232078                     /usr/lib/x86_64-linux-gnu/perl-base/auto/POSIX/POSIX.so
7fcfce003000-7fcfce007000 r--p 00013000 fe:09 232078                     /usr/lib/x86_64-linux-gnu/perl-base/auto/POSIX/POSIX.so
7fcfce007000-7fcfce008000 ---p 00017000 fe:09 232078                     /usr/lib/x86_64-linux-gnu/perl-base/auto/POSIX/POSIX.so
7fcfce008000-7fcfce00b000 r--p 00017000 fe:09 232078                     /usr/lib/x86_64-linux-gnu/perl-base/auto/POSIX/POSIX.so
7fcfce00b000-7fcfce00c000 rw-p 0001a000 fe:09 232078                     /usr/lib/x86_64-linux-gnu/perl-base/auto/POSIX/POSIX.so
7fcfce00c000-7fcfce00e000 r--p 00000000 fe:09 232068                     /usr/lib/x86_64-linux-gnu/perl-base/auto/File/Glob/Glob.so
7fcfce00e000-7fcfce012000 r-xp 00002000 fe:09 232068                     /usr/lib/x86_64-linux-gnu/perl-base/auto/File/Glob/Glob.so
7fcfce012000-7fcfce013000 r--p 00006000 fe:09 232068                     /usr/lib/x86_64-linux-gnu/perl-base/auto/File/Glob/Glob.so
7fcfce013000-7fcfce014000 r--p 00006000 fe:09 232068                     /usr/lib/x86_64-linux-gnu/perl-base/auto/File/Glob/Glob.so
7fcfce014000-7fcfce015000 rw-p 00007000 fe:09 232068                     /usr/lib/x86_64-linux-gnu/perl-base/auto/File/Glob/Glob.so
7fcfce015000-7fcfce017000 r--p 00000000 fe:09 304106                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Params/Validate/XS/XS.so
7fcfce017000-7fcfce020000 r-xp 00002000 fe:09 304106                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Params/Validate/XS/XS.so
7fcfce020000-7fcfce022000 r--p 0000b000 fe:09 304106                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Params/Validate/XS/XS.so
7fcfce022000-7fcfce023000 r--p 0000c000 fe:09 304106                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Params/Validate/XS/XS.so
7fcfce023000-7fcfce024000 rw-p 0000d000 fe:09 304106                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Params/Validate/XS/XS.so
7fcfce024000-7fcfce026000 r--p 00000000 fe:09 240806                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/HTML/Parser/Parser.so
7fcfce026000-7fcfce02e000 r-xp 00002000 fe:09 240806                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/HTML/Parser/Parser.so
7fcfce02e000-7fcfce030000 r--p 0000a000 fe:09 240806                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/HTML/Parser/Parser.so
7fcfce030000-7fcfce031000 r--p 0000b000 fe:09 240806                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/HTML/Parser/Parser.so
7fcfce031000-7fcfce032000 rw-p 0000c000 fe:09 240806                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/HTML/Parser/Parser.so
7fcfce032000-7fcfce034000 r--p 00000000 fe:09 232076                     /usr/lib/x86_64-linux-gnu/perl-base/auto/List/Util/Util.so
7fcfce034000-7fcfce03e000 r-xp 00002000 fe:09 232076                     /usr/lib/x86_64-linux-gnu/perl-base/auto/List/Util/Util.so
7fcfce03e000-7fcfce040000 r--p 0000c000 fe:09 232076                     /usr/lib/x86_64-linux-gnu/perl-base/auto/List/Util/Util.so
7fcfce040000-7fcfce041000 r--p 0000d000 fe:09 232076                     /usr/lib/x86_64-linux-gnu/perl-base/auto/List/Util/Util.so
7fcfce041000-7fcfce042000 rw-p 0000e000 fe:09 232076                     /usr/lib/x86_64-linux-gnu/perl-base/auto/List/Util/Util.so
7fcfce042000-7fcfce044000 r--p 00000000 fe:09 232073                     /usr/lib/x86_64-linux-gnu/perl-base/auto/IO/IO.so
7fcfce044000-7fcfce046000 r-xp 00002000 fe:09 232073                     /usr/lib/x86_64-linux-gnu/perl-base/auto/IO/IO.so
7fcfce046000-7fcfce047000 r--p 00004000 fe:09 232073                     /usr/lib/x86_64-linux-gnu/perl-base/auto/IO/IO.so
7fcfce047000-7fcfce048000 r--p 00004000 fe:09 232073                     /usr/lib/x86_64-linux-gnu/perl-base/auto/IO/IO.so
7fcfce048000-7fcfce049000 rw-p 00005000 fe:09 232073                     /usr/lib/x86_64-linux-gnu/perl-base/auto/IO/IO.so
7fcfce049000-7fcfce04b000 r--p 00000000 fe:09 232064                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Fcntl/Fcntl.so
7fcfce04b000-7fcfce04c000 r-xp 00002000 fe:09 232064                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Fcntl/Fcntl.so
7fcfce04c000-7fcfce04d000 r--p 00003000 fe:09 232064                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Fcntl/Fcntl.so
7fcfce04d000-7fcfce04e000 ---p 00004000 fe:09 232064                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Fcntl/Fcntl.so
7fcfce04e000-7fcfce04f000 r--p 00004000 fe:09 232064                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Fcntl/Fcntl.so
7fcfce04f000-7fcfce050000 rw-p 00005000 fe:09 232064                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Fcntl/Fcntl.so
7fcfce050000-7fcfce052000 rw-p 00000000 00:00 0 
7fcfce052000-7fcfce054000 r--p 00000000 fe:0c 32984                      /lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fcfce054000-7fcfce069000 r-xp 00002000 fe:0c 32984                      /lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fcfce069000-7fcfce083000 r--p 00017000 fe:0c 32984                      /lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fcfce083000-7fcfce084000 r--p 00030000 fe:0c 32984                      /lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fcfce084000-7fcfce085000 rw-p 00031000 fe:0c 32984                      /lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fcfce085000-7fcfce08d000 rw-p 00000000 00:00 0 
7fcfce08d000-7fcfce0b2000 r--p 00000000 fe:0c 33110                      /lib/x86_64-linux-gnu/libc-2.31.so
7fcfce0b2000-7fcfce1fd000 r-xp 00025000 fe:0c 33110                      /lib/x86_64-linux-gnu/libc-2.31.so
7fcfce1fd000-7fcfce247000 r--p 00170000 fe:0c 33110                      /lib/x86_64-linux-gnu/libc-2.31.so
7fcfce247000-7fcfce248000 ---p 001ba000 fe:0c 33110                      /lib/x86_64-linux-gnu/libc-2.31.so
7fcfce248000-7fcfce24b000 r--p 001ba000 fe:0c 33110                      /lib/x86_64-linux-gnu/libc-2.31.so
7fcfce24b000-7fcfce24e000 rw-p 001bd000 fe:0c 33110                      /lib/x86_64-linux-gnu/libc-2.31.so
7fcfce24e000-7fcfce252000 rw-p 00000000 00:00 0 
7fcfce252000-7fcfce259000 r--p 00000000 fe:0c 33121                      /lib/x86_64-linux-gnu/libpthread-2.31.so
7fcfce259000-7fcfce269000 r-xp 00007000 fe:0c 33121                      /lib/x86_64-linux-gnu/libpthread-2.31.so
7fcfce269000-7fcfce26e000 r--p 00017000 fe:0c 33121                      /lib/x86_64-linux-gnu/libpthread-2.31.so
7fcfce26e000-7fcfce26f000 r--p 0001b000 fe:0c 33121                      /lib/x86_64-linux-gnu/libpthread-2.31.so
7fcfce26f000-7fcfce270000 rw-p 0001c000 fe:0c 33121                      /lib/x86_64-linux-gnu/libpthread-2.31.so
7fcfce270000-7fcfce274000 rw-p 00000000 00:00 0 
7fcfce274000-7fcfce283000 r--p 00000000 fe:0c 33112                      /lib/x86_64-linux-gnu/libm-2.31.so
7fcfce283000-7fcfce31d000 r-xp 0000f000 fe:0c 33112                      /lib/x86_64-linux-gnu/libm-2.31.so
7fcfce31d000-7fcfce3b6000 r--p 000a9000 fe:0c 33112                      /lib/x86_64-linux-gnu/libm-2.31.so
7fcfce3b6000-7fcfce3b7000 r--p 00141000 fe:0c 33112                      /lib/x86_64-linux-gnu/libm-2.31.so
7fcfce3b7000-7fcfce3b8000 rw-p 00142000 fe:0c 33112                      /lib/x86_64-linux-gnu/libm-2.31.so
7fcfce3b8000-7fcfce3b9000 r--p 00000000 fe:0c 33111                      /lib/x86_64-linux-gnu/libdl-2.31.so
7fcfce3b9000-7fcfce3bb000 r-xp 00001000 fe:0c 33111                      /lib/x86_64-linux-gnu/libdl-2.31.so
7fcfce3bb000-7fcfce3bc000 r--p 00003000 fe:0c 33111                      /lib/x86_64-linux-gnu/libdl-2.31.so
7fcfce3bc000-7fcfce3bd000 r--p 00003000 fe:0c 33111                      /lib/x86_64-linux-gnu/libdl-2.31.so
7fcfce3bd000-7fcfce3be000 rw-p 00004000 fe:0c 33111                      /lib/x86_64-linux-gnu/libdl-2.31.so
7fcfce3be000-7fcfce3c0000 rw-p 00000000 00:00 0 
7fcfce3c0000-7fcfce3c1000 r--p 00000000 fe:09 241343                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Clone/Clone.so
7fcfce3c1000-7fcfce3c2000 r-xp 00001000 fe:09 241343                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Clone/Clone.so
7fcfce3c2000-7fcfce3c3000 r--p 00002000 fe:09 241343                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Clone/Clone.so
7fcfce3c3000-7fcfce3c4000 r--p 00002000 fe:09 241343                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Clone/Clone.so
7fcfce3c4000-7fcfce3c5000 rw-p 00003000 fe:09 241343                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/Clone/Clone.so
7fcfce3c5000-7fcfce3c8000 r--p 00000000 fe:09 233544                     /usr/lib/x86_64-linux-gnu/libfcgi.so.0.0.0
7fcfce3c8000-7fcfce3ce000 r-xp 00003000 fe:09 233544                     /usr/lib/x86_64-linux-gnu/libfcgi.so.0.0.0
7fcfce3ce000-7fcfce3d0000 r--p 00009000 fe:09 233544                     /usr/lib/x86_64-linux-gnu/libfcgi.so.0.0.0
7fcfce3d0000-7fcfce3d1000 ---p 0000b000 fe:09 233544                     /usr/lib/x86_64-linux-gnu/libfcgi.so.0.0.0
7fcfce3d1000-7fcfce3d2000 r--p 0000b000 fe:09 233544                     /usr/lib/x86_64-linux-gnu/libfcgi.so.0.0.0
7fcfce3d2000-7fcfce3d3000 rw-p 0000c000 fe:09 233544                     /usr/lib/x86_64-linux-gnu/libfcgi.so.0.0.0
7fcfce3d3000-7fcfce3d5000 r--p 00000000 fe:09 304080                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/FCGI/FCGI.so
7fcfce3d5000-7fcfce3da000 r-xp 00002000 fe:09 304080                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/FCGI/FCGI.so
7fcfce3da000-7fcfce3db000 r--p 00007000 fe:09 304080                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/FCGI/FCGI.so
7fcfce3db000-7fcfce3dc000 r--p 00007000 fe:09 304080                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/FCGI/FCGI.so
7fcfce3dc000-7fcfce3dd000 rw-p 00008000 fe:09 304080                     /usr/lib/x86_64-linux-gnu/perl5/5.32/auto/FCGI/FCGI.so
7fcfce3dd000-7fcfce3de000 r--p 00000000 fe:09 232062                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Cwd/Cwd.so
7fcfce3de000-7fcfce3e0000 r-xp 00001000 fe:09 232062                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Cwd/Cwd.so
7fcfce3e0000-7fcfce3e1000 r--p 00003000 fe:09 232062                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Cwd/Cwd.so
7fcfce3e1000-7fcfce3e2000 r--p 00003000 fe:09 232062                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Cwd/Cwd.so
7fcfce3e2000-7fcfce3e3000 rw-p 00004000 fe:09 232062                     /usr/lib/x86_64-linux-gnu/perl-base/auto/Cwd/Cwd.so
7fcfce3e3000-7fcfce3e4000 r--p 00000000 fe:0c 33106                      /lib/x86_64-linux-gnu/ld-2.31.so
7fcfce3e4000-7fcfce404000 r-xp 00001000 fe:0c 33106                      /lib/x86_64-linux-gnu/ld-2.31.so
7fcfce404000-7fcfce40c000 r--p 00021000 fe:0c 33106                      /lib/x86_64-linux-gnu/ld-2.31.so
7fcfce40d000-7fcfce40e000 r--p 00029000 fe:0c 33106                      /lib/x86_64-linux-gnu/ld-2.31.so
7fcfce40e000-7fcfce40f000 rw-p 0002a000 fe:0c 33106                      /lib/x86_64-linux-gnu/ld-2.31.so
7fcfce40f000-7fcfce410000 rw-p 00000000 00:00 0 
7ffe30084000-7ffe300a5000 rw-p 00000000 00:00 0                          [stack]
7ffe300d4000-7ffe300d8000 r--p 00000000 00:00 0                          [vvar]
7ffe300d8000-7ffe300da000 r-xp 00000000 00:00 0                          [vdso]



More information about the pkg-perl-maintainers mailing list