Open p5pRT opened 9 years ago
perl-clone-using is missing initialzation of PL_op_exec_cnt\, so subthreads cause perl-destruct to spew stuff like this...
Trace of all OPs executed: null: 12370169555311111333 stub: 12370169555311111086 scalar: 12370169555311111083 pushmark: 12370169555311135659 wantarray: 12370169555311111289 const: 12370169555311157759 gvsv: 12370169555311122860 gv: 12370169555311127042 gelem: 12370169555311111083 padsv: 12370169555311256467 padav: 12370169555311117256 padhv: 12370169555311111174 padany: 12370169555311111083 ...
Many of the numbers convert to ABABABAB in hex\, a clear mem-poison value.
I have a patch\, will attach with ticket #
4 patches actually
1. the bug fix\, add Zero to perl-clone-using\, to silence ABAB... count errors 2. harmless\, helpful\, not necessary 3. noticed while doing next 4. probably wants discussion
On Wed\, Apr 8\, 2015 at 5:49 PM\, Jim Cromie \perlbug\-followup@​perl\.org wrote:
# New Ticket Created by Jim Cromie # Please include the string: [perl #124267] # in the subject line of all future correspondence about this issue. # \<URL: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124267 >
Reply-To: jim.cromie@gmail.com From: jim.cromie@gmail.com Cc: jim.cromie@gmail.com Subject: perl-clone-using missing Zero\, seen in -DPERL_TRACE_OPS -Dusethreads builds To: perlbug@perl.org Message-Id: \5\.21\.11\_4278\_1428343855@​groucho\.jimc\.earth
This is a bug report for perl from jim.cromie@gmail.com\, generated with the help of perlbug 1.40 running under perl 5.21.11.
----------------------------------------------------------------- [Please describe your issue here]
perl-clone-using is missing initialzation of PL_op_exec_cnt\, so subthreads cause perl-destruct to spew stuff like this...
Trace of all OPs executed: null: 12370169555311111333 stub: 12370169555311111086 scalar: 12370169555311111083 pushmark: 12370169555311135659 wantarray: 12370169555311111289 const: 12370169555311157759 gvsv: 12370169555311122860 gv: 12370169555311127042 gelem: 12370169555311111083 padsv: 12370169555311256467 padav: 12370169555311117256 padhv: 12370169555311111174 padany: 12370169555311111083 ...
Many of the numbers convert to ABABABAB in hex\, a clear mem-poison value.
I have a patch\, will attach with ticket #
[Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl 5.21.11:
Configured by jimc at Fri Apr 3 15:10:58 MDT 2015.
Summary of my perl5 (revision 5 version 21 subversion 11) configuration: Commit id: c9383a794bc7e8a7016d41018dbedbd0be10b83d Platform: osname=linux\, osvers=3.14.27-100.fc19.x86_64\, archname=x86_64-linux-thread-multi uname='linux groucho.jimc.earth 3.14.27-100.fc19.x86_64 #1 smp wed dec 17 19:36:34 utc 2014 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Dusedevel -Dusethreads -DDEBUGGING -Accflags= -DPERL_OP_PARENT -DPERL_TRACE_OPS_EXT -DPERL_TRACE_OPS' hint=recommended\, useposix=true\, d_sigaction=define useithreads=define\, usemultiplicity=define use64bitint=define\, use64bitall=define\, uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler: cc='cc'\, ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_OP_PARENT -DPERL_TRACE_OPS_EXT -DPERL_TRACE_OPS -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'\, optimize='-O2 -g'\, cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_OP_PARENT -DPERL_TRACE_OPS_EXT -DPERL_TRACE_OPS -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion=''\, gccversion='4.8.3 20140911 (Red Hat 4.8.3-7)'\, gccosandvers='' intsize=4\, longsize=8\, ptrsize=8\, doublesize=8\, byteorder=12345678\, doublekind=3 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16\, longdblkind=3 ivtype='long'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8 alignbytes=8\, prototype=define Linker and Libraries: ld='cc'\, ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.17.so\, so=so\, useshrplib=false\, libperl=libperl.a gnulibc_version='2.17' Dynamic Linking: dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-Wl\,-E' cccdlflags='-fPIC'\, lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'
--- @INC for perl 5.21.11: /usr/local/lib/perl5/site_perl/5.21.11/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.21.11 /usr/local/lib/perl5/5.21.11/x86_64-linux-thread-multi /usr/local/lib/perl5/5.21.11 /usr/local/lib/perl5/site_perl .
--- Environment for perl 5.21.11: HOME=/home/jimc LANG=en_US.UTF-8 LANGUAGE (unset)
LD_LIBRARY_PATH=/usr/lib64/mpich/lib:/usr/lib64/alliance/lib:/usr/lib64/alliance/lib LOGDIR (unset)
PATH=/usr/lib64/qt-3.3/bin:/usr/lib64/mpich/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/usr/lib64/alliance/bin:/usr/libexec/sdcc:/home/jimc/bin:./bin:.:/home/jimc/.local/bin:/home/jimc/bin:/usr/lib64/alliance/bin:/usr/libexec/sdcc:/home/jimc/bin:./bin:. PERL_BADLANG (unset) SHELL=/bin/bash
On Wed Apr 08 22:47:09 2015\, yoduh wrote:
4 patches actually
1. the bug fix\, add Zero to perl-clone-using\, to silence ABAB... count errors
This one make sense.
2. harmless\, helpful\, not necessary
An alternative might be to add the op-counting to the regular run loop\, since it's only done when PERL_TRACE_OPS is defined it makes no performance difference to a standard build.
3. noticed while doing next
This is good.
4. probably wants discussion
If we allow counting in the standard loop this would need to be triggered by something else\, maybe an environment variable.
Tony
The RT System itself - Status changed from 'new' to 'open'
On Tue\, Apr 14\, 2015 at 9:55 PM\, Tony Cook via RT \<perlbug-followup@perl.org
wrote:
On Wed Apr 08 22:47:09 2015\, yoduh wrote:
4 patches actually
1. the bug fix\, add Zero to perl-clone-using\, to silence ABAB... count errors
This one make sense.
do you want to take the good parts now\, or wait for a fully cooked set ?
2. harmless\, helpful\, not necessary
An alternative might be to add the op-counting to the regular run loop\, since it's only done when PERL_TRACE_OPS is defined it makes no performance difference to a standard build.
In 75d476e24 Steffen chose to do it only in runops_debug\, I didnt see any reason to expand its scope. Basically\, the patch upgrades his DEBUGGING only comment to a compiler directive.
3. noticed while doing next
This is good.
4. probably wants discussion
If we allow counting in the standard loop this would need to be triggered by something else\, maybe an environment variable.
If we were to go that way\, the -D flag could trigger the same behavior\, but we'd have to at least silence the warning issued about recompiling with -DDEBUGGING. And Id prefer not to have 2 separate op-countings which should/have-to be kept in sync.
thanks Jim
Tony
--- via perlbug: queue: perl5 status: new https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124267
On Wed Apr 15 09:19:49 2015\, yoduh wrote:
On Tue\, Apr 14\, 2015 at 9:55 PM\, Tony Cook via RT \<perlbug-followup@perl.org
wrote:
On Wed Apr 08 22:47:09 2015\, yoduh wrote:
4 patches actually
1. the bug fix\, add Zero to perl-clone-using\, to silence ABAB... count errors
This one make sense.
do you want to take the good parts now\, or wait for a fully cooked set ?
2. harmless\, helpful\, not necessary
An alternative might be to add the op-counting to the regular run loop\, since it's only done when PERL_TRACE_OPS is defined it makes no performance difference to a standard build.
In 75d476e24 Steffen chose to do it only in runops_debug\, I didnt see any reason to expand its scope. Basically\, the patch upgrades his DEBUGGING only comment to a compiler directive.
3. noticed while doing next
This is good.
4. probably wants discussion
If we allow counting in the standard loop this would need to be triggered by something else\, maybe an environment variable.
If we were to go that way\, the -D flag could trigger the same behavior\, but we'd have to at least silence the warning issued about recompiling with -DDEBUGGING. And Id prefer not to have 2 separate op-countings which should/have-to be kept in sync.
I applied the "good bits" as 440568ac3ea48995957904d59ba142ce1ae72d90 and 440568ac3ea48995957904d59ba142ce1ae72d90\, and thought I'd commented here.
As to the -D flag\, it is possible to use the debug run loop on a non-debugging perl - Devel::Peek has a function that can switch back and forth:
tony@mars:.../git/perl$ ./perl -Ilib -e 'print "Foo"' 2>&1 | grep print sprintf: 0 print: 0 tony@mars:.../git/perl$ ./perl -Ilib -MDevel::Peek -e 'BEGIN { runops_debug(1) } print "Foo"' 2>&1 | grep print sprintf: 0 print: 1 tony@mars:.../git/perl$ ./perl -Ilib -V:ccflags 2>/dev/null ccflags='-DPERL_TRACE_OPS -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2';
Tony
ok\, this revises the bits of my previous PERL_TRACE_OPS patchset which you declined last time.
- drops the #ifdeffery patch that would break Devel::Peek - thanks for the example Tony.
1 - silence "\
make test still fails\, just "Trace of all OPs executed:" is enough to trigger this.
2- suppress printing if $ENV{PERL_TRACE_OPS} == 0 based upon Tony's suggestion This is far cleaner than messing with -D flags as in 1st rev\, esp as -D is ignored unless -DDEUBGGING
with both patches\, (just 2nd really)\, this will pass: PERL_TRACE_OPS=0 make test
On Tue\, Jun 9\, 2015 at 7:25 PM\, Tony Cook via RT \perlbug\-followup@​perl\.org wrote:
An alternative might be to add the op-counting to the regular run loop\, since it's only done when PERL_TRACE_OPS is defined it makes no performance difference to a standard build.
given your Devel::Peek usage below\, I think its best to leave runops-standard alone\, and let those who want TRACE_OPS counting get it your way. We dont need counting done 2x\, differently.
4. probably wants discussion
If we allow counting in the standard loop this would need to be triggered by something else\, maybe an environment variable.
it has been superceded by [perl #127880]
124267 missing init in perl-clone-using for -Dusethreads -DPERL_TRACE_OPS build open
Migrated from rt.perl.org#124267 (status was 'open')
Searchable as RT124267$