Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

malloc failure in DBD::Informix #3254

Closed
p5pRT opened this issue Jan 23, 2001 · 5 comments
Closed

malloc failure in DBD::Informix #3254

p5pRT opened this issue Jan 23, 2001 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 23, 2001

Migrated from rt.perl.org#5438 (status was 'resolved')

Searchable as RT5438$

@p5pRT
Copy link
Author

p5pRT commented Jan 23, 2001

From [email protected]

We are experiencing intermittent cores during execution of a perl app
using the DBD​::Informix module. It happens with greater frequency when
the system is busy, but it also happens that the exact procedure can
be rerun successfully just a few minutes after a crash. I don't have
a lot to work with, except that each gdb stack trace shows the failure
happens in malloc, but the malloc is not always called from the same
place. Many other processes are running at the same time without any
malloc failures, and vmstat shows plenty of memory available. A sample
stack trace looks like this​:

#0 0x2a09c in malloc ()
#1 0xff087728 in _iqprepare () from /usr/informix9/lib/esql/libifsql.so
#2 0xff087580 in sqli_prep () from /usr/informix9/lib/esql/libifsql.so
#3 0xff0ea7d0 in dbd_ix_st_prepare ()
  from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Informix/Inf
ormix.so
#4 0xff0e5654 in XS_DBD__Informix__st__prepare ()
  from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Informix/Inf
ormix.so
#5 0x64fb4 in Perl_pp_entersub ()
#6 0x9eb54 in Perl_runops_standard ()
#7 0x26d28 in perl_call_sv ()
#8 0xff118164 in XS_DBI_dispatch ()
  from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBI/DBI.so
#9 0x64fb4 in Perl_pp_entersub ()
#10 0x9eb54 in Perl_runops_standard ()
#11 0x26d28 in perl_call_sv ()
#12 0xff118164 in XS_DBI_dispatch ()
  from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBI/DBI.so
#13 0x64fb4 in Perl_pp_entersub ()
#14 0x9eb54 in Perl_runops_standard ()
#15 0x26444 in perl_run ()
#16 0x23fc0 in main ()

My version of DBD​::Informix seems to be 0.97005.
The Informix engine is 9.21.UC1 and ESQL is 9.40.UC2

Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl v5.6.0:

Configured by jmm at Wed Nov 29 11:10:25 MST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos pandemic 5.7 generic_106541-12 sun4u sparc sunw,ultra-60 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-g -O2', gccversion=2.95.2 19991024 (release)
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E'
    cccdlflags='-fPIC', lddlflags=' -W,l-E -G -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.6.0:
    /usr/local/lib/perl5/5.6.0/sun4-solaris
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.005
    /usr/local/lib/perl5/site_perl
    .


Environment for perl v5.6.0:
    HOME=/home/gary
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/dt/lib:/usr/lib:/usr/openwin/lib:/usr/ucblib:/usr/local/lib
    LOGDIR (unset)
    PATH=/usr/informix9/bin:/share/CVS/bin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/openwin/demo:/usr/ucb:/etc:/usr/local/bin:/usr/sbin:/home/gary/bin:/usr/ccs/bin::/usr/local/purecov:/usr/local/purify:/share/java/jdk/bin
    PERL_BADLANG (unset)
    SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Jan 23, 2001

From @timj

I think you will find that the problem is in Perl malloc. There have been
numerous reports that using perl malloc + gcc is broken (PDL has had these
problems). The only solution currently is to rebuild your perl using Sun
malloc. Build with -Uusemymalloc.

The solaris hints file should probably make this the default until the
problem in malloc can be found. One thing that worries me is that in the
past many of the perl malloc solaris problems have gone away with
DEBUGGING turned on.

It also doesn't help that ActiveState ship their Solaris perl binary using
Perl malloc.

Hope this helps

Tim

On Tue, 23 Jan 2001 gary@​pandemic.itc.nrcs.usda.gov wrote​:

This is a bug report for perl from gspivak@​itc.nrcs.usda.gov,
generated with the help of perlbug 1.28 running under perl v5.6.0.

-----------------------------------------------------------------
[Please enter your report here]

We are experiencing intermittent cores during execution of a perl app
using the DBD​::Informix module. It happens with greater frequency when
the system is busy, but it also happens that the exact procedure can
be rerun successfully just a few minutes after a crash. I don't have
a lot to work with, except that each gdb stack trace shows the failure
happens in malloc, but the malloc is not always called from the same
place. Many other processes are running at the same time without any
malloc failures, and vmstat shows plenty of memory available. A sample
stack trace looks like this​:

#0 0x2a09c in malloc ()
#1 0xff087728 in _iqprepare () from /usr/informix9/lib/esql/libifsql.so
#2 0xff087580 in sqli_prep () from /usr/informix9/lib/esql/libifsql.so
#3 0xff0ea7d0 in dbd_ix_st_prepare ()
from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Informix/Inf
ormix.so
#4 0xff0e5654 in XS_DBD__Informix__st__prepare ()
from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Informix/Inf
ormix.so
#5 0x64fb4 in Perl_pp_entersub ()
#6 0x9eb54 in Perl_runops_standard ()
#7 0x26d28 in perl_call_sv ()
#8 0xff118164 in XS_DBI_dispatch ()
from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBI/DBI.so
#9 0x64fb4 in Perl_pp_entersub ()
#10 0x9eb54 in Perl_runops_standard ()
#11 0x26d28 in perl_call_sv ()
#12 0xff118164 in XS_DBI_dispatch ()
from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBI/DBI.so
#13 0x64fb4 in Perl_pp_entersub ()
#14 0x9eb54 in Perl_runops_standard ()
#15 0x26444 in perl_run ()
#16 0x23fc0 in main ()

My version of DBD​::Informix seems to be 0.97005.
The Informix engine is 9.21.UC1 and ESQL is 9.40.UC2

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=core
severity=high
---
Site configuration information for perl v5.6.0​:

Configured by jmm at Wed Nov 29 11​:10​:25 MST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration​:
Platform​:
osname=solaris, osvers=2.7, archname=sun4-solaris
uname='sunos pandemic 5.7 generic_106541-12 sun4u sparc sunw,ultra-60 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler​:
cc='gcc', optimize='-g -O2', gccversion=2.95.2 19991024 (release)
cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries​:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec
libc=, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E'
cccdlflags='-fPIC', lddlflags=' -W,l-E -G -L/usr/local/lib'

Locally applied patches​:

---
@​INC for perl v5.6.0​:
/usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005
/usr/local/lib/perl5/site_perl
.

---
Environment for perl v5.6.0​:
HOME=/home/gary
LANG=C
LANGUAGE (unset)
LD_LIBRARY_PATH=/usr/dt/lib​:/usr/lib​:/usr/openwin/lib​:/usr/ucblib​:/usr/local/lib
LOGDIR (unset)
PATH=/usr/informix9/bin​:/share/CVS/bin​:/usr/bin​:/usr/dt/bin​:/usr/openwin/bin​:/usr/openwin/demo​:/usr/ucb​:/etc​:/usr/local/bin​:/usr/sbin​:/home/gary/bin​:/usr/ccs/bin​::/usr/local/purecov​:/usr/local/purify​:/share/java/jdk/bin
PERL_BADLANG (unset)
SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Feb 4, 2001

From [Unknown Contact. See original ticket]

On Tue, 23 Jan 2001 gary@​pandemic.itc.nrcs.usda.gov wrote​:

We are experiencing intermittent cores during execution of a perl app
using the DBD​::Informix module. It happens with greater frequency when
the system is busy, but it also happens that the exact procedure can
be rerun successfully just a few minutes after a crash. I don't have
a lot to work with, except that each gdb stack trace shows the failure
happens in malloc, but the malloc is not always called from the same
place. Many other processes are running at the same time without any
malloc failures, and vmstat shows plenty of memory available. A sample
stack trace looks like this​:

#0 0x2a09c in malloc ()
#1 0xff087728 in _iqprepare () from /usr/informix9/lib/esql/libifsql.so
#2 0xff087580 in sqli_prep () from /usr/informix9/lib/esql/libifsql.so
#3 0xff0ea7d0 in dbd_ix_st_prepare ()
from /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Informix/Inf

Does it always coredump in the esql libraries ? Can you make an equivalent
esql/c program that exhibits the same behaviour ? If the answer to these
is 'yes' then you might be experiencing a bug in the esql libraries.

On the other hand it might be a problem with DBD​::Informix in which case you
might want to submit a bug report ( if you have a version >= 1.00 PC1 )
using the InformixTechSupport tool.

/J\

@p5pRT
Copy link
Author

p5pRT commented Dec 14, 2004

From @smpeters

[RT_System - Sat Feb 03 21​:24​:58 2001]​:

On Tue, 23 Jan 2001 gary@​pandemic.itc.nrcs.usda.gov wrote​:

We are experiencing intermittent cores during execution of a perl
app
using the DBD​::Informix module. It happens with greater frequency
when
the system is busy, but it also happens that the exact procedure can
be rerun successfully just a few minutes after a crash. I don't have
a lot to work with, except that each gdb stack trace shows the
failure
happens in malloc, but the malloc is not always called from the same
place. Many other processes are running at the same time without any
malloc failures, and vmstat shows plenty of memory available. A
sample
stack trace looks like this​:

#0 0x2a09c in malloc ()
#1 0xff087728 in _iqprepare () from
/usr/informix9/lib/esql/libifsql.so
#2 0xff087580 in sqli_prep () from
/usr/informix9/lib/esql/libifsql.so
#3 0xff0ea7d0 in dbd_ix_st_prepare ()
from /usr/local/lib/perl5/site_perl/5.005/sun4-
solaris/auto/DBD/Informix/Inf

Does it always coredump in the esql libraries ? Can you make an
equivalent
esql/c program that exhibits the same behaviour ? If the answer to
these
is 'yes' then you might be experiencing a bug in the esql libraries.

On the other hand it might be a problem with DBD​::Informix in which
case you
might want to submit a bug report ( if you have a version >= 1.00 PC1
)
using the InformixTechSupport tool.

/J\

The workaround at the time of -Uusemymalloc should have worked. Along
with fixes to Perl's malloc since this ticket has been opened, this
problem has been resolved.

@p5pRT
Copy link
Author

p5pRT commented Dec 14, 2004

@smpeters - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant