develooper Front page | perl.perl5.porters | Postings from October 2013

[perl #120170] debugger hangs while debugging threaded app

Vladimir Lettiev
October 11, 2013 00:26
[perl #120170] debugger hangs while debugging threaded app
Message ID:
# New Ticket Created by  Vladimir Lettiev 
# Please include the string:  [perl #120170]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.39 running under perl 5.16.3.

[Please describe your issue here]

Debugger hangs in this simple test case (-dt)

$ PERLDB_OPTS="noTTY" perl -Mthreads -Mthreads::shared -dt -e "threads->create(sub{})->join"
[1] 15763
Threads support enabled

# strace -p 15763
Process 15763 attached
futex(0x77aa3c, FUTEX_WAIT_PRIVATE, 1, NULL

$ kill -KILL 15763

Debugger without threads support works fine (-d)

$ PERLDB_OPTS="noTTY" perl -Mthreads -Mthreads::shared -d -e "threads->create(sub{})->join"

But with perl 5.18 ( > '1.39_05') this is also broken:

$ PERLDB_OPTS="noTTY" perl -Mthreads -Mthreads::shared -d -e "threads->create(sub{})->join"
lock can only be used on shared values at /usr/share/perl5/ line 4100.
BEGIN failed--compilation aborted.

[Please do not change anything below this line]
Site configuration information for perl 5.16.3:

Configured by ALT Linux Team at Tue Mar 12 06:36:36 UTC 2013.

Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
    osname=linux, osvers=3.8.2-std-def-alt1, archname=x86_64-linux-thread-multi
    uname='linux localhost.localdomain 3.8.2-std-def-alt1 #1 smp mon mar 4 07:54:40 utc 2013 x86_64 gnulinux '
    config_args='-ders -Dusethreads -Duseithreads -Duselargefiles -Duseshrplib -Dcc=gcc -Doptimize=-pipe -Wall -g -O2 -DDEBUGGING=maybe -Dprefix=/usr -Dprivlib=/usr/share/perl5 -Darchlib=/usr/lib64/perl5 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib64/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.16 -Dsitearch=/usr/local/lib64/perl/5.16 -Dotherlibdirs=/etc/perl5:/usr/lib/perl5/vendor_perl -Dinc_version_list=none -Dpager=/usr/bin/less -isR -Dman1dir=none -Dman3dir=none -Dcf_by=ALT Linux Team -Dcf_email=Alexey Tourbin <> -Dmyhostname=localhost -Dperladmin=root@localhost'
    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
    cc='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='-pipe -Wall -g -O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.7.2 20121109 (ALT Linux 4.7.2-alt7)', 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='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib64 /usr/lib64 /lib /usr/lib /usr/local/lib64
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -pipe -Wall -g -O2 -L/usr/local/lib -fstack-protector'

Locally applied patches:

@INC for perl 5.16.3:

Environment for perl 5.16.3:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/bin/zsh Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About