Skip Menu |
 

This queue is for tickets about the threads CPAN distribution.

Report information
The Basics
Id: 55633
Status: resolved
Priority: 0/
Queue: threads

People
Owner: Nobody in particular
Requestors: jquelin [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.77



Subject: race condition in t/thread.t?
Download (untitled) / with headers
text/plain 5.3k
when testing latest threads, t/thread.t fails randomly on my machine. ok 25 - Check that rand() is randomized in new threads ok 26 - coredump in global destruction ok 27 - fresh_perl - thread sub via scalar ok 28 - fresh_perl - thread sub via $_[0] ok 29 - fresh_perl - void eval return ok 30 - objs clone skip at depth 0 ok 31 - objs clone skip at depth 1 ok 32 - objs clone skip at depth 2 ok 33 - counts of calls to CLONE_SKIP ok 34 - counts of calls to DESTROY Show quoted text
---- test stuck here about one time out of 2 ---- when packaging it for mandriva, and sending it on the build system (16 procs), it *always* fails (stuck after test #34). stracing the test gives: $ strace perl -Iblib/lib -Iblib/arch t/thread.t [....] write(1, "ok 33 - counts of calls to CLONE"..., 38ok 33 - counts of calls to CLONE_SKIP ) = 38 write(1, "ok 34 - counts of calls to DESTR"..., 35ok 34 - counts of calls to DESTROY ) = 35 rt_sigprocmask(SIG_BLOCK, ~[ILL BUS SEGV RTMIN RT_1], [], 8) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 lseek(0, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 lseek(1, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 lseek(2, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) clone(child_stack=0x2ba07f004ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x2ba07f0059e0, tls=0x2ba07f005710, child_tidptr=0x2ba07f0059e0) = 21239 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 futex(0xb20aa0, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0x2ba064182c5c, FUTEX_WAIT_PRIVATE, 1, NULL ==> this makes me think of a fishy race condition, but i may be wrong. for the record: $ perl -V Summary of my perl5 (revision 5 version 10 subversion 1) configuration: Platform: osname=linux, osvers=2.6.22.12-server-1mdv, archname=x86_64-linux-thread-multi uname='linux klodia.mandriva.com 2.6.22.12-server-1mdv #1 smp tue nov 20 13:57:31 est 2007 x86_64 genuine intel(r) cpu 3.20ghz gnulinux ' config_args='-des -Dinc_version_list=5.10.0 5.10.0/x86_64-linux-thread-multi 5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.6.1 5.6.0 -Darchname=x86_64-linux -Dcc=x86_64-mandriva-linux-gnu-gcc -Doptimize=-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -DDEBUGGING=-g -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dsitebin=/usr/local/bin -Dsiteman1dir=/usr/local/share/man/man1 -Dsiteman3dir=/usr/local/share/man/man3 -Dman3ext=3pm -Dcf_by=Mandriva -Dmyhostname=localhost -Dperladmin=root@localhost -Dcf_email=root@localhost -Dd_dosuid -Ud_csh -Duseshrplib -Duseithreads -Di_db -Di_ndbm -Di_gdbm' 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='x86_64-mandriva-linux-gnu-gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.4.2', 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='x86_64-mandriva-linux-gnu-gcc', ldflags =' -fstack-protector -L/usr/local/lib64' libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.11.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.11' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.10.1/x86_64-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -L/usr/local/lib64' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: Mandriva Linux patches Built under linux Compiled at Dec 17 2009 05:38:24 @INC: /usr/lib/perl5/site_perl/5.10.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.1 /usr/lib/perl5/vendor_perl/5.10.1/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.1 /usr/lib/perl5/5.10.1/x86_64-linux-thread-multi /usr/lib/perl5/5.10.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl .
Download (untitled) / with headers
text/plain 896b
On Tue Mar 16 13:05:32 2010, JQUELIN wrote: Show quoted text
> when testing latest threads, t/thread.t fails randomly on my machine. > ok 25 - Check that rand() is randomized in new threads > ok 26 - coredump in global destruction > ok 27 - fresh_perl - thread sub via scalar > ok 28 - fresh_perl - thread sub via $_[0] > ok 29 - fresh_perl - void eval return > ok 30 - objs clone skip at depth 0 > ok 31 - objs clone skip at depth 1 > ok 32 - objs clone skip at depth 2 > ok 33 - counts of calls to CLONE_SKIP > ok 34 - counts of calls to DESTROY > ---- test stuck here about one time out of 2 ----
I see the same problem here for our linux-x86 builds with threads-1.76. The test seem to always get stuck here for me. No test failure on other Unix systems (Solaris, HP-UX, AIX, OS X) and not even a failure on our linux-x86_64 builds. This is a regression since threads- 1.75 where the test pass just fine.
Download (untitled) / with headers
text/plain 155b
Apparently my claim that this did not cause problems on the other Unix machines is wrong. This test also cause problems for our Solaris and HP-UX builds.
From: jdhedden [...] 1979.usna.com
Download (untitled) / with headers
text/plain 227b
On Tue Mar 16 13:05:32 2010, JQUELIN wrote: Show quoted text
> when testing latest threads, t/thread.t fails randomly on my machine.
Thanks for the bug report. I have corrected this problem with the test and have uploaded threads 1.77 to CPAN.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.