develooper Front page | perl.perl5.porters | Postings from February 2003

[perl #20858] Random error msgs in shutdown?

Thread Next
Brad Bowman
February 11, 2003 18:25
[perl #20858] Random error msgs in shutdown?
Message ID:
# New Ticket Created by  Brad Bowman 
# Please include the string:  [perl #20858]
# 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.33 running under perl v5.6.1.


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:
  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 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

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
  this print needs to be here
  Out of memory!
  Out of memory!
  END failed--call queue aborted at a line 36.
  [14:20 sb]$ ./a
  in HandleError
  this print needs to be here

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(
    { 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,
    $dbh->do("insert into slot (name,object) values (?,?)",undef,
    # 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";


[14:48 sb]$ perl a
in HandleError
this print needs to be here
Out of memory!
Out of memory!
END failed--call queue aborted at a line 22.



[Please do not change anything below this line]
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:
    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 -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
    cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    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/, so=so, useshrplib=true,
  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:

Environment for perl v5.6.1:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About