Closed p5pRT closed 21 years ago
Doing an install of bleadperl here on Debian/Linux PowerPC. Threading\, 64bit ints and mymalloc are on. We get:
ext/POSIX/t/is.......................Unbalanced string table refcount: (1) for "aZ" during global destruction. Unbalanced string table refcount: (1) for "a" during global destruction. Unbalanced string table refcount: (1) for "Z" during global destruction. Unbalanced string table refcount: (1) for "0" during global destruction. Unbalanced string table refcount: (1) for "" during global destruction. Unbalanced string table refcount: (1) for "z" during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for "abc " during global destruction. Unbalanced string table refcount: (1) for "." during global destruction. Unbalanced string table refcount: (1) for "9" during global destruction. Unbalanced string table refcount: (1) for "abcde" during global destruction. Unbalanced string table refcount: (1) for "012aF" during global destruction. Unbalanced string table refcount: (1) for "?" during global destruction. Unbalanced string table refcount: (1) for "abc" during global destruction. Unbalanced string table refcount: (1) for "az" during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for "A" during global destruction. ok
I can't reproduce the above outside 'make test'.
ext/POSIX/t/posix....................# Failed at ../ext/POSIX/t/posix.t line 202 # got 'Sat Sep 8 18:46:40 2001 +0200 CEST' # expected 'Sun Sep 9 03:46:40 2001 +0200 CEST' FAILED at test 31
When similar code is run from the command line I get the proper result.
$ ./perl -Ilib -MPOSIX -wle 'local $ENV{TZ} = "Europe/Berlin"; print strftime("%c %z %Z"\, localtime(1000000000))' Sun Sep 9 03:46:40 2001 +0200 CEST
Similar failures on VMS with perl@18280:
ok 198 - isxdigit('z') == 0 Unbalanced string table refcount: (1) for "aZ" during global destruction. Unbalanced string table refcount: (1) for "a" during global destruction. Unbalanced string table refcount: (1) for "Z" during global destruction. Unbalanced string table refcount: (1) for "0" during global destruction. Unbalanced string table refcount: (1) for "" during global destruction. Unbalanced string table refcount: (1) for "z" during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for "abc " during global destruction. Unbalanced string table refcount: (1) for "." during global destruction. Unbalanced string table refcount: (1) for "9" during global destruction. Unbalanced string table refcount: (1) for "abcde" during global destruction. Unbalanced string table refcount: (1) for "012aF" during global destruction. Unbalanced string table refcount: (1) for "?" during global destruction. Unbalanced string table refcount: (1) for "abc" during global destruction. Unbalanced string table refcount: (1) for "az" during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for "A" during global destruction. EXT/POSIX/T/IS....FAILED at test 199
And I also only see that in the test suite\, not when run individually.
and posix.t\, probably unrelated:
ok 30 - validating mini_mktime() and strftime(): Fri Mar 31 00:00:00 2000 091 not ok 31 - validating zone setting: Sun Sep 9 03:46:40 2001 +0200 CEST # Failed at [-.ext.posix.t]posix.t line 202 # got 'Sun Sep 9 01:46:40 2001 GMT' # expected 'Sun Sep 9 03:46:40 2001 +0200 CEST' not ok 32 - validating zone setting: Thu Jul 9 18:00:00 1998 +0200 CEST # Failed at [-.ext.posix.t]posix.t line 202 # got 'Thu Jul 9 16:00:00 1998 GMT' # expected 'Thu Jul 9 18:00:00 1998 +0200 CEST' not ok 33 - validating zone setting: Tue May 9 08:13:20 1995 +0200 CEST # Failed at [-.ext.posix.t]posix.t line 202 # got 'Tue May 9 06:13:20 1995 GMT' # expected 'Tue May 9 08:13:20 1995 +0200 CEST' not ok 34 - validating zone setting: Sat Mar 7 21:26:40 1992 +0100 CET # Failed at [-.ext.posix.t]posix.t line 202 # got 'Sat Mar 7 20:26:40 1992 GMT' # expected 'Sat Mar 7 21:26:40 1992 +0100 CET' not ok 35 - validating zone setting: Thu Jan 5 11:40:00 1989 +0100 CET # Failed at [-.ext.posix.t]posix.t line 202 # got 'Thu Jan 5 10:40:00 1989 GMT' # expected 'Thu Jan 5 11:40:00 1989 +0100 CET' ok 36 - autoloading and errno() mix
$ perl -"V" Summary of my perl5 (revision 5.0 version 9 subversion 0 patch 17881) configuration: Platform: osname=VMS\, osvers=V7.3-1\, archname=VMS_AXP-ithread uname='VMS briana V7.3-1 Digital Personal WorkStation' config_args='-"Dusedevel" -"Duseithreads" -"Dcf_email=system" -"des"' hint=none\, useposix=false\, d_sigaction=define usethreads=define useithreads=define usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=undef\, bincompat5005=undef Compiler: cc='CC/DECC'\, ccflags ='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj /NOANSI_ALIAS/float=ieee/ieee=denorm_results'\, optimize='/NoList'\, cppflags='undef' ccversion='60580002'\, gccversion=''\, gccosandvers='undef' intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16 ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='int'\, lseeksize=4 alignbytes=8\, prototype=define Linker and Libraries: ld='Link'\, ldflags ='/NoTrace/NoMap' libpth=/sys$share /sys$library libs= perllibs= libc=(DECCRTL)\, so=exe\, useshrplib=undef\, libperl=undef gnulibc_version='undef' Dynamic Linking: dlsrc=dl_vms.c\, dlext=exe\, d_dlsymun=undef\, ccdlflags='' cccdlflags=''\, lddlflags='/Share'
Characteristics of this PERLSHR image: Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT Locally applied patches: DEVEL17881 Built under VMS Compiled at Dec 10 2002 19:34:17 %ENV: PERLSHR="PERL_ROOT:[000000]PERLSHR.EXE" PERL_ROOT="D0:[CRAIG.PERL.]" @INC: perl_root:[lib.VMS_AXP.5_9_0] perl_root:[lib] perl_root:[lib.site_perl.VMS_AXP] perl_root:[lib.site_perl] /perl_root/lib/site_perl .
On Tue\, Dec 10\, 2002 at 09:58:46PM -0000\, Michael G Schwern wrote:
Doing an install of bleadperl here on Debian/Linux PowerPC. Threading\, 64bit ints and mymalloc are on. We get:
ext/POSIX/t/is.......................Unbalanced string table refcount: (1) for "aZ" during global destruction. Unbalanced string table refcount: (1) for "a" during global destruction. Unbalanced string table refcount: (1) for "Z" during global destruction. Unbalanced string table refcount: (1) for "0" during global destruction. Unbalanced string table refcount: (1) for "" during global destruction. Unbalanced string table refcount: (1) for "z" during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for "abc " during global destruction. Unbalanced string table refcount: (1) for "." during global destruction. Unbalanced string table refcount: (1) for "9" during global destruction. Unbalanced string table refcount: (1) for "abcde" during global destruction. Unbalanced string table refcount: (1) for "012aF" during global destruction. Unbalanced string table refcount: (1) for "?" during global destruction. Unbalanced string table refcount: (1) for "abc" during global destruction. Unbalanced string table refcount: (1) for "az" during global destruction. Unbalanced string table refcount: (1) for " " during global destruction. Unbalanced string table refcount: (1) for "A" during global destruction. ok
I can't reproduce the above outside 'make test'.
You probably want to set the env var
PERL_DESTRUCT_LEVEL=2
which t/TEST normally does.
ext/POSIX/t/posix....................# Failed at ../ext/POSIX/t/posix.t line 202 # got 'Sat Sep 8 18:46:40 2001 +0200 CEST' # expected 'Sun Sep 9 03:46:40 2001 +0200 CEST' FAILED at test 31
When similar code is run from the command line I get the proper result.
$ ./perl -Ilib -MPOSIX -wle 'local $ENV{TZ} = "Europe/Berlin"; print strftime("%c %z %Z"\, localtime(1000000000))' Sun Sep 9 03:46:40 2001 +0200 CEST
-- Standards (n). Battle insignia or tribal totems.
On Wed\, Dec 11\, 2002 at 09:21:00AM +0000\, Dave Mitchell wrote:
On Tue\, Dec 10\, 2002 at 09:58:46PM -0000\, Michael G Schwern wrote:
Doing an install of bleadperl here on Debian/Linux PowerPC. Threading\, 64bit ints and mymalloc are on. We get:
ext/POSIX/t/is.......................Unbalanced string table refcount: (1) for "aZ" during global destruction. Unbalanced string table refcount: (1) for "a" during global destruction.
I can't reproduce the above outside 'make test'.
You probably want to set the env var
PERL_DESTRUCT_LEVEL=2
ppc\, 64 bit all\, mymalloc and the POSIX module turn out not to be necessary. I can get this down to:
PERL_DESTRUCT_LEVEL=2 ./perl -lwe '$h{a}=1; foreach my $k (keys %h) {eval "print \$k"}' a Unbalanced string table refcount: (1) for "a" during global destruction.
on x86 Linux.
ithreads are necessary\, and probably -DDEBUGGING
Is it something in the new pad code\, and the changes to make eval work better?
Nicholas Clark
On Wed\, Dec 11\, 2002 at 03:29:56PM +0000\, Nicholas Clark wrote:
I can get this down to:
PERL_DESTRUCT_LEVEL=2 \ ./perl -lwe '$h{a}=1; foreach my $k (keys %h) {eval "print \$k"}' a Unbalanced string table refcount: (1) for "a" during global destruction.
on x86 Linux.
ithreads are necessary\, and probably -DDEBUGGING
Is it something in the new pad code\, and the changes to make eval work better?
Hah! Having completely broken the debugger\, I am relieved to report that this particular bug is *not* related to my pad code\, and in fact exists at least as far back as 5.8.0 with ithreads.
The bug is as follows:
'keys %h' creates a temp SV using a shared string (SvFAKE\, SvREADONLY). In the loop\, the lexical $k gets aliased to this SV. When the eval is compiled\, the fake entry in its pad for $k is also aliased to this. When the eval's CV is freed\, its ops are freed\, so its 'padsv(targ=1)' op is freed\, so pad_free() is called\, which does an SvREADONLY_off() on the temp SV. When the temp SV is finally freed\, sv_clear() no longer recognises it as a shared string becuase of the lack of an SvREADONLY flag\, so an extra ref is left in the string table.
This patch fixes it - I don't understand what the COW code is doing on the couple of lines above my patch\, so I don't know whether that branch of the #ifdef needs fixing too in some manner.
Dave.
-- A walk of a thousand miles begins with a single step... then continues for another 1\,999\,999 or so.
On Thu\, Dec 12\, 2002 at 01:42:38AM +0000\, Dave Mitchell wrote:
Hah! Having completely broken the debugger\, I am relieved to report that this particular bug is *not* related to my pad code\, and in fact exists at least as far back as 5.8.0 with ithreads.
Aha. So it's not one of mine (COW related)
The bug is as follows:
'keys %h' creates a temp SV using a shared string (SvFAKE\, SvREADONLY). In the loop\, the lexical $k gets aliased to this SV. When the eval is compiled\, the fake entry in its pad for $k is also aliased to this. When the eval's CV is freed\, its ops are freed\, so its 'padsv(targ=1)' op is freed\, so pad_free() is called\, which does an SvREADONLY_off() on the temp SV. When the temp SV is finally freed\, sv_clear() no longer recognises it as a shared string becuase of the lack of an SvREADONLY flag\, so an extra ref is left in the string table.
This patch fixes it - I don't understand what the COW code is doing on the couple of lines above my patch\, so I don't know whether that branch of the #ifdef needs fixing too in some manner.
I need to check what I'm smoking.
None of my squillions of smoke combinations are exercising PERL_COPY_ON_WRITE and it turns out that the ext/POSIX/t/is.t is failing on COW with ithreads and DEBUGGING. Bah. So I have to fix that bug too.
However\, I recommend putting your patch in for now. Here's a test that fails without it.
Nicholas Clark -- Befunge better than perl? http://www.perl.org/advocacy/spoofathon/
Op een ijskoude herfstdag (Saturday 14 December 2002 00:38)\, schreef Nicholas Clark:
and it turns out that the ext/POSIX/t/is\.t is failing on
COW with ithreads and DEBUGGING. Bah. So I have to fix that bug too.
It looks like your ext/POSIX/t/is.t failure is gone after 18299 (which integrates 18294)\, or did I misread you smoke-report.
Good luck\,
Abe -- Tim Bunce> Here's an easy fix: deprecate them.
*All* of them? \<finger wavering over the red big button INITIATE VSTRINGS ANNIHILATION> -- Jarkko Hietaniemi on p5p @ 2001-11-14
On Thu\, Dec 12\, 2002 at 01:42:38AM +0000\, Dave Mitchell wrote:
The bug is as follows:
'keys %h' creates a temp SV using a shared string (SvFAKE\, SvREADONLY). In the loop\, the lexical $k gets aliased to this SV. When the eval is compiled\, the fake entry in its pad for $k is also aliased to this. When the eval's CV is freed\, its ops are freed\, so its 'padsv(targ=1)' op is freed\, so pad_free() is called\, which does an SvREADONLY_off() on the temp SV.
Why is that READONLY_off needed? And why is it only for ithreads?
Here's a revised patch incorporating your patch\, plus a test for the original problem and a test for a bug I had in an intermediate solution.
I notice that this test patch will clash with another of your patches\, which adds new tests to t/op/eval.t
Nicholas Clark
On Sat\, Dec 14\, 2002 at 11:13:37PM +0000\, Nicholas Clark wrote:
Why is that READONLY_off needed? And why is it only for ithreads?
I too have no idea why its needed. I presume its for only for ithreads because only then do constants get stored in the pads.
I notice that this test patch will clash with another of your patches\, which adds new tests to t/op/eval.t
Ah well\, that's Hugo's problem :-)
-- Lady Nancy Astor: If you were my husband\, I would flavour your coffee with poison. Churchill: Madam - if I were your husband\, I would drink it.
On söndag\, dec 15\, 2002\, at 00:28 Europe/Stockholm\, Dave Mitchell wrote:
On Sat\, Dec 14\, 2002 at 11:13:37PM +0000\, Nicholas Clark wrote:
Why is that READONLY_off needed? And why is it only for ithreads?
I too have no idea why its needed. I presume its for only for ithreads because only then do constants get stored in the pads.
If ITHREADS pad relocate code turns of READONLY it should perhaps turn it on again?
I really hate these separate code paths for threads and non thread\, now that we have a shared arena I see no real poing in keeping constants in the pad.
If constants are to be kept anywhere it should be in a global pad\, just like the regexes\, but ideal would be to allocate from the shared interpreter.
Arthur
Nicholas Clark \nick@​unfortu\.net wrote: :On Thu\, Dec 12\, 2002 at 01:42:38AM +0000\, Dave Mitchell wrote: :> The bug is as follows: :> :> 'keys %h' creates a temp SV using a shared string (SvFAKE\, SvREADONLY). :> In the loop\, the lexical $k gets aliased to this SV. When the eval is :> compiled\, the fake entry in its pad for $k is also aliased to this. When :> the eval's CV is freed\, its ops are freed\, so its 'padsv(targ=1)' op is :> freed\, so pad_free() is called\, which does an SvREADONLY_off() on the :> temp SV. : :Why is that READONLY_off needed? And why is it only for ithreads? : :Here's a revised patch incorporating your patch\, plus a test for the :original problem and a test for a bug I had in an intermediate solution.
Thanks both\, applied as #18318.
Hugo
Looks like the issue got resolved\, so I'm marking the problem ticket as such\, too.
@jhi - Status changed from 'new' to 'resolved'
Nicholas Clark \nick@​ccl4\.org wrote: :ppc\, 64 bit all\, mymalloc and the POSIX module turn out not to be necessary. :I can get this down to: : :PERL_DESTRUCT_LEVEL=2 ./perl -lwe '$h{a}=1; foreach my $k (keys %h) {eval "print \$k"}' :a :Unbalanced string table refcount: (1) for "a" during global destruction. : :on x86 Linux. : :ithreads are necessary\, and probably -DDEBUGGING
I can't reproduce this with blead@18370\, built for ithreads and debugging.
Hugo
I think this got resolved by Dave's patch. I'm marking the problem ticket as resolved.
@jhi - Status changed from 'open' to 'resolved'
On Mon\, Dec 30\, 2002 at 04:10:03AM +0000\, hv@crypt.org wrote:
Nicholas Clark \nick@​ccl4\.org wrote: :ppc\, 64 bit all\, mymalloc and the POSIX module turn out not to be necessary. :I can get this down to: : :PERL_DESTRUCT_LEVEL=2 ./perl -lwe '$h{a}=1; foreach my $k (keys %h) {eval "print \$k"}' :a :Unbalanced string table refcount: (1) for "a" during global destruction. : :on x86 Linux. : :ithreads are necessary\, and probably -DDEBUGGING
I can't reproduce this with blead@18370\, built for ithreads and debugging.
That's because it was fixed by #18318 which you applied!
(although looking at perl-current-diffs/18318.gz\, it seems to be an empty patch - I'm confused...)
-- Standards (n). Battle insignia or tribal totems.
On Mon\, 30 Dec 2002 10:09:15 +0000\, Dave Mitchell \davem@​fdgroup\.com said:
> (although looking at perl-current-diffs/18318.gz\, it seems to be an empty > patch - I'm confused...)
Change 18319 by hv@hv-crypt.org on 2002/12/17 10:08:24
Whoops\, these are the changes supposed to be in #18318.
-- andreas
Dave Mitchell \davem@​fdgroup\.com wrote: :On Mon\, Dec 30\, 2002 at 04:10:03AM +0000\, hv@crypt.org wrote: :> I can't reproduce this with blead@18370\, built for ithreads and debugging. : :That's because it was fixed by #18318 which you applied! : :(although looking at perl-current-diffs/18318.gz\, it seems to be an empty :patch - I'm confused...)
As Andreas mentions\, the real change went in as #18319.
Thanks for the pointer; I must have got confused. I blame the season ...
Hugo
@jhi - Status changed from 'open' to 'resolved'
Arthur Bergman \arthur@​contiller\.se writes:
On söndag\, dec 15\, 2002\, at 00:28 Europe/Stockholm\, Dave Mitchell wrote:
On Sat\, Dec 14\, 2002 at 11:13:37PM +0000\, Nicholas Clark wrote:
Why is that READONLY_off needed? And why is it only for ithreads?
I too have no idea why its needed. I presume its for only for ithreads because only then do constants get stored in the pads.
If ITHREADS pad relocate code turns of READONLY it should perhaps turn it on again?
I really hate these separate code paths for threads and non thread\, now that we have a shared arena I see no real poing in keeping constants in the pad.
For speed. All accesses to shared arena need to obtain a lock.
If constants are to be kept anywhere it should be in a global pad\, just like the regexes\, but ideal would be to allocate from the shared interpreter.
Arthur -- Nick Ing-Simmons http://www.ni-s.u-net.com/
@jhi - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#19022 (status was 'resolved')
Searchable as RT19022$