develooper Front page | perl.perl5.porters | Postings from May 2004

[perl #29939] threads::shared use of XSLoader breaks Devel::DProf

Thread Next
From:
Norbert
Date:
May 28, 2004 17:25
Subject:
[perl #29939] threads::shared use of XSLoader breaks Devel::DProf
Message ID:
rt-3.0.9-29939-88328.1.0242427992106@perl.org
# New Ticket Created by  Norbert 
# Please include the string:  [perl #29939]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29939 >



This is a bug report for perl from beeman@spl.at,
generated with the help of perlbug 1.35 running under perl v5.8.4.


-----------------------------------------------------------------
I can't run the Devel::DProf profiler on any script that uses 
threads/shared.pm, because that lib loads itself using
XSLoader::load().  This function is written such that it bumps
up against a DProf bug, whereby it chokes on subroutines that
end with a last, goto, or next.  In XSLoader.pm:

>From XSLoader::load:
...
    # See comment block above
    return &$xs(@_);

  retry:
    require DynaLoader;
    goto &DynaLoader::bootstrap_inherit;
}

The result:
% ~/bin/perl-5.8.4/bin/perl -d:DProf ~/tmp/thread_test.pl
panic: Devel::DProf inconsistent subroutine return at /usr/bcstrong/bin/perl-5.8.4/lib/5.8.4/i686-linux-thread-multi/threads/shared.pm line 18.
BEGIN failed--compilation aborted at /usr/bcstrong/bin/perl-5.8.4/lib/5.8.4/i686-linux-thread-multi/threads/shared.pm line 35.
Compilation failed in require at /usr/bcstrong/tmp/thread_test.pl line 5.
BEGIN failed--compilation aborted at /usr/bcstrong/tmp/thread_test.pl line 5.


Predictably, if I comment out "use threads::shared" (plus 
any shared variable declarations), it runs fine.

I suppose that if this problem is going to be fixed in DProf 
then this is just a duplicate bug, but I would suggest that 
this issue increases the severity, since the major question 
marks about ithreads seems to revolve around memory usage, 
which DProf is useful for checking.


-----------------------------------------------------------------
---
Flags:
    category=library
    severity=low
---
Site configuration information for perl v5.8.4:

Configured by bcstrong at Mon May 24 14:47:16 PDT 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=linux, osvers=2.4.9-45lxset12smp, archname=i686-linux-thread-multi
    uname='linux plxc3752 2.4.9-45lxset12smp #1 smp tue jan 27 00:35:25 pst 2004 i686 unknown '
    config_args='-Duseithreads'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef 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 -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.1 2.96-85)', 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 =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.2.4'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.8.4:
    /usr/bcstrong/bin/perl-5.8.4/lib/5.8.4/i686-linux-thread-multi
    /usr/bcstrong/bin/perl-5.8.4/lib/5.8.4
    /usr/bcstrong/bin/perl-5.8.4/lib/site_perl/5.8.4/i686-linux-thread-multi
    /usr/bcstrong/bin/perl-5.8.4/lib/site_perl/5.8.4
    /usr/bcstrong/bin/perl-5.8.4/lib/site_perl
    .

---
Environment for perl v5.8.4:
    HOME=/usr/bcstrong
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=.:/usr/bcstrong/bin:/usr/local/bin:/usr/X11R6/bin:/usr/afsws/bin:/usr/afsws/etc:/usr/bin/X11:/usr/local/bin/X11R5:/usr/ucb:/bin:/usr/local/frame/bin:/usr/bin:/usr/bin:/usr/local/bin
    PERL_BADLANG (unset)
    PERL_DEBUG_MSTATS=2
    SHELL=/usr/bin/tcsh


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About