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

t/op/threads failure / crash on Debian GNU/kFreeBSD #11553

Closed
p5pRT opened this issue Aug 4, 2011 · 6 comments
Closed

t/op/threads failure / crash on Debian GNU/kFreeBSD #11553

p5pRT opened this issue Aug 4, 2011 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 4, 2011

Migrated from rt.perl.org#96272 (status was 'resolved')

Searchable as RT96272$

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 2011

From @ntyni

This is a bug report for perl from Niko Tyni <ntyni@​debian.org>,
generated with the help of perlbug 1.39 running under perl 5.15.1.


We're seeing a non-deterministic failure of test 25 (the last one)
of t/op/threads.t on multiprocessor Debian GNU/kFreeBSD systems.

The failure can be reduced to this​:

./perl -Ilib -Mthreads -e 'threads->create(sub {})->detach; fork'

which crashes here in a KVM virtual machine about 10% of the time.

The test triggering the crash was added during the 5.13 series in commit
2e0cfa1 fixing [perl #78494], but I can reproduce the crash
on 5.12.4 too.

It seems possible that the bug is in libc / kernel land, but FWIW I
haven't been able to trigger it on a FreeBSD 8.2-RELEASE system. I've
notified the Debian kFreeBSD porters, and will update this ticket if I
get more information.

If this turns out to be a bug somewhere else, perhaps the test should
be run in a fresh perl instance and skipped on gnukfreebsd?

The issue is tracked on the Debian side as http​://bugs.debian.org/628493

The backtrace is

  Program terminated with signal 11, Segmentation fault.
  #0 0x28491062 in nanosleep () at ../sysdeps/unix/syscall-template.S​:82
  82 ../sysdeps/unix/syscall-template.S​: No such file or directory.
  in ../sysdeps/unix/syscall-template.S
  (gdb) bt
  #0 0x28491062 in nanosleep () at ../sysdeps/unix/syscall-template.S​:82
  #1 0x2848f358 in __pthread_acquire (spinlock=<value optimized out>) at spinlock.c​:728
  #2 0x2848f4ce in wait_node_free (lock=0x83ebec0) at spinlock.c​:307
  #3 __pthread_alt_unlock (lock=0x83ebec0) at spinlock.c​:591
  #4 0x2848c85f in __pthread_mutex_unlock (mutex=0x83ebeb0) at mutex.c​:199
  #5 0x08159a51 in Perl_atfork_unlock () at util.c​:2975
  #6 0x2848cb86 in __pthread_fork (b=0x285c19e0) at ptfork.c​:72
  #7 0x2852dbd1 in __libc_fork () at ../linuxthreads/sysdeps/unix/sysv/linux/fork.c​:39
  #8 0x2848cab4 in __fork () at ptfork.c​:84
  #9 0x08159a8a in Perl_my_fork () at util.c​:2991
  #10 0x0829a080 in Perl_pp_fork (my_perl=0x83ebfb0) at pp_sys.c​:4021
  #11 0x08151247 in Perl_runops_debug (my_perl=0x83ebfb0) at dump.c​:2204
  #12 0x0808ef07 in S_run_body (my_perl=0x83ebfb0, oldscope=1) at perl.c​:2351
  #13 0x0808e208 in perl_run (my_perl=0x83ebfb0) at perl.c​:2269
  #14 0x0805fc9a in main (argc=5, argv=0xbfbfe7b8, env=0xbfbfe7d0) at perlmain.c​:120



Flags​:
  category=core
  severity=low


Site configuration information for perl 5.15.1​:

Configured by niko at Thu Aug 4 14​:19​:19 EEST 2011.

Summary of my perl5 (revision 5 version 15 subversion 1) configuration​:
  Local Commit​: 8a8f86a04d86583490b4ce4a9821ef57289394a9
  Ancestor​: 9cfd094
  Platform​:
  osname=gnukfreebsd, osvers=8.2-1-686-smp, archname=i686-gnukfreebsd-thread-multi
  uname='gnukfreebsd kbsd32 8.2-1-686-smp #0 sun jul 10 20​:35​:30 utc 2011 i686 i386 qemu virtual cpu version 0.14.1 gnukfreebsd '
  config_args='-Dusethreads -Dusedevel -DDEBUGGING -des -Doptimize=-g -O0'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=undef, use64bitall=undef, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-g -O0',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.6.1', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib /usr/lib/i386-kfreebsd-gnu
  libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.13'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib -fstack-protector'

Locally applied patches​:
 


@​INC for perl 5.15.1​:
  lib
  /usr/local/lib/perl5/site_perl/5.15.1/i686-gnukfreebsd-thread-multi
  /usr/local/lib/perl5/site_perl/5.15.1
  /usr/local/lib/perl5/5.15.1/i686-gnukfreebsd-thread-multi
  /usr/local/lib/perl5/5.15.1
  .


Environment for perl 5.15.1​:
  HOME=/home/niko
  LANG=en_US.UTF-8
  LANGUAGE=en_US​:en
  LC_CTYPE=fi_FI.UTF-8
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/usr/local/bin​:/usr/bin​:/bin​:/usr/local/games​:/usr/games
  PERL_BADLANG (unset)
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2012

From @jkeenan

On Thu Aug 04 05​:19​:21 2011, ntyni@​debian.org wrote​:

This is a bug report for perl from Niko Tyni <ntyni@​debian.org>,
generated with the help of perlbug 1.39 running under perl 5.15.1.

-----------------------------------------------------------------
We're seeing a non-deterministic failure of test 25 (the last one)
of t/op/threads.t on multiprocessor Debian GNU/kFreeBSD systems.

The failure can be reduced to this​:

./perl -Ilib -Mthreads -e 'threads->create(sub {})->detach; fork'

which crashes here in a KVM virtual machine about 10% of the time.

List​: is there anyone testing a threaded perl on Debian GNU/kFreeBSD
who could comment on this problem?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2012

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

@p5pRT
Copy link
Author

p5pRT commented Jun 10, 2012

From @stevenc99

Hi!

This seems to have been a bug in GNU/kFreeBSD's threads implementation
in eglibc; this was just confirmed as fixed and the Debian bug report
closed (http​://bugs.debian.org/628493) so I'm also marking it as
resolved here too.

Thank you.

@p5pRT
Copy link
Author

p5pRT commented Jun 10, 2012

From @stevenc99

I don't seem to have permissions to close this bug, but please see my
previous comment and either Niko or an admin here kindly mark this as
resolved. Thanks.

@p5pRT
Copy link
Author

p5pRT commented Jun 11, 2012

@cpansprout - Status changed from 'open' to 'resolved'

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