Front page | perl.perl5.porters |
Postings from February 2003
[perl #20858] Random error msgs in shutdown?
Thread Next
From:
Brad Bowman
Date:
February 11, 2003 18:25
Subject:
[perl #20858] Random error msgs in shutdown?
Message ID:
rt-20858-50890.4.54376796706995@bugs6.perl.org
# New Ticket Created by Brad Bowman
# Please include the string: [perl #20858]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20858 >
This is a bug report for perl from bsb@strategicdata.com.au,
generated with the help of perlbug 1.33 running under perl v5.6.1.
-----------------------------------------------------------------
Hi,
I've been trying to track this down but I'm way out of my depth and
it's not too important to me that it's fixed, so over to you...
Sample symptoms, this printed on stderr:
*Regexp::DESTROY.
Out of memory!
Out of memory!
END failed--call queue aborted at a line 36.
I've pared down my the original problem but it still uses DBI(1.21)
and Carp. I haven't delved into them for more information (sorry).
Some of the code versions from my error hunting are in
http://bowman.bs/perl/bug1.txt for anyone way too interested.
During the hunt I got "*Regexp::DESTROY.", "Out of memory!",
"*main::Regexp::." "Can't return outside a subroutine" (in a sub...),
and "Modification of a read-only value attempted" errors, seemingly
randomly.
Adding a print at various points, or even changing the printed strings
would change the behaviour and error.
Adding an exit would cover the error messages.
Errors always seemed the same on repeated runs of the same code.
At one stage I got a different result depending whether I ran
the script as 'perl a' or './a':
[14:20 sb]$ head -n 1 a
#!/usr/bin/perl -w
[14:20 sb]$ perl a
in HandleError
lalala
this print needs to be here
*Regexp::DESTROY.
Out of memory!
Out of memory!
END failed--call queue aborted at a line 36.
[14:20 sb]$ ./a
in HandleError
lalala
this print needs to be here
*Regexp::DESTROY.
Here's the code I stopped with, output after the __END__:
#!/usr/bin/perl -w
use strict;
use DBI;
use Carp;
sub create {
my ($object) = @_;
my $dbh = DBI->connect(
"DBI:mysql:test:localhost",'test','',
{ HandleError => sub { warn "in HandleError\n"; confess(shift) }, }
) or warn "Can't connect to database: $DBI::errstr" and exit;
$dbh->do('drop table if exists slot');
$dbh->do('create table
slot (name varchar(10), object text, unique (name))');
$dbh->do("insert into slot (name,object) values (?,?)",undef,
'test','');
$dbh->do("insert into slot (name,object) values (?,?)",undef,
'test',$object);
# realize that sticking a stringified object into a text field
# isn't that useful, but original test was using Storable::freeze
return 1;
}
{
eval { create({1,1}); };
qr/dup/i; # no longer used...
#print $@;
print "lalala\n"; # changing the strings contents effects errors!
}
print "this print needs to be here\n";
__END__
[14:48 sb]$ perl a
in HandleError
lalala
this print needs to be here
*Regexp::DESTROY.
Out of memory!
Out of memory!
END failed--call queue aborted at a line 22.
Thanks,
Brad
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.6.1:
Configured by bod at Fri Jan 11 04:14:18 EST 2002.
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.13, archname=i386-linux
uname='linux duende 2.4.13 #1 wed oct 31 19:18:07 est 2001 i686 unknown '
config_args='-Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.6.1 -Darchlib=/usr/lib/perl/5.6.1 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.6.1 -Dsitearch=/usr/local/lib/perl/5.6.1 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Duseshrplib -Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-DDEBIAN -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.4 (Debian prerelease)', 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, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -ldb -ldl -lm -lc -lcrypt
perllibs=-ldl -lm -lc -lcrypt
libc=/lib/libc-2.2.4.so, so=so, useshrplib=true, libperl=libperl.so.5.6.1
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.6.1:
/home/bsb/japh
/usr/local/lib/perl/5.6.1
/usr/local/share/perl/5.6.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.6.1
/usr/share/perl/5.6.1
/usr/local/lib/site_perl
.
---
Environment for perl v5.6.1:
HOME=/home/bsb
LANG=en_AU
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:~/bin:~/Komodo-2.0
PERL5LIB=/home/bsb/japh
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[perl #20858] Random error msgs in shutdown?
by Brad Bowman