Front page | perl.perl5.porters |
Postings from April 2018
[perl #133099] SigALRM + close() + die() -> "refcnt: fd -1 < 0"
From:
Evgenii Lepikhin
Date:
April 11, 2018 17:20
Subject:
[perl #133099] SigALRM + close() + die() -> "refcnt: fd -1 < 0"
Message ID:
rt-4.0.24-16424-1523451206-230.133099-75-0@perl.org
# New Ticket Created by Evgenii Lepikhin
# Please include the string: [perl #133099]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=133099 >
This is a bug report for perl from johnlepikhin@gmail.com,
generated with the help of perlbug 1.40 running under perl 5.24.1.
-----------------------------------------------------------------
Perl crashes with error message "refcnt: fd -1 < 0" when exception
is thrown in SigALRM handler while waiting for child process to be
closed. How to reproduce:
$ perl -e 'alarm(1); $SIG{ALRM} = sub { die "" }; open($fh, "-|",
"sleep 2"); eval { close($fh); } '
refcnt: fd -1 < 0
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
Site configuration information for perl 5.24.1:
Configured by Debian Project at Tue Sep 12 16:37:26 UTC 2017.
Summary of my perl5 (revision 5 version 24 subversion 1)
configuration:
Platform:
osname=linux, osvers=3.16.0,
archname=x86_64-linux-gnu-thread-multi
uname='linux localhost 3.16.0 #1 smp debian 3.16.0 x86_64
gnulinux '
config_args='-Dusethreads -Duselargefiles
-Dcc=x86_64-linux-gnu-gcc -Dcpp=x86_64-linux-gnu-cpp
-Dld=x86_64-linux-gnu-gcc -Dccflags=-DDEBIAN -Wdate-time
-D_FORTIFY_SOURCE=2 -g -O2
-fdebug-prefix-map=/build/perl-Gg9XxY/perl-5.24.1=. -fstack-protector-strong
-Wformat -Werror=format-security -Dldflags= -Wl,-z,relro
-Dlddlflags=-shared -Wl,-z,relro -Dcccdlflags=-fPIC
-Darchname=x86_64-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.24
-Darchlib=/usr/lib/x86_64-linux-gnu/perl/5.24
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/x86_64-linux-gnu/perl5/5.24
-Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.24.1
-Dsitearch=/usr/local/lib/x86_64-linux-gnu/perl/5.24.1
-Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3
-Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dusesitecustomize
-Duse64bitint -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm
-Uusesfio -Uusenm -Ui_libutil -Uversiononly -DDEBUGGING=-g
-Doptimize=-O2 -dEs -Duseshrplib -Dlibperl=libperl.so.5.24.1'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='x86_64-linux-gnu-gcc', ccflags ='-D_REENTRANT
-D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2 -g',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv
-fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='6.3.0 20170516', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8,
byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16, longdblkind=3
ivtype='long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='x86_64-linux-gnu-gcc', ldflags =' -fstack-protector-strong
-L/usr/local/lib'
libpth=/usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu
/lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=libc-2.24.so, so=so, useshrplib=true,
libperl=libperl.so.5.24
gnulibc_version='2.24'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib
-fstack-protector-strong'
Locally applied patches:
DEBPKG:debian/cpan_definstalldirs - Provide a sensible
INSTALLDIRS default for modules installed from CPAN.
DEBPKG:debian/db_file_ver - https://bugs.debian.org/340047
Remove overly restrictive DB_File version check.
DEBPKG:debian/doc_info - Replace generic man(1) instructions
with Debian-specific information.
DEBPKG:debian/enc2xs_inc - https://bugs.debian.org/290336
Tweak enc2xs to follow symlinks and ignore missing @INC
directories.
DEBPKG:debian/errno_ver - https://bugs.debian.org/343351
Remove Errno version check due to upgrade problems with
long-running processes.
DEBPKG:debian/libperl_embed_doc -
https://bugs.debian.org/186778 Note that libperl-dev package
is required for embedded linking
DEBPKG:fixes/respect_umask - Respect umask during installation
DEBPKG:debian/writable_site_dirs - Set umask approproately for
site install directories
DEBPKG:debian/extutils_set_libperl_path - EU:MM: set location
of libperl.a under /usr/lib
DEBPKG:debian/no_packlist_perllocal - Don't install .packlist
or perllocal.pod for perl or vendor
DEBPKG:debian/fakeroot - Postpone LD_LIBRARY_PATH evaluation
to the binary targets.
DEBPKG:debian/instmodsh_doc - Debian policy doesn't install
.packlist files for core or vendor.
DEBPKG:debian/ld_run_path - Remove standard libs from
LD_RUN_PATH as per Debian
--
QA automation engineer at Mail.ru. Telegram: johnlepikhin
-
[perl #133099] SigALRM + close() + die() -> "refcnt: fd -1 < 0"
by Evgenii Lepikhin