Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl5.18 segfault after wait() when system don't have much free memory #13962

Closed
p5pRT opened this issue Jun 30, 2014 · 15 comments
Closed

perl5.18 segfault after wait() when system don't have much free memory #13962

p5pRT opened this issue Jun 30, 2014 · 15 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 30, 2014

Migrated from rt.perl.org#122199 (status was 'rejected')

Searchable as RT122199$

@p5pRT
Copy link
Author

p5pRT commented Jun 30, 2014

From efimov@reg.ru

The following code segfaults under FreeBSD 10
When I tried to reduce original script to this PoC I had lot of
different error messages instead of segfault​:

1) Can't locate object method "Dump" via package "Data​::Dumper"
(perhaps you forgot to load "Data​::Dumper"?) at
/usr/local/lib/perl5/5.16/mach/Data/Dumper.pm line 588.

2) Attempt to free unreferenced scalar​: SV 0x801d18ea0, Perl
interpreter​: 0x801c19c00 at 4.pl line 55.

3) Attempt to free nonexistent shared string 'usevendorprefix', Perl
interpreter​: 0x801c19c00 during global destruction.

4) Not a CODE reference at ./gemu-test-worker.pl line 1311, <STDIN> line

5) END failed--call queue aborted at ./gemu-test-worker.pl line 1311, <STDIN>

6) Core dump stack​: ...

7) or evidences of data corruption like %INC entries replaced with empty strings

===
$ perl 4.pl
Segmentation fault (core dumped)
$ cat 4.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Data​::Dumper;
unless (fork()) {
  my $sz = 2048*1024*1024;
  my $sc = "x" x $sz;
  exit(0);
}
wait();
print Dumper { a => 42};
exit();

(NOTE that $sz should be adjusted to take almost all free memory, in
my case 2048*1024*1024 for 4Gb virtual machine)

Seems parent proccess segfaults, while child process take huge amount
of memory. So parent do almost nothing and segfault after wait().
Purpose of allocating memory in child is to create a "load" for system.

Note that there were no messages in syslog (like oom killer etc),
there were but not for each process.
dmesg output​:

pid 1021 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1208 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1330 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(8)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(12)​: failed
swap_pager_getswapspace(16)​: failed
swap_pager_getswapspace(12)​: failed
pid 1375 (perl5.16.3), uid 1001, was killed​: out of swap space
pid 1406 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1439 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1471 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1536 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1569 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1601 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1603 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1605 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1607 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1611 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1613 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1619 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1621 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1658 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1662 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1664 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1670 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1672 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1676 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1682 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 1688 (perl5.16.3), uid 1001​: exited on signal 11 (core dumped)
pid 4342 (perl5.18.2), uid 1001​: exited on signal 11 (core dumped)
pid 14661 (perl5.18.2), uid 1001​: exited on signal 11 (core dumped)

Affected versions summary​:

5.16 with Clang - bug.
5.16 with gcc - no bug.

5.18 Clang/gcc - bug

5.20 clang - no bug

(of course "no bug" means "cannot reproduce bug")

Related threads - discussing same (I hope) issue​:
http​://www.perlmonks.org/?node_id=1091458
vsespb/mt-aws-glacier#81

FreeBSD version​:

$ uname -a
FreeBSD BSD10 10.0-RELEASE-p6 FreeBSD 10.0-RELEASE-p6 #0​: Tue Jun 24
07​:47​:37 UTC 2014
root@​amd64-builder.daemonology.net​:/usr/obj/usr/src/sys/GENERIC amd64

Below perl versions in details​:

Clang+5.16

Summary of my perl5 (revision 5 version 16 subversion 3) configuration​:

  Platform​:
  osname=freebsd, osvers=10.0-release-p6, archname=amd64-freebsd-thread-multi
  uname='freebsd bsd10 10.0-release-p6 freebsd 10.0-release-p6 #0​:
tue jun 24 07​:47​:37 utc 2014
root@​amd64-builder.daemonology.net​:usrobjusrsrcsysgeneric amd64 '
  config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl5/5.16/mach
-Dprivlib=/usr/local/lib/perl5/5.16
-Dman3dir=/usr/local/lib/perl5/5.16/perl/man/man3
-Dman1dir=/usr/local/man/man1
-Dsitearch=/usr/local/lib/perl5/site_perl/5.16/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.16
-Dscriptdir=/usr/local/bin
-Dsiteman3dir=/usr/local/lib/perl5/5.16/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv
-Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.16/BSDPAN"
-Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Dusethreads=y
-Dusemymalloc=n -Duse64bitint'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags
='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.16/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include',
  optimize='-O2 -pipe -fno-strict-aliasing',
  cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.16/BSDPAN"
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.2.1 Compatible FreeBSD Clang 3.3
(tags/RELEASE_33/final 183502)', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags ='-pthread -Wl,-E -fstack-protector -L/usr/local/lib'
  libpth=/usr/lib /usr/local/lib
  libs=-lm -lcrypt -lutil
  perllibs=-lm -lcrypt -lutil
  libc=, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.16/mach/CORE'
  cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib
-fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
  PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
  PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
  USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
  USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  USE_REENTRANT_API
  Built under freebsd
  Compiled at Jun 29 2014 22​:54​:34
  %ENV​:
  PERL_MB_OPT="--install_base "/home/vse/perl5""
  PERL_MM_OPT="INSTALL_BASE=/home/vse/perl5"
  @​INC​:
  /usr/local/lib/perl5/5.16/BSDPAN
  /usr/local/lib/perl5/site_perl/5.16/mach
  /usr/local/lib/perl5/site_perl/5.16
  /usr/local/lib/perl5/5.16/mach
  /usr/local/lib/perl5/5.16
  .

===

Clang + 5.18

Summary of my perl5 (revision 5 version 18 subversion 2) configuration​:

  Platform​:
  osname=freebsd, osvers=10.0-release-p6, archname=amd64-freebsd-thread-multi
  uname='freebsd bsd10 10.0-release-p6 freebsd 10.0-release-p6 #0​:
tue jun 24 07​:47​:37 utc 2014
root@​amd64-builder.daemonology.net​:usrobjusrsrcsysgeneric amd64 '
  config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl5/5.18/mach
-Dprivlib=/usr/local/lib/perl5/5.18
-Dman3dir=/usr/local/lib/perl5/5.18/perl/man/man3
-Dman1dir=/usr/local/man/man1
-Dsitearch=/usr/local/lib/perl5/site_perl/5.18/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.18
-Dscriptdir=/usr/local/bin
-Dsiteman3dir=/usr/local/lib/perl5/5.18/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv
-Uinstallusrbinperl -Dcc= -Duseshrplib -Dinc_version_list=none
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Duse64bitint
-Dusethreads=y -Dusemymalloc=n'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags
='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include',
  optimize='-O2 -pipe -fno-strict-aliasing',
  cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.2.1 Compatible FreeBSD Clang 3.3
(tags/RELEASE_33/final 183502)', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags ='-pthread -Wl,-E -fstack-protector -L/usr/local/lib'
  libpth=/usr/lib /usr/local/lib
  libs=-lm -lcrypt -lutil
  perllibs=-lm -lcrypt -lutil
  libc=, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.18/mach/CORE'
  cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib
-fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
  USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
  USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  USE_REENTRANT_API
  Built under freebsd
  Compiled at Jul 1 2014 02​:01​:05
  %ENV​:
  PERL_MB_OPT="--install_base "/home/vse/perl5""
  PERL_MM_OPT="INSTALL_BASE=/home/vse/perl5"
  @​INC​:
  /usr/local/lib/perl5/5.18/BSDPAN
  /usr/local/lib/perl5/site_perl/5.18/mach
  /usr/local/lib/perl5/site_perl/5.18
  /usr/local/lib/perl5/5.18/mach
  /usr/local/lib/perl5/5.18
  .

===

GCC + 5.18

Summary of my perl5 (revision 5 version 18 subversion 2) configuration​:

  Platform​:
  osname=freebsd, osvers=10.0-release-p6, archname=amd64-freebsd-thread-multi
  uname='freebsd bsd10 10.0-release-p6 freebsd 10.0-release-p6 #0​:
tue jun 24 07​:47​:37 utc 2014
root@​amd64-builder.daemonology.net​:usrobjusrsrcsysgeneric amd64 '
  config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl5/5.18/mach
-Dprivlib=/usr/local/lib/perl5/5.18
-Dman3dir=/usr/local/lib/perl5/5.18/perl/man/man3
-Dman1dir=/usr/local/man/man1
-Dsitearch=/usr/local/lib/perl5/site_perl/5.18/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.18
-Dscriptdir=/usr/local/bin
-Dsiteman3dir=/usr/local/lib/perl5/5.18/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv
-Uinstallusrbinperl -Dcc=gcc47 -Duseshrplib -Dinc_version_list=none
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Duse64bitint
-Dusethreads=y -Dusemymalloc=n'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='gcc47', ccflags
='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include',
  optimize='-O2 -pipe -fno-strict-aliasing',
  cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.18/BSDPAN"
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.7.3', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='gcc47', ldflags ='-pthread -Wl,-E -fstack-protector -L/usr/local/lib'
  libpth=/usr/lib /usr/local/lib
  libs=-lm -lcrypt -lutil
  perllibs=-lm -lcrypt -lutil
  libc=, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.18/mach/CORE'
  cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib
-fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
  USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
  USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  USE_REENTRANT_API
  Built under freebsd
  Compiled at Jul 1 2014 02​:07​:57
  %ENV​:
  PERL_MB_OPT="--install_base "/home/vse/perl5""
  PERL_MM_OPT="INSTALL_BASE=/home/vse/perl5"
  @​INC​:
  /usr/local/lib/perl5/5.18/BSDPAN
  /usr/local/lib/perl5/site_perl/5.18/mach
  /usr/local/lib/perl5/site_perl/5.18
  /usr/local/lib/perl5/5.18/mach
  /usr/local/lib/perl5/5.18
  .

@p5pRT
Copy link
Author

p5pRT commented Jul 1, 2014

From @iabyn

On Mon, Jun 30, 2014 at 11​:23​:40AM -0700, Victor Efimov wrote​:

$ perl 4.pl
Segmentation fault (core dumped)
$ cat 4.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Data​::Dumper;
unless (fork()) {
my $sz = 2048*1024*1024;
my $sc = "x" x $sz;
exit(0);
}
wait();
print Dumper { a => 42};
exit();

(NOTE that $sz should be adjusted to take almost all free memory, in
my case 2048*1024*1024 for 4Gb virtual machine)

Seems parent proccess segfaults, while child process take huge amount
of memory. So parent do almost nothing and segfault after wait().
Purpose of allocating memory in child is to create a "load" for system.

I can't reproduce this on linux, so what follows is just speculation.
I would guess that by the child consuming most of system memory, when the
parent tries to grab some more memory to execute the wait or more likely,
the call to Dumper with a fresh anon hash, that the parent runs out of
memory, and in some fashion fails to handle it well. Can you do an strace
on the parent and see what it's up do?

--
Never work with children, animals, or actors.

@p5pRT
Copy link
Author

p5pRT commented Jul 1, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 1, 2014

From victor@vsespb.ru

On Tue Jul 01 04​:13​:40 2014, davem wrote​:

I can't reproduce this on linux, so what follows is just speculation.

yes, I was unable to reproduce it on Linux.

I would guess that by the child consuming most of system memory, when the
parent tries to grab some more memory to execute the wait or more likely,
the call to Dumper with a fresh anon hash, that the parent runs out of
memory, and in some fashion fails to handle it well. Can you do an strace
on the parent and see what it's up do?

today, probably after VM reboot, it was very hard to reproduce Segfault, but I adjusted script a bit and here it is (perl5.16 clang)

====

$ truss -o /tmp/truss.out perl 4.pl
$ tail /tmp/truss.out
lseek(4,0x0,SEEK_CUR) = 4565 (0x11d5)
close(4) = 0 (0x0)
read(3,0x801cd0000,8192) = 0 (0x0)
close(3) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
fork() = 1032 (0x408)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
wait4(-1,{ SIGNALED,sig=SIGKILL },0x0,0x0) = 1032 (0x408)
SIGNAL 11 (SIGSEGV)
process exit, rval = 0
$ cat 4.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Data​::Dumper;
unless (fork()) {
  my $sz = 3500*1024*1024;
  my $sc = "x" x $sz;
  exit(0);
}
wait();

for (1..1000) {
  my $s = 'x' x 10_000;
  undef $s;
}

print Dumper \%INC;
exit();

====

full truss (strace) output attached.

I tried truss previously - it was same​: wait() and then segfault.

today I saw also when print Dumper { a => 42}
sometimes prints

$VAR1 = {
  'a' => 42
  };

and sometimes

$VAR1 = {
  'a'42
  };

(i.e. corrupted output). seen this previously too.

@p5pRT
Copy link
Author

p5pRT commented Jul 1, 2014

From victor@vsespb.ru

$ cat /tmp/truss.out
mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366140416 (0x80061b000)
issetugid(0x80081af30,0x7fffffffefd2,0x40,0x0,0xffff80080081bf5e,0x0) = 0 (0x0)
lstat("/etc",{ mode=drwxr-xr-x ,inode=1765632,size=2048,blksize=32768 }) = 0 (0x0)
lstat("/etc/libmap.conf",{ mode=-rw-r--r-- ,inode=1765713,size=112,blksize=32768 }) = 0 (0x0)
open("/etc/libmap.conf",O_CLOEXEC,01760) = 3 (0x3)
fstat(3,{ mode=-rw-r--r-- ,inode=1765713,size=112,blksize=32768 }) = 0 (0x0)
mmap(0x0,112,PROT_READ,MAP_PRIVATE,3,0x0) = 34366173184 (0x800623000)
close(3) = 0 (0x0)
lstat("/usr",{ mode=drwxr-xr-x ,inode=882816,size=512,blksize=32768 }) = 0 (0x0)
lstat("/usr/local",{ mode=drwxr-xr-x ,inode=882827,size=512,blksize=32768 }) = 0 (0x0)
lstat("/usr/local/etc",{ mode=drwxr-xr-x ,inode=1459392,size=512,blksize=32768 }) = 0 (0x0)
lstat("/usr/local/etc/libmap.d",0x7fffffffb718) ERR#2 'No such file or directory'
munmap(0x800623000,112) = 0 (0x0)
access("/usr/local/lib/perl5/5.16/mach/CORE/libperl.so",0) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/mach/CORE/libperl.so",O_CLOEXEC,030373770) = 3 (0x3)
fstat(3,{ mode=-r-xr-xr-x ,inode=1774501,size=1647194,blksize=32768 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366173184 (0x800623000)
mmap(0x0,3649536,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34368241664 (0x80081c000)
mmap(0x80081c000,1515520,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,3,0x0) = 34368241664 (0x80081c000)
mmap(0x800b8d000,40960,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0x171000) = 34371850240 (0x800b8d000)
munmap(0x800623000,4096) = 0 (0x0)
close(3) = 0 (0x0)
access("/usr/local/lib/perl5/5.16/mach/CORE/libm.so.5",0) ERR#2 'No such file or directory'
open("/var/run/ld-elf.so.hints",O_CLOEXEC,030373770) = 3 (0x3)
read(3,"Ehnt\^A\0\0\0\M^@​\0\0\0B\0\0\0\0"...,128) = 128 (0x80)
lseek(3,0x80,SEEK_SET) = 128 (0x80)
read(3,"/lib​:/usr/lib​:/usr/lib/compat​:/u"...,66) = 66 (0x42)
close(3) = 0 (0x0)
access("/lib/libm.so.5",0) = 0 (0x0)
open("/lib/libm.so.5",O_CLOEXEC,030373770) = 3 (0x3)
fstat(3,{ mode=-r--r--r-- ,inode=481546,size=172688,blksize=32768 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366173184 (0x800623000)
mmap(0x0,2252800,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34371891200 (0x800b97000)
mmap(0x800b97000,151552,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,3,0x0) = 34371891200 (0x800b97000)
mmap(0x800dbc000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0x25000) = 34374139904 (0x800dbc000)
munmap(0x800623000,4096) = 0 (0x0)
close(3) = 0 (0x0)
access("/usr/local/lib/perl5/5.16/mach/CORE/libcrypt.so.5",0) ERR#2 'No such file or directory'
access("/lib/libcrypt.so.5",0) = 0 (0x0)
open("/lib/libcrypt.so.5",O_CLOEXEC,030373770) = 3 (0x3)
fstat(3,{ mode=-r--r--r-- ,inode=481561,size=61992,blksize=32768 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366173184 (0x800623000)
mmap(0x0,2228224,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34374144000 (0x800dbd000)
mmap(0x800dbd000,57344,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,3,0x0) = 34374144000 (0x800dbd000)
mmap(0x800fcb000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0xe000) = 34376298496 (0x800fcb000)
mmap(0x800fcc000,69632,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1,0x0) = 34376302592 (0x800fcc000)
munmap(0x800623000,4096) = 0 (0x0)
close(3) = 0 (0x0)
access("/usr/local/lib/perl5/5.16/mach/CORE/libutil.so.9",0) ERR#2 'No such file or directory'
access("/lib/libutil.so.9",0) = 0 (0x0)
open("/lib/libutil.so.9",O_CLOEXEC,030373770) = 3 (0x3)
fstat(3,{ mode=-r--r--r-- ,inode=481547,size=70240,blksize=32768 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366173184 (0x800623000)
mmap(0x0,2170880,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34376372224 (0x800fdd000)
mmap(0x800fdd000,65536,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,3,0x0) = 34376372224 (0x800fdd000)
mmap(0x8011ec000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0xf000) = 34378530816 (0x8011ec000)
mmap(0x8011ee000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1,0x0) = 34378539008 (0x8011ee000)
munmap(0x800623000,4096) = 0 (0x0)
close(3) = 0 (0x0)
access("/usr/local/lib/perl5/5.16/mach/CORE/libthr.so.3",0) ERR#2 'No such file or directory'
access("/lib/libthr.so.3",0) = 0 (0x0)
open("/lib/libthr.so.3",O_CLOEXEC,030373770) = 3 (0x3)
fstat(3,{ mode=-r--r--r-- ,inode=481569,size=105104,blksize=32768 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366173184 (0x800623000)
mmap(0x0,2248704,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34378543104 (0x8011ef000)
mmap(0x8011ef000,102400,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,3,0x0) = 34378543104 (0x8011ef000)
mmap(0x801407000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0x18000) = 34380738560 (0x801407000)
mmap(0x801409000,45056,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1,0x0) = 34380746752 (0x801409000)
munmap(0x800623000,4096) = 0 (0x0)
close(3) = 0 (0x0)
access("/usr/local/lib/perl5/5.16/mach/CORE/libc.so.7",0) ERR#2 'No such file or directory'
access("/lib/libc.so.7",0) = 0 (0x0)
open("/lib/libc.so.7",O_CLOEXEC,030373770) = 3 (0x3)
fstat(3,{ mode=-r--r--r-- ,inode=481549,size=1567216,blksize=32768 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366173184 (0x800623000)
mmap(0x0,3772416,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34380791808 (0x801414000)
mmap(0x801414000,1458176,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,3,0x0) = 34380791808 (0x801414000)
mmap(0x801778000,49152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0x164000) = 34384347136 (0x801778000)
mmap(0x801784000,167936,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1,0x0) = 34384396288 (0x801784000)
munmap(0x800623000,4096) = 0 (0x0)
close(3) = 0 (0x0)
mmap(0x0,36864,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366173184 (0x800623000)
munmap(0x800625000,28672) = 0 (0x0)
mmap(0x0,69632,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366181376 (0x800625000)
munmap(0x800631000,20480) = 0 (0x0)
mmap(0x0,102400,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366230528 (0x800631000)
sysarch(0x81,0x7fffffffd108,0x4,0x0,0xfffffffffeeac280,0x8080808080808080) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0x7fffffffc830,1024) ERR#2 'No such file or directory'
issetugid(0x80154f93e,0x7fffffffc830,0xffffffffffffffff,0x0,0x3a,0xffffffff0fffffff) = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34384564224 (0x8017ad000)
munmap(0x8017ad000,4194304) = 0 (0x0)
mmap(0x0,8384512,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34384564224 (0x8017ad000)
munmap(0x8017ad000,339968) = 0 (0x0)
munmap(0x801c00000,3850240) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
getpid() = 1031 (0x407)
__sysctl(0x7fffffffcc50,0x2,0x8014138a0,0x7fffffffcc58,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffcb70,0x2,0x7fffffffcbb0,0x7fffffffcba8,0x801203edc,0xd) = 0 (0x0)
__sysctl(0x7fffffffcbb0,0x3,0x80141232c,0x7fffffffcc58,0x0,0x0) = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34389098496 (0x801c00000)
thr_self(0x801c06400,0x1,0x40,0x800624308,0x40,0x1) = 0 (0x0)
mmap(0x7fffffbfe000,4096,PROT_NONE,MAP_ANON,-1,0x0) = 140737484152832 (0x7fffffbfe000)
rtprio_thread(0x0,0x186e3,0x7fffffffcc28,0x801c065a0,0xffffffff,0x0) = 0 (0x0)
sysarch(0x81,0x7fffffffcc38,0x0,0x801411f00,0xffffffff,0x0) = 0 (0x0)
sigaction(32,{ 0x8011fca70 SA_SIGINFO ss_t },0x0) = 0 (0x0)
sigprocmask(SIG_UNBLOCK,0x0,0x0) = 0 (0x0)
_umtx_op(0x7fffffffcbe8,0x3,0x1,0x0,0x0,0x0) = 0 (0x0)
mprotect(0x0,0,PROT_NONE) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
getuid() = 1001 (0x3e9)
geteuid() = 1001 (0x3e9)
getgid() = 1001 (0x3e9)
getegid() = 1001 (0x3e9)
__sysctl(0x7fffffffda40,0x2,0x7fffffffda3c,0x7fffffffda48,0x0,0x0) = 0 (0x0)
open("/dev/urandom",O_RDONLY,00) = 3 (0x3)
read(3,"\M-(j8\^E",4) = 4 (0x4)
close(3) = 0 (0x0)
clock_gettime(13,{1404241782.000000000 }) = 0 (0x0)
__sysctl(0x7fffffffd920,0x4,0x0,0x7fffffffd938,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffd920,0x4,0x801c68100,0x7fffffffd938,0x0,0x0) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/5.16.3/amd64-freebsd-thread-multi",0x7fffffffd7c0) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/5.16.3",0x7fffffffd838) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/amd64-freebsd-thread-multi",0x7fffffffd8b0) ERR#2 'No such file or directory'
getuid() = 1001 (0x3e9)
geteuid() = 1001 (0x3e9)
getgid() = 1001 (0x3e9)
getegid() = 1001 (0x3e9)
ioctl(0,TIOCGETA,0xffffd5b0) = 0 (0x0)
lseek(0,0x0,SEEK_CUR) = 97865 (0x17e49)
ioctl(1,TIOCGETA,0xffffd5b0) = 0 (0x0)
lseek(1,0x0,SEEK_CUR) = 97865 (0x17e49)
ioctl(2,TIOCGETA,0xffffd5b0) = 0 (0x0)
lseek(2,0x0,SEEK_CUR) = 97865 (0x17e49)
open("4.pl",O_RDONLY,00) = 3 (0x3)
ioctl(3,TIOCGETA,0xffffd6f0) ERR#25 'Inappropriate ioctl for device'
lseek(3,0x0,SEEK_CUR) = 0 (0x0)
fcntl(3,F_SETFD,FD_CLOEXEC) = 0 (0x0)
getuid() = 1001 (0x3e9)
geteuid() = 1001 (0x3e9)
getgid() = 1001 (0x3e9)
getegid() = 1001 (0x3e9)
sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigaction(SIGCHLD,0x0,{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
read(3,"#!/usr/bin/env perl\nuse strict;"...,8192) = 234 (0xea)
stat("/usr/local/lib/perl5/5.16/BSDPAN/strict.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/strict.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/strict.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/strict.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/strict.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/strict.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/strict.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/strict.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/strict.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/strict.pm",{ mode=-r--r--r-- ,inode=1446982,size=3933,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/strict.pm",O_RDONLY,00) = 4 (0x4)
ioctl(4,TIOCGETA,0xffffd0e0) ERR#25 'Inappropriate ioctl for device'
lseek(4,0x0,SEEK_CUR) = 0 (0x0)
read(4,"package strict;\n\n$strict​::VERS"...,8192) = 3933 (0xf5d)
lseek(4,0x3ed,SEEK_SET) = 1005 (0x3ed)
lseek(4,0x0,SEEK_CUR) = 1005 (0x3ed)
close(4) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/warnings.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/warnings.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/warnings.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/warnings.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/warnings.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/warnings.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/warnings.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/warnings.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/warnings.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/warnings.pm",{ mode=-r--r--r-- ,inode=1446994,size=18776,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/warnings.pm",O_RDONLY,00) = 4 (0x4)
ioctl(4,TIOCGETA,0xffffd0e0) ERR#25 'Inappropriate ioctl for device'
lseek(4,0x0,SEEK_CUR) = 0 (0x0)
read(4,"# -*- buffer-read-only​: t -*-\n#"...,8192) = 8192 (0x2000)
read(4,"define'\t\t=> "\\x00\\x00\\x00\\"...,8192) = 8192 (0x2000)
read(4,"set = $Offsets{$category};\n "...,8192) = 2392 (0x958)
read(4,0x801cd7000,8192) = 0 (0x0)
close(4) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/Data/Dumper.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/Data/Dumper.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/Data/Dumper.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/Data/Dumper.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/Data/Dumper.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/Data/Dumper.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/Data/Dumper.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/Data/Dumper.pm",{ mode=-r--r--r-- ,inode=1774548,size=40785,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/mach/Data/Dumper.pm",O_RDONLY,00) = 4 (0x4)
ioctl(4,TIOCGETA,0xffffd0e0) ERR#25 'Inappropriate ioctl for device'
lseek(4,0x0,SEEK_CUR) = 0 (0x0)
read(4,"#\n# Data/Dumper.pm\n#\n# conver"...,8192) = 8192 (0x2000)
stat("/usr/local/lib/perl5/5.16/BSDPAN/Carp.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/Carp.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/Carp.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/Carp.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/Carp.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/Carp.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/Carp.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/Carp.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/Carp.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/Carp.pm",{ mode=-r--r--r-- ,inode=1446831,size=20408,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/Carp.pm",O_RDONLY,00) = 5 (0x5)
ioctl(5,TIOCGETA,0xffffcb60) ERR#25 'Inappropriate ioctl for device'
lseek(5,0x0,SEEK_CUR) = 0 (0x0)
read(5,"package Carp;\n\n{ use 5.006; }"...,8192) = 8192 (0x2000)
read(5,"do if $Internal{$pkg};\n }\n "...,8192) = 8192 (0x2000)
lseek(5,0x30b9,SEEK_SET) = 12473 (0x30b9)
lseek(5,0x0,SEEK_CUR) = 12473 (0x30b9)
close(5) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/Exporter.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/Exporter.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/Exporter.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/Exporter.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/Exporter.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/Exporter.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/Exporter.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/Exporter.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/Exporter.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/Exporter.pm",{ mode=-r--r--r-- ,inode=1446839,size=18671,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/Exporter.pm",O_RDONLY,00) = 5 (0x5)
ioctl(5,TIOCGETA,0xffffcb60) ERR#25 'Inappropriate ioctl for device'
lseek(5,0x0,SEEK_CUR) = 0 (0x0)
read(5,"package Exporter;\n\nrequire 5.0"...,8192) = 8192 (0x2000)
lseek(5,0x93e,SEEK_SET) = 2366 (0x93e)
lseek(5,0x0,SEEK_CUR) = 2366 (0x93e)
close(5) = 0 (0x0)
getuid() = 1001 (0x3e9)
geteuid() = 1001 (0x3e9)
getgid() = 1001 (0x3e9)
getegid() = 1001 (0x3e9)
getuid() = 1001 (0x3e9)
geteuid() = 1001 (0x3e9)
getgid() = 1001 (0x3e9)
getegid() = 1001 (0x3e9)
stat("/usr/local/lib/perl5/5.16/BSDPAN/XSLoader.pmc",0x7fffffffce78) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/XSLoader.pm",0x7fffffffcdd8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/XSLoader.pmc",0x7fffffffce78) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/XSLoader.pm",0x7fffffffcdd8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/XSLoader.pmc",0x7fffffffce78) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/XSLoader.pm",0x7fffffffcdd8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/XSLoader.pmc",0x7fffffffce78) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/XSLoader.pm",0x7fffffffcdd8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/XSLoader.pmc",0x7fffffffce78) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/XSLoader.pm",{ mode=-r--r--r-- ,inode=1446895,size=10233,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/XSLoader.pm",O_RDONLY,00) = 5 (0x5)
ioctl(5,TIOCGETA,0xffffcba0) ERR#25 'Inappropriate ioctl for device'
lseek(5,0x0,SEEK_CUR) = 0 (0x0)
read(5,"# Generated from XSLoader.pm.PL "...,8192) = 8192 (0x2000)
lseek(5,0xb46,SEEK_SET) = 2886 (0xb46)
lseek(5,0x0,SEEK_CUR) = 2886 (0xb46)
close(5) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/mach/auto/Data/Dumper/Dumper.bs",0x801c19d10) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/auto/Data/Dumper/Dumper.so",{ mode=-r-xr-xr-x ,inode=1781800,size=34888,blksize=32768 }) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/mach/auto/Data/Dumper/Dumper.bs",0x801c19d10) ERR#2 'No such file or directory'
open("/usr/local/lib/perl5/5.16/mach/auto/Data/Dumper/Dumper.so",O_CLOEXEC,072) = 5 (0x5)
fstat(5,{ mode=-r-xr-xr-x ,inode=1781800,size=34888,blksize=32768 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,5,0x0) = 34366332928 (0x80064a000)
mmap(0x0,2125824,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34393292800 (0x802000000)
mmap(0x802000000,28672,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,5,0x0) = 34393292800 (0x802000000)
mmap(0x802206000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,5,0x6000) = 34395414528 (0x802206000)
munmap(0x80064a000,4096) = 0 (0x0)
close(5) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/constant.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/constant.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/constant.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/constant.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/constant.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/constant.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/constant.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/constant.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/constant.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/constant.pm",{ mode=-r--r--r-- ,inode=1446907,size=13806,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/constant.pm",O_RDONLY,00) = 5 (0x5)
ioctl(5,TIOCGETA,0xffffcb60) ERR#25 'Inappropriate ioctl for device'
lseek(5,0x0,SEEK_CUR) = 0 (0x0)
read(5,"package constant;\nuse 5.005;\nu"...,8192) = 8192 (0x2000)
stat("/usr/local/lib/perl5/5.16/BSDPAN/warnings/register.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/warnings/register.pm",0x7fffffffc818) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/warnings/register.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/warnings/register.pm",0x7fffffffc818) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/warnings/register.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/warnings/register.pm",0x7fffffffc818) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/warnings/register.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/warnings/register.pm",0x7fffffffc818) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/warnings/register.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/warnings/register.pm",{ mode=-r--r--r-- ,inode=1851331,size=772,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/warnings/register.pm",O_RDONLY,00) = 6 (0x6)
ioctl(6,TIOCGETA,0xffffc5e0) ERR#25 'Inappropriate ioctl for device'
lseek(6,0x0,SEEK_CUR) = 0 (0x0)
read(6,"package warnings​::register;\n\no"...,8192) = 772 (0x304)
read(6,0x801d63000,8192) = 0 (0x0)
close(6) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/vars.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/vars.pm",0x7fffffffc818) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/vars.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/vars.pm",0x7fffffffc818) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/vars.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/vars.pm",0x7fffffffc818) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/vars.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/vars.pm",0x7fffffffc818) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/vars.pmc",0x7fffffffc8b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/vars.pm",{ mode=-r--r--r-- ,inode=1446986,size=2358,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/vars.pm",O_RDONLY,00) = 6 (0x6)
ioctl(6,TIOCGETA,0xffffc5e0) ERR#25 'Inappropriate ioctl for device'
lseek(6,0x0,SEEK_CUR) = 0 (0x0)
read(6,"package vars;\n\nuse 5.006;\n\no"...,8192) = 2358 (0x936)
lseek(6,0x47c,SEEK_SET) = 1148 (0x47c)
lseek(6,0x0,SEEK_CUR) = 1148 (0x47c)
close(6) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/utf8.pmc",0x7fffffffc218) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/utf8.pm",0x7fffffffc178) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/utf8.pmc",0x7fffffffc218) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/utf8.pm",0x7fffffffc178) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/utf8.pmc",0x7fffffffc218) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/utf8.pm",0x7fffffffc178) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/utf8.pmc",0x7fffffffc218) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/utf8.pm",0x7fffffffc178) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/utf8.pmc",0x7fffffffc218) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/utf8.pm",{ mode=-r--r--r-- ,inode=1446984,size=7781,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/utf8.pm",O_RDONLY,00) = 6 (0x6)
ioctl(6,TIOCGETA,0xffffbf40) ERR#25 'Inappropriate ioctl for device'
lseek(6,0x0,SEEK_CUR) = 0 (0x0)
read(6,"package utf8;\n\n$utf8​::hint_bit"...,8192) = 7781 (0x1e65)
lseek(6,0x17a,SEEK_SET) = 378 (0x17a)
lseek(6,0x0,SEEK_CUR) = 378 (0x17a)
close(6) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/utf8_heavy.pl",0x7fffffffc498) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/utf8_heavy.pl",0x7fffffffc498) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/utf8_heavy.pl",0x7fffffffc498) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/utf8_heavy.pl",0x7fffffffc498) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/utf8_heavy.pl",{ mode=-r--r--r-- ,inode=1446985,size=30820,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/utf8_heavy.pl",O_RDONLY,00) = 6 (0x6)
ioctl(6,TIOCGETA,0xffffc260) ERR#25 'Inappropriate ioctl for device'
lseek(6,0x0,SEEK_CUR) = 0 (0x0)
read(6,"package utf8;\nuse strict;\nuse "...,8192) = 8192 (0x2000)
read(6,", is the single form. The prope"...,8192) = 8192 (0x2000)
read(6," }\n\n "...,8192) = 8192 (0x2000)
read(6,"' for \\\\p{$type}\\n" if DEBUG;"...,8192) = 6244 (0x1864)
read(6,0x801d6c000,8192) = 0 (0x0)
close(6) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/unicore/Heavy.pl",0x7fffffffc2e8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/unicore/Heavy.pl",0x7fffffffc2e8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/unicore/Heavy.pl",0x7fffffffc2e8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/unicore/Heavy.pl",0x7fffffffc2e8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/unicore/Heavy.pl",{ mode=-r--r--r-- ,inode=1853165,size=110004,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/unicore/Heavy.pl",O_RDONLY,00) = 6 (0x6)
ioctl(6,TIOCGETA,0xffffc0b0) ERR#25 'Inappropriate ioctl for device'
lseek(6,0x0,SEEK_CUR) = 0 (0x0)
read(6,"# !!!!!!! DO NOT EDIT THIS FIL"...,8192) = 8192 (0x2000)
read(6,"000' => 'Nv/6000',\n'nv=60000' ="...,8192) = 8192 (0x2000)
read(6,"Devanag2',\n'blk=devanagariexten"...,8192) = 8192 (0x2000)
read(6,"' => 'Blk/UCAS',\n'blk=unifiedca"...,8192) = 8192 (0x2000)
read(6,"p' => 'Dep/Y',\n'dep=f' => '!Dep"...,8192) = 8192 (0x2000)
read(6,"Y',\n'idc=true' => 'IDC/Y',\n'id"...,8192) = 8192 (0x2000)
read(6,"lk/LatinEx5',\n'inlatinextendedb"...,8192) = 8192 (0x2000)
read(6,"yideographs' => 'Blk/CJKComp3',"...,8192) = 8192 (0x2000)
read(6,"lk/Mahjong',\n'ismahjongtiles' ="...,8192) = 8192 (0x2000)
read(6,"space' => 'Space/Y',\n'isxposixu"...,8192) = 8192 (0x2000)
read(6,"s' => 'Blk/Modifier',\n'modifier"...,8192) = 8192 (0x2000)
read(6,"> 'Sc/Mand',\n'sc=mandaic' => 'S"...,8192) = 8192 (0x2000)
read(6,"Zinh',\n'scx=zyyy' => 'Scx/Zyyy'"...,8192) = 8192 (0x2000)
read(6,"percase' => 'Cased/Y',\n'isupper"...,8192) = 3508 (0xdb4)
read(6,0x801d6c000,8192) = 0 (0x0)
close(6) = 0 (0x0)
madvise(0x801db2000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801db6000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dba000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dbe000,0x1000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dc1000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dc5000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dc8000,0x4000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dcd000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dd0000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dd4000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dd8000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801ddc000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801de0000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801de3000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801de7000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801deb000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dee000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801df2000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801df5000,0x4000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dfa000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801dfd000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e01000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e05000,0x4000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e0a000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e0e000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e11000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e15000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e18000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e1c000,0x3000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e20000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e23000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e26000,0x1000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
madvise(0x801e28000,0x2000,0x5,0xaaaaaaaaaaaaaaab,0x801c03360,0x8017abb10) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/unicore/lib/Perl/_PerlIDS.pl",0x7fffffffc2e8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/unicore/lib/Perl/_PerlIDS.pl",0x7fffffffc2e8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/unicore/lib/Perl/_PerlIDS.pl",0x7fffffffc2e8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/unicore/lib/Perl/_PerlIDS.pl",0x7fffffffc2e8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/unicore/lib/Perl/_PerlIDS.pl",{ mode=-r--r--r-- ,inode=1853867,size=5273,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/unicore/lib/Perl/_PerlIDS.pl",O_RDONLY,00) = 6 (0x6)
ioctl(6,TIOCGETA,0xffffc0b0) ERR#25 'Inappropriate ioctl for device'
lseek(6,0x0,SEEK_CUR) = 0 (0x0)
read(6,"# !!!!!!! DO NOT EDIT THIS FIL"...,8192) = 5273 (0x1499)
read(6,0x801dcd000,8192) = 0 (0x0)
close(6) = 0 (0x0)
lseek(5,0x12ff,SEEK_SET) = 4863 (0x12ff)
lseek(5,0x0,SEEK_CUR) = 4863 (0x12ff)
close(5) = 0 (0x0)
read(4,"NING(Freezer method call failed)"...,8192) = 8192 (0x2000)
read(4,"= $val;\n }\n else {\t\t\t"...,8192) = 8192 (0x2000)
stat("/usr/local/lib/perl5/5.16/BSDPAN/bytes.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/bytes.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/bytes.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/bytes.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/bytes.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/bytes.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/bytes.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/bytes.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/bytes.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/bytes.pm",{ mode=-r--r--r-- ,inode=1446904,size=3033,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/bytes.pm",O_RDONLY,00) = 5 (0x5)
ioctl(5,TIOCGETA,0xffffcb60) ERR#25 'Inappropriate ioctl for device'
lseek(5,0x0,SEEK_CUR) = 0 (0x0)
read(5,"package bytes;\n\nour $VERSION ="...,8192) = 3033 (0xbd9)
lseek(5,0x1be,SEEK_SET) = 446 (0x1be)
lseek(5,0x0,SEEK_CUR) = 446 (0x1be)
close(5) = 0 (0x0)
lseek(4,0x50db,SEEK_SET) = 20699 (0x50db)
lseek(4,0x0,SEEK_CUR) = 20699 (0x50db)
close(4) = 0 (0x0)
stat("/usr/local/lib/perl5/5.16/BSDPAN/overload.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/overload.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/overload.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/overload.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/overload.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/overload.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/overload.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/overload.pm",0x7fffffffd318) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/overload.pmc",0x7fffffffd3b8) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/overload.pm",{ mode=-r--r--r-- ,inode=1446955,size=53926,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/overload.pm",O_RDONLY,00) = 4 (0x4)
ioctl(4,TIOCGETA,0xffffd0e0) ERR#25 'Inappropriate ioctl for device'
lseek(4,0x0,SEEK_CUR) = 0 (0x0)
read(4,"package overload;\n\nour $VERSIO"...,8192) = 8192 (0x2000)
stat("/usr/local/lib/perl5/5.16/BSDPAN/overloading.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/BSDPAN/overloading.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/overloading.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/mach/overloading.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/overloading.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/site_perl/5.16/overloading.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/overloading.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/mach/overloading.pm",0x7fffffffcd98) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/overloading.pmc",0x7fffffffce38) ERR#2 'No such file or directory'
stat("/usr/local/lib/perl5/5.16/overloading.pm",{ mode=-r--r--r-- ,inode=1446956,size=1808,blksize=32768 }) = 0 (0x0)
open("/usr/local/lib/perl5/5.16/overloading.pm",O_RDONLY,00) = 5 (0x5)
ioctl(5,TIOCGETA,0xffffcb60) ERR#25 'Inappropriate ioctl for device'
lseek(5,0x0,SEEK_CUR) = 0 (0x0)
read(5,"package overloading;\nuse warnin"...,8192) = 1808 (0x710)
lseek(5,0x3c3,SEEK_SET) = 963 (0x3c3)
lseek(5,0x0,SEEK_CUR) = 963 (0x3c3)
close(5) = 0 (0x0)
lseek(4,0x11d5,SEEK_SET) = 4565 (0x11d5)
lseek(4,0x0,SEEK_CUR) = 4565 (0x11d5)
close(4) = 0 (0x0)
read(3,0x801cd0000,8192) = 0 (0x0)
close(3) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
fork() = 1032 (0x408)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
wait4(-1,{ SIGNALED,sig=SIGKILL },0x0,0x0) = 1032 (0x408)
SIGNAL 11 (SIGSEGV)
process exit, rval = 0

@p5pRT
Copy link
Author

p5pRT commented Sep 25, 2014

From lsim42@gmail.com

Hi,
I was researching a perl core dump problem when I came across this
same problem (id=122199). Could you please assist me by adding the
following info to help clear this bug.

The original author was correct to say that perl with a large data set
and forks will core dump on FreeBSD systems.

I have also found that the problem exist *only* on FreeBSD amd64 systems
and *not* on FreeBSD i386 systems.

On amd64, I've installed different versions of perl and all had the same
core-dump problem.

I have also written a small C problem to mimic the perl script and it runs
well on any system (amd64 or i386).

The core dump occurs when the child dies. This also seems to corrupt the
'stack' of the perl parent so that when the parent is ready to exit, it also
core dumps.

I have posted this problem with FreeBSD and am awaiting their response.

Thanks
sim

--
L. Sim
Phone​: +61 3 9561 7379
Email​: sim@​uniqstats.com
Web​: http​://www.uniqstats.com

@p5pRT
Copy link
Author

p5pRT commented Oct 17, 2014

From Mark.Martinec@ijs.si

sim,

I'm glad that I'm not alone with this problem. Have been experiencing
it for the last couple of months since upgrading from FreeBSD 9.2 to 10.0.
Have contacted Victor Efimov (the original poster) in August 2014,
we seem to agree that we were dealing with the same problem, although
it didn't get me very far.

I was researching a perl core dump problem when I came across this
same problem (id=122199). Could you please assist me by adding the
following info to help clear this bug.

The original author was correct to say that perl with a large data set
and forks will core dump on FreeBSD systems.

I have also found that the problem exist *only* on FreeBSD amd64 systems
and *not* on FreeBSD i386 systems.

On amd64, I've installed different versions of perl and all had the same
core-dump problem.

The core dump occurs when the child dies. This also seems to corrupt the
'stack' of the perl parent so that when the parent is ready to exit, it also
core dumps.

The above list *exactly* matches my experience.

I have posted this problem with FreeBSD and am awaiting their response.

Please provide a link.

So here are my findings. Let me start with a slightly redacted copy
of what I sent to Victor on 2014-08-01. All written there still
applies, but I'll add some additional findings at the end.

======>
I just want to let you know that we (at ijs.si) are experiencing
occasional unexplained perl crashes after upgrading to FreeBSD 10
a couple of months ago. The application is a mail content filter
amavisd-new, together with SpamAssassin module, both written in perl.

First we saw these with perl 5.20 from ports (which was built with
ithreads by default, although the application is not multithreaded).

Next we downgraded to 5.18 from ports, which just shifted the
problem to other seemingly random places, but didn't solve it.

Then I built 5.18 from ports, this time without ithrteads.
Same result, occasional crashes at seemingly random places.

Next I built 5.18 with -O0, still with clang 3.3.
The situation was a little better, instead of crashing several
times per day, this one kept going for a week without a hitch,
but now it's crashing again. Restarting the application
avoid crashes for a few days, but when crashes start happening
they are frequent again, e.g. several times per hour, until
the application is restarted again.

I guess I should try to build perl with gcc now, haven't
done it yet.

The same application was working flawlessly under 5.18 (and earlier
versions) previously on the same machine under older FreeBSD,
compiled by gcc back then. The machine has ECC memory and is
otherwise stable, no other application (mailer, dns server, mailman,
nginx, zfs, ...) are experiencing any problems.

The perl program (amavisd + SpamAssassin) consists of a master
server, which is spawning child processes, each of them is then
processing mail messages. After a couple of tasks a child process
retires and a new one is forked by a master process.

I have tried to eliminate the use of most of perl modules
with XS code, although some are still present. I don't think
the source of corruption is an XS module, looks more like a bug
in perl (manifesting itself under clang + FreeBSD 10), or
perhaps in the clang itself. I believe I also tried the clang
3.4.1 from FreeBSD-STABLE, with same results as with 3.3
from FreeBSD 10.0 release.

One thing I tried is to add​:

  use sigtrap qw(stack-trace BUS SEGV EMT FPE ILL SYS TRAP);

in the program, and run the master process attached to a
terminal (not daemonized). This did produce some interesting
perl stack traces. The reported source lines are diverse but
seem innocent enough. Typically a similar mail message being
processed causes a crash at the same source line, although
some other mail message or a change in perl version or
a small unrelated change in source shifts the crash location
to some other seemingly random line.

Just wanted to let you know that we may be experiencing the
same problem. If you have any ideas how to push the resolution
further, I'd be interested.
======<

Now for my more recent findings.

Crashes occur on FreeBSD 10.0 (amd64), but not on older OS versions.

Perl crashes regardless of the version of perl (5.18. 5.20, 5.21),
compiled with or without ithreads, compiled with clang OR WITH gcc 4.8.4
(so this is a new finding​: it is not a clang problem!).
My perl is now compiled with -DDEBUGGING, and nothing of interest
pops up.

Have been running with malloc checks enabled for a long time
(it's actually a jemalloc on FreeBSD)​:
  MALLOC_CONF="abort​:true,junk​:true,redzone​:true"
but it never showed an overruns of malloc memory sections.

I tried to run SpamAssassin tests with valgrind, which didn't show
anything interesting. Unfortunately it is way too slow to have it
running in production.

The parent process (master amavisd process) doesn't do much
except for handling child process exits and forking a new
child process to keep the number of child processes constant.

This seems to be happening​: at some point during operation
some unexplained memory corruption occurs IN THE PARENT process
(possibly as a consequence of something bad happening at a child).

I call this state of the master process 'a primed' state
(i.e. prepared (like a gun) for firing, ready for disaster).

From this point on, all newly forked child processes are
'tainted', and when some specific mail message arrives and
is processed by a child process, it will stumble across
some memory corruptions (seems like all zeroes), either
in perl opcodes, or in some data structure, and will crash.
The location of a crash depends and a mail message, on a
particular version of perl and application, and on particular
message, but the same message in the same setup always crashes
at exactly the same location. (and some other mail message
may cause crashing somewhere else, while remaining mail
messages are being processed with no problems by these
same child processes).

Restarting the master process solves the problem for a while
(from few hours to several days). The same mail messages
(still stuck in mail queue) which were causing crashes on
previous mail delivery attempts, are now processes cleanly
and without any problem.

I have collected perl core dumps (with debugging symbols) of​:
- a virgin master process (soon after a start, known to be good);
- a 'primed' master process, collected after its forked child
  processes started to experience problems;
- a child process crashing

Have browsed a bit through these core dumps, although I'm not
experienced enough with Perl internals to be able to see anything
unusual. Core dumps are available if anyone would like to take a look.

What I can say is that a 'tainted' child process can crash just
about anywhere when it stumbles on previously corrupted (cleared?)
memory, and that corruption is not its own fault, but was
inherited from a 'primed' master process.

Unfortunately I'm unable to cause the problem at will. It just
happens every few days and I need to restart the master process.

@p5pRT
Copy link
Author

p5pRT commented Oct 17, 2014

From sim@s1.uniqstats.com

Hi Mark,

Thanks for your reply. It was very painful just reading your email
as I have also gone through most of what you have done.
I have been working on this problem and nothing else for the last 5 mths!

But I think I've managed to side step the bug for my applications.

But firstly, the critical components that will cause the core dump!
(PS​: pardon me if I do seem to rehash things that you already know)

In the past, my application will run for 4 or more hours before core dumps
or funny perl internal errors start to happen. Then I managed to reduce it
to a small script that high-lights the problem.

<<<<<<<<<< start of code >>>>>>>>>>
#!/usr/local/bin/perl -w

use strict;
use POSIX;
use FileHandle;

# -----------------------------------------------------------------------------
sub run
{
  my ($ncpu, $cnt) = @​_;
  my($i, $pid);
  ## -------------------------------------------------------------
  my %tmp = ();
  for ($i=0; $i<$cnt; $i++) {
  $tmp{$i} = $i;
  }
  ## ---------------------------------------------------------------------
  print "D> Parent - start\n";
  for ($i=0; $i<$ncpu; $i++) {
  $pid = fork();
  if (!defined($pid)) {
  my $err = "E&gt; fork()​: Failure, $?";
  print $err, "\n";
  die($err);
  }
  if ($pid == 0) {
  print "D> Child Pid $$\n";

  ## Just to ensure that child uses VM
  ## Not essential.
  my($j);
  for ($j=0; $j<$cnt; $j++) {
  $_ = $tmp{$j};
  }
  sleep 5;
  ## -----------------------------------------------------
  ## exit() here will cause core-dump.
  exit(0);
  ## -----------------------------------------------------
  ## use POSIX​::_exit() to end core-dumps
  ## man perlmod and perlport for more info abt exit()
  ## This is better than the kill() approach.
  ## But *not* fool-proof in actual application.
  POSIX​::_exit(0);
  ## -----------------------------------------------------
  ## OR use kill() to remove core-dump problem!
  kill(9, $$);
  ## to give time for the kill to take affect
  while (1) {
  sleep(10);
  }
  ## -----------------------------------------------------
  exit(0);
  }
  }
  for ($i=0; $i<$ncpu; $i++) {
  if (wait() < 0) {
  my $err = "E&gt; Wait() Failure, $?";
  print $err, "\n";
  die($err);
  }
  }
  print "D> Parent - end\n";
}
# =============================================================================

# Causes coredump on dell1 1G mem, (10.0-RELEASE-p3 amd64) perl v5.16.3
# Causes coredump on cs 1G mem, (10.0-RELEASE-p3 amd64) perl v5.20.0
run(2, 2000000);

# NO coredump! on cs 1G mem, (10.0-RELEASE-p3 amd64) perl v5.14.4
#run(2, 2000000);
# Causes coredump on cs 1G mem, (10.0-RELEASE-p3 amd64) perl v5.14.4
#run(2, 2500000);

# NO coredump! on s1 2G mem, ( 6.2-RELEASE-p7 i386 ) perl v5.8.8
#run(4, 4000000);

# NO coredump! on cs1 1G mem, (10.0-RELEASE-p9 i386 ) perl v5.16.3
#run(4, 4500000);

# -----------------------------------------------------------------------------
exit 0;
<<<<<<<<<< end of code >>>>>>>>>>

For the code dump to happen, it needs all of the following conditions​:
* a parent to fork() one or more children
* a parent to wait() for the death of the child processes
* the use of the 'use' or 'require' statements.
  If you remove all 'use ...;' statements, the core dump goes away.
  Unfortunately, a perl program with no 'require' or 'use' statements
  is pretty useless!
* the child processes uses a large amount of memory so that the swap space
  is touched.
* and of course the child ends with an exit() statement
* and the child exit() while the parent is still alive.
* the OS is Fbsd 10 amd386

As you can see, this pretty covers most seriously used perl programs.

I've tested on i386 versions and the bug is not there.
I've also tested all versions of perl on Fbsd10 amd386 and all have the bug.
I've tried re-compiling perl with diff flags - no avail.
I've also tried synchronising the exits of the children wrt the parent ... no go.

It has something to do with perl's pseudo fork model, perl modules (via 'use'
or 'require') and Fbsd 10 amd386 VM architecture.
This is just gone to the too hard basket for me!

For my applications, in the past I had a parent continously forking out
children to fully utilise all the CPUs while processing jobs, where
each fork equates to a job.

I've had to change this to a parent forking out <NCPU> child processes
and then quickly does an exit(). So that when the child exits, the parent
is already dead.
Each child processes then continously request a job and processes it.

As you can see, I skip the wait() call for the parent and for the
child processes it exits with a 'POSIX​::_exit(0)'

I've tried swapping over to use threads in perl - it works but performance
sucks! :-( and it seems pretty dirty to me, %ENV limitations ...

<<<<<<<<<< start of p1 code >>>>>>>>>>
#!/usr/local/bin/perl -w

use strict;
use POSIX;
use FileHandle;

# -----------------------------------------------------------------------------
sub run
{
  my ($ncpu) = @​_;
  my($i, $pid);
  ## ---------------------------------------------------------------------
  print "D> Parent - start\n";
  for ($i=0; $i<$ncpu; $i++) {
  $pid = fork();
  if (!defined($pid)) {
  my $err = "E&gt; fork()​: Failure, $?";
  print $err, "\n";
  die($err);
  }
  if ($pid == 0) {
  ## <mark that child is alive>
  while (<there is a job>) {
  ## <Request Job somehow>

  ## <Process the Job>
  }
  ## -----------------------------------------------------
  ## DO not call exit(0) here!
  POSIX​::_exit(0);
  }
  }
  ## parent skips the 'wait()' call
  print "D> Parent - end\n";
}

run(2);
exit(0);
<<<<<<<<<< start of p1 code >>>>>>>>>>

So we run in shell​:
  cmd> p1 <with args>
  cmd> sleep 1
  cmd> sync_wait_for_child_end

<mark that child is alive>
  is actually code which open a 'lockfile' with
  flock($fh, main​::LOCK_SH);

sync_wait_for_child_end
  is a perl script that opens the 'lockfile' with
  flock($fh, main​::LOCK_EXCL);
  This allows me to know when all the children are dead.

The other trick is to let a non-perl (eg bash) script/program to
be the parent to start the child processes. Then the child perl
program can execute a job and exit. No forking in perl is involved,
so no core dump!

I had to use my approach as the application is actually quite
complicated and there is lots of perl module initialisations that need to be
done.

I've stressed tested my new code for days now and it has not core dump
or give any funny perl internal errors. Most importantly, it has generated
the right data as well :-)

Well best wishes to you.
PS​: I'll be busy from now till next week, so if you do reply, pls be patient
as I might not even see your email!

Will try to reply when I have time

See you
sim

Some small comments below

sim,

I'm glad that I'm not alone with this problem. Have been experiencing
it for the last couple of months since upgrading from FreeBSD 9.2 to 10.0.
Have contacted Victor Efimov (the original poster) in August 2014,
we seem to agree that we were dealing with the same problem, although
it didn't get me very far.

I was researching a perl core dump problem when I came across this
same problem (id=122199). Could you please assist me by adding the
following info to help clear this bug.

The original author was correct to say that perl with a large data set
and forks will core dump on FreeBSD systems.

I have also found that the problem exist *only* on FreeBSD amd64 systems
and *not* on FreeBSD i386 systems.

On amd64, I've installed different versions of perl and all had the same
core-dump problem.

The core dump occurs when the child dies. This also seems to corrupt the
'stack' of the perl parent so that when the parent is ready to exit, it also
core dumps.

The above list *exactly* matches my experience.

I have posted this problem with FreeBSD and am awaiting their response.

Please provide a link.

Gave up - no reply - might re-send to Fbsd perl mailing list later.

So here are my findings. Let me start with a slightly redacted copy
of what I sent to Victor on 2014-08-01. All written there still
applies, but I'll add some additional findings at the end.

======>
I just want to let you know that we (at ijs.si) are experiencing
occasional unexplained perl crashes after upgrading to FreeBSD 10
a couple of months ago. The application is a mail content filter
amavisd-new, together with SpamAssassin module, both written in perl.

First we saw these with perl 5.20 from ports (which was built with
ithreads by default, although the application is not multithreaded).

Next we downgraded to 5.18 from ports, which just shifted the
problem to other seemingly random places, but didn't solve it.

Then I built 5.18 from ports, this time without ithrteads.
Same result, occasional crashes at seemingly random places.

Next I built 5.18 with -O0, still with clang 3.3.
The situation was a little better, instead of crashing several
times per day, this one kept going for a week without a hitch,
but now it's crashing again. Restarting the application
avoid crashes for a few days, but when crashes start happening
they are frequent again, e.g. several times per hour, until
the application is restarted again.

I guess I should try to build perl with gcc now, haven't
done it yet.

The same application was working flawlessly under 5.18 (and earlier
versions) previously on the same machine under older FreeBSD,
compiled by gcc back then. The machine has ECC memory and is
otherwise stable, no other application (mailer, dns server, mailman,
nginx, zfs, ...) are experiencing any problems.

The perl program (amavisd + SpamAssassin) consists of a master
server, which is spawning child processes, each of them is then
processing mail messages. After a couple of tasks a child process
retires and a new one is forked by a master process.

I have tried to eliminate the use of most of perl modules
with XS code, although some are still present. I don't think
the source of corruption is an XS module, looks more like a bug
in perl (manifesting itself under clang + FreeBSD 10), or
perhaps in the clang itself. I believe I also tried the clang
3.4.1 from FreeBSD-STABLE, with same results as with 3.3
from FreeBSD 10.0 release.

One thing I tried is to add​:

use sigtrap qw(stack-trace BUS SEGV EMT FPE ILL SYS TRAP);

in the program, and run the master process attached to a
terminal (not daemonized). This did produce some interesting
perl stack traces. The reported source lines are diverse but
seem innocent enough. Typically a similar mail message being
processed causes a crash at the same source line, although
some other mail message or a change in perl version or
a small unrelated change in source shifts the crash location
to some other seemingly random line.

Just wanted to let you know that we may be experiencing the
same problem. If you have any ideas how to push the resolution
further, I'd be interested.
======<

Now for my more recent findings.

Crashes occur on FreeBSD 10.0 (amd64), but not on older OS versions.

Perl crashes regardless of the version of perl (5.18. 5.20, 5.21),
compiled with or without ithreads, compiled with clang OR WITH gcc 4.8.4
(so this is a new finding​: it is not a clang problem!).
My perl is now compiled with -DDEBUGGING, and nothing of interest
pops up.

Have been running with malloc checks enabled for a long time
(it's actually a jemalloc on FreeBSD)​:
MALLOC_CONF="abort​:true,junk​:true,redzone​:true"
but it never showed an overruns of malloc memory sections.

I tried to run SpamAssassin tests with valgrind, which didn't show
anything interesting. Unfortunately it is way too slow to have it
running in production.

The parent process (master amavisd process) doesn't do much
except for handling child process exits and forking a new
child process to keep the number of child processes constant.

This seems to be happening​: at some point during operation
some unexplained memory corruption occurs IN THE PARENT process
(possibly as a consequence of something bad happening at a child).

The death of the child when calling 'exit()', triggers the corruption in the parent,

I call this state of the master process 'a primed' state
(i.e. prepared (like a gun) for firing, ready for disaster).

From this point on, all newly forked child processes are
'tainted', and when some specific mail message arrives and
is processed by a child process, it will stumble across
some memory corruptions (seems like all zeroes), either
in perl opcodes, or in some data structure, and will crash.
The location of a crash depends and a mail message, on a
particular version of perl and application, and on particular
message, but the same message in the same setup always crashes
at exactly the same location. (and some other mail message
may cause crashing somewhere else, while remaining mail
messages are being processed with no problems by these
same child processes).

Yup!

Restarting the master process solves the problem for a while
(from few hours to several days). The same mail messages
(still stuck in mail queue) which were causing crashes on
previous mail delivery attempts, are now processes cleanly
and without any problem.

I have collected perl core dumps (with debugging symbols) of​:
- a virgin master process (soon after a start, known to be good);
- a 'primed' master process, collected after its forked child
processes started to experience problems;
- a child process crashing

Have browsed a bit through these core dumps, although I'm not
experienced enough with Perl internals to be able to see anything
unusual. Core dumps are available if anyone would like to take a look.

What I can say is that a 'tainted' child process can crash just
about anywhere when it stumbles on previously corrupted (cleared?)
memory, and that corruption is not its own fault, but was
inherited from a 'primed' master process.

Unfortunately I'm unable to cause the problem at will. It just
happens every few days and I need to restart the master process.

This is the first real bug that I see in perl that even tempted me to
switch to python or a full fledged CC code!

--
L. Sim
Phone​: +61 3 9561 7379
Email​: sim@​uniqstats.com
Web​: http​://www.uniqstats.com

--
L. Sim
Phone​: +61 3 9561 7379
Email​: sim@​uniqstats.com
Web​: http​://www.uniqstats.com

--
L. Sim
Phone​: +61 3 9561 7379
Email​: sim@​uniqstats.com
Web​: http​://www.uniqstats.com

--
L. Sim
Phone​: +61 3 9561 7379
Email​: sim@​uniqstats.com
Web​: http​://www.uniqstats.com

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2014

From @iabyn

On Sat, Oct 18, 2014 at 03​:39​:17AM +1100, L.O.Sim wrote​:

In the past, my application will run for 4 or more hours before core dumps
or funny perl internal errors start to happen. Then I managed to reduce it
to a small script that high-lights the problem.

Can you (or someone else with the ability to reproduce this) please run
this on a perl (the newest version you have access to), built with
debugging symbols (and preferably -DDEBUGGING), then provide a C-level
backtrace? Also, provide the 'perl -V' output for the perl you use.

Also if possible, run it under valgrind, or clang with Address Sanitizer,
and show what errors it reports.

--
Hofstadter's Law​: It always takes longer than you expect, even when you
take into account Hofstadter's Law.

@p5pRT
Copy link
Author

p5pRT commented Nov 3, 2014

From Mark.Martinec@ijs.si

On Sat, Oct 18, 2014 at 03​:39​:17AM +1100, L.O.Sim wrote​:

In the past, my application will run for 4 or more hours before core
dumps
or funny perl internal errors start to happen. Then I managed to
reduce it
to a small script that high-lights the problem.

2014-10-20 12​:38, Dave Mitchell via RT wrote​:

Can you (or someone else with the ability to reproduce this) please run
this on a perl (the newest version you have access to), built with
debugging symbols (and preferably -DDEBUGGING), then provide a C-level
backtrace? Also, provide the 'perl -V' output for the perl you use.

Also if possible, run it under valgrind, or clang with Address
Sanitizer,
and show what errors it reports.

Thanks Dave for your interest and concern in this matter.
Unfortunately it seems to be quite hard to reproduce the failure at
will.
Have been trying the sample code as provided by L.O.Sim here, and some
of its variations (including using Net​::Server​::PreFork, which is how
my application is dealing with handling of child processes), yet I can't
make it fail here, on the same hw, compiler and perl as my production
setup runs which is crashing every once in a while, e.g. once every day
or two or three.

Meanwhile our mail filtering application had one particularly
unfortunate
incident which (of course) started in the middle of the night and went
on onto a Saturday noon. Hence I took the advice of L.Sim (avoiding a
parent process to regularly spawn new child processes) and configured
child processes never to retire (not to exit voluntary, to be replaced
by a new child process). So instead of having 50 child processes, each
of which retiring after processing 20 mail messages, I now have 50 child
processes which never retire, and handle thousands of requests. After
several days (150.000 messages processed by the same set of 50
processes),
the setup is still alive and well, no crashes. Still under perl 5.20.1
with -DDEBUGGING, perl and modules compiled with gcc
-fstack-protector-all.

This only confirms that the problem does not originate from some xs code
in some module, but is directly related to a fork/exit/wait sequence,
leading eventually to a corruption in a parent process.

The few experiments that I have run under valgrind did not result
in a crash and neither did they detect any notable problem.
Unfortunately running under valgrind is too slow for regular mail
processing. I don't think our version of clang (3.3) already supports
Address Sanitizer, need to take another look. Still, MALLOC checks
and gcc -fstack-protector-all should have covered certain types of
memory overruns, yet none was detected. I'm beginning to suspect virtual
memory handling under FreeBSD 10.0, although if there were any problem
there it's likely that some other application would have stumbled across
that too and be reported in the last six months.

  Mark

@p5pRT
Copy link
Author

p5pRT commented Nov 5, 2014

From lsim42@gmail.com

Hi all,
Sorry for my absence of response - I'm currently away and cannot get access to my servers
to provide tests and debugging info. I can only get these done when I get back sometime in December.

The saga grinds on :-)

Sim

On 4 Nov 2014, at 7​:30 am, Mark Martinec via RT <perlbug-followup@​perl.org> wrote​:

On Sat, Oct 18, 2014 at 03​:39​:17AM +1100, L.O.Sim wrote​:
In the past, my application will run for 4 or more hours before core
dumps
or funny perl internal errors start to happen. Then I managed to
reduce it
to a small script that high-lights the problem.

2014-10-20 12​:38, Dave Mitchell via RT wrote​:

Can you (or someone else with the ability to reproduce this) please run
this on a perl (the newest version you have access to), built with
debugging symbols (and preferably -DDEBUGGING), then provide a C-level
backtrace? Also, provide the 'perl -V' output for the perl you use.

Also if possible, run it under valgrind, or clang with Address
Sanitizer,
and show what errors it reports.

Thanks Dave for your interest and concern in this matter.
Unfortunately it seems to be quite hard to reproduce the failure at
will.
Have been trying the sample code as provided by L.O.Sim here, and some
of its variations (including using Net​::Server​::PreFork, which is how
my application is dealing with handling of child processes), yet I can't
make it fail here, on the same hw, compiler and perl as my production
setup runs which is crashing every once in a while, e.g. once every day
or two or three.

Meanwhile our mail filtering application had one particularly
unfortunate
incident which (of course) started in the middle of the night and went
on onto a Saturday noon. Hence I took the advice of L.Sim (avoiding a
parent process to regularly spawn new child processes) and configured
child processes never to retire (not to exit voluntary, to be replaced
by a new child process). So instead of having 50 child processes, each
of which retiring after processing 20 mail messages, I now have 50 child
processes which never retire, and handle thousands of requests. After
several days (150.000 messages processed by the same set of 50
processes),
the setup is still alive and well, no crashes. Still under perl 5.20.1
with -DDEBUGGING, perl and modules compiled with gcc
-fstack-protector-all.

This only confirms that the problem does not originate from some xs code
in some module, but is directly related to a fork/exit/wait sequence,
leading eventually to a corruption in a parent process.

The few experiments that I have run under valgrind did not result
in a crash and neither did they detect any notable problem.
Unfortunately running under valgrind is too slow for regular mail
processing. I don't think our version of clang (3.3) already supports
Address Sanitizer, need to take another look. Still, MALLOC checks
and gcc -fstack-protector-all should have covered certain types of
memory overruns, yet none was detected. I'm beginning to suspect virtual
memory handling under FreeBSD 10.0, although if there were any problem
there it's likely that some other application would have stumbled across
that too and be reported in the last six months.

Mark

@p5pRT
Copy link
Author

p5pRT commented Dec 1, 2014

@p5pRT
Copy link
Author

p5pRT commented Jan 26, 2015

From Mark.Martinec@ijs.si

After upgrading to FreeBSD 10.1 (from 10.0) and running the same application
with the same version of Perl for two months now, with child process periodic
retiring and re-spawning new child process by a master process as previously
under FreeBSD 9.x, I can now confirm that the problem no longer occurs.

I can also confirm that the problem under 10.0 can be avoided by
not letting child processes to voluntarily exit, so the master process
never sees a child termination in wait() and never needs to spawn (fork)
another child process.

A brief summary of the problem​:

Setup​: an application consisting of a master perl process spawning worker
child processes, which periodically voluntarily self-terminate, to be
replaced by a fresh child process forked from the master process.

Environent​:
- occurs only on FreeBSD 10.0 amd64, any recent version of perl, gcc or clang.
- does not occur on FreeBSD 9.x or 10.1, and not on i383, not reproducible
  on Linux

What seems to be happening​:
- a child process after doing some work (possibly touching swap)
  does a normal exit;
- a parent process gets a SIGCHLD signal, handles a wait() and
  for some obscure reason some of its memory gets corrupted;
- a parent process forks creating a new worker child process,
  which inherits corrupted sections of parent's memory,
  consequently later leading to its (child) crash if it happens
  to use that part of the memory (opcodes or data structures)
  during its normal work. Any newly born child process inherits
  the same memory corruption and crashes alike.

So it seems the problem is somehow connected with how FreeBSD 10.0
on amd64 manages virtual memory (fork, exit, wait, possibly
involving swap). The problem is apparently fixed in 10.1, and
not present in 9.x. Does anybody have a sound explanation?

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 2015

From Mark.Martinec@ijs.si

The problem is definitely specific to version 10.0 of FreeBSD,
either due to some unidentified bug in FreeBSD (although nothing
similar has been reported in other applications), or due to
some specific interaction between perl (5.18 or 5.20) and the
operating system.

I can attest that the bug does not occur in versions 10.1 and
10.2 of FreeBSD, and neither with 9.x or earlier.

So I guess this ticket can be closed, seems the bug is not
in the perl itself.

@p5pRT p5pRT closed this as completed Mar 29, 2017
@p5pRT
Copy link
Author

p5pRT commented Mar 29, 2017

@iabyn - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant