[prev] [thread] [next] [Date index for 2004/07/29]
This is a multi-part message in MIME format. ------_=_NextPart_001_01C47598.0543E39A Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I'm not sure what's going on here.=20 I'm trying to create a Class::DBI subclass object from within my code, and it's consistently crashing with a segmentation fault.=20 The problem goes away when I call create on the same class and parameters, but with fewer modules. I'm not asking anyone to pinpoint the problem - I'm guessing that it is in my code's use of Class::DBI somewhere, because I can get the same method call to work out of this context ... but I'd like to know what *might* be causing it. This is a Trace of the last few moments of the executable: BBC::Plutus::Domain::Resource (209) :: ...) Class::DBI (342) :: Class::DBI [342]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) Class::DBI (342) :: Class::DBI [342]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) Class::DBI (342) :: Class::DBI [342]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) Class::DBI (342) :: Class::DBI [342]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) Class::DBI (328) :: Class::DBI [328]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) Deep recursion on subroutine "Class::DBI::_undefined_primary" at /home/ianm/conquer/cgi-bin/lib/Class/DBI.pm line 38. Deep recursion on subroutine "Class::DBI::primary_column" at /home/ianm/conquer/cgi-bin/lib/Class/DBI.pm line 51. Deep recursion on anonymous subroutine at /home/ianm/conquer/cgi-bin/lib/Class/DBI.pm line 328. Deep recursion on anonymous subroutine at /home/ianm/conquer/cgi-bin/lib/Tracing.pm line 202. Segmentation Fault (core dumped) bash-2.02$=20 This is some debugging output, verifying that the columns are properly set up. The id column is a MySQL auto_increment column, which is why it isn't set in my create call. DB<5> p BBC::Plutus::Persist::ActiveRecord::Resource->columns() Class::DBI (309) :: Class::DBI [309]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) parentcha_idnumbertime_createdres_targetloyaltyidres_attachsizetype DB<6> p BBC::Plutus::Persist::ActiveRecord::Resource->primaryKey() Can't locate object method "primaryKey" via package "BBC::Plutus::Persist::ActiveRecord::Resource" (perhaps you forgot to load "BBC::Plutus::Persist::ActiveRecord::Resource"?) at (eval 60)[/usr/local/perl-5.6.1/lib/perl5/5.6.1/perl5db.pl:1521] line 2. DB<7> p BBC::Plutus::Persist::ActiveRecord::Resource->primary_column() Class::DBI (328) :: Class::DBI [328]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) id DB<8> p BBC::Plutus::Persist::ActiveRecord::Resource->primary_columns() Class::DBI (328) :: Class::DBI [328]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) id DB<9> p BBC::Plutus::Persist::ActiveRecord::Resource->_essential() Class::DBI (338) :: Class::DBI [338]: BBC::Plutus::Persist::ActiveRecord::Resource::__grouper( ) id This is some debugging of the actual call. BBC::Plutus::Domain::Resource (207) :: BBC::Plutus::Persist::ActiveRecord::Resource->create( ... BBC::Plutus::Domain::Resource (208) :: $VAR1 =3D { NUMBER =3D> 1, SIZE =3D> 2, TYPE =3D> 'TEST', LOYALTY =3D> 1 }; Version dumps, should anyone want them are: Class-DBI-0.96 Class-Accessor-0.19 Class-Data-Inheritable-0.02 Ima-DBI-0.33 DBI-1.43 Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=3Dsolaris, osvers=3D2.6, archname=3Dsun4-solaris uname=3D'sunos ops-dev4 5.6 generic_105181-19 sun4u sparc sunw,ultrasparc-iii-cengine ' config_args=3D'-Dprefix=3D/usr/local/perl-5.6.1' hint=3Dprevious, useposix=3Dtrue, d_sigaction=3Ddefine usethreads=3Dundef use5005threads=3Dundef useithreads=3Dundef usemultiplicity=3Dundef useperlio=3Dundef d_sfio=3Dundef uselargefiles=3Ddefine usesocks=3Dun= def use64bitint=3Dundef use64bitall=3Dundef uselongdouble=3Dundef Compiler: cc=3D'gcc', ccflags =3D'-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64', optimize=3D'-O', cppflags=3D'-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64' ccversion=3D'', gccversion=3D'2.95.3 20010315 (release)', gccosandvers=3D'solaris2.8' intsize=3D4, longsize=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D4= 321 d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdblsiz= e=3D16 ivtype=3D'long', ivsize=3D4, nvtype=3D'double', nvsize=3D8, Off_t=3D'= off_t', lseeksize=3D8 alignbytes=3D8, usemymalloc=3Dy, prototype=3Ddefine Linker and Libraries: ld=3D'gcc', ldflags =3D' -L/usr/local/lib ' libpth=3D/usr/local/lib /usr/lib /usr/ccs/lib libs=3D-lsocket -lnsl -lgdbm -ldl -lm -lc perllibs=3D-lsocket -lnsl -ldl -lm -lc libc=3D/lib/libc.so, so=3Dso, useshrplib=3Dfalse, libperl=3Dlibperl.a= Dynamic Linking: dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D' ' cccdlflags=3D'-fPIC', lddlflags=3D'-G -L/usr/local/lib' Characteristics of this binary (from libperl):=20 Compile-time options: USE_LARGE_FILES Built under solaris Compiled at May 12 2003 13:03:19 -- Dr Ian McDonald Software Engineer, Interactive Drama & Entertainment Conquer the Earth! - The Doctor Who monsters game The Rome Game: Do as the Romans do. Lie, cheat, and steal. A300, 56-58 Wood Lane (CH), London W12 7SB 020 822 56162 ian.mcdonald@xxx.xx.xx / "Ian McDonald-ONLINE" (not "Ian MacDonald") http://www.bbc.co.uk/ - World Wide Wonderland This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system.=20 Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received.=20 Further communication will signify your consent to this. ------_=_NextPart_001_01C47598.0543E39A Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-asci= i"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 6.0.6503.0= "> <TITLE>Death by deep recursion: why might this be?</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P><FONT SIZE=3D2 FACE=3D"Arial">Hi,</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">I'm not sure what's going on here. </FON= T> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">I'm trying to create a Class::DBI subcla= ss object from within my code, and it's consistently crashing with a segm= entation fault. </FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial">The problem goes away when I call create= on the same class and parameters, but with fewer modules. I'm not asking= anyone to pinpoint the problem - I'm guessing that it is in my code's us= e of Class::DBI somewhere, because I can get the same method call to work= out of this context … but I'd like to know what *might* be causing= it.</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial">This is a Trace of the last few moments = of the executable:</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">BBC::Plutus::Domain::Resource (209) ::&n= bsp; ...)</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (342) :: Class::DBI [342]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (342) :: Class::DBI [342]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (342) :: Class::DBI [342]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (342) :: Class::DBI [342]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (328) :: Class::DBI [328]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Deep recursion on subroutine "Clas= s::DBI::_undefined_primary" at /home/ianm/conquer/cgi-bin/lib/Class/= DBI.pm line 38.</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Deep recursion on subroutine "Clas= s::DBI::primary_column" at /home/ianm/conquer/cgi-bin/lib/Class/DBI.= pm line 51.</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Deep recursion on anonymous subroutine = at /home/ianm/conquer/cgi-bin/lib/Class/DBI.pm line 328.</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Deep recursion on anonymous subroutine = at /home/ianm/conquer/cgi-bin/lib/Tracing.pm line 202.</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Segmentation Fault (core dumped)</FONT>= <BR><FONT SIZE=3D2 FACE=3D"Arial">bash-2.02$ </FONT> </P> <BR> <P><FONT SIZE=3D2 FACE=3D"Arial">This is some debugging output, verifying= that the columns are properly set up. The id column is a MySQL auto_incr= ement column, which is why it isn't set in my create call.</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial"> DB<5> p BBC::Plutus::Persis= t::ActiveRecord::Resource->columns()</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (309) :: Class::DBI [309]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">parentcha_idnumbertime_createdres_targe= tloyaltyidres_attachsizetype</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> DB<6> p BBC::Plutus::Persi= st::ActiveRecord::Resource->primaryKey()</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Can't locate object method "primar= yKey" via package "BBC::Plutus::Persist::ActiveRecord::Resource= " (perhaps you forgot to load "BBC::Plutus::Persist::ActiveReco= rd::Resource"?) at (eval 60)[/usr/local/perl-5.6.1/lib/perl5/5.6.1/p= erl5db.pl:1521] line 2.</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial"> DB<7> p BBC::Plutus::Persis= t::ActiveRecord::Resource->primary_column()</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (328) :: Class::DBI [328]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">id</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> DB<8> p BBC::Plutus::Persi= st::ActiveRecord::Resource->primary_columns()</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (328) :: Class::DBI [328]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">id</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> DB<9> p BBC::Plutus::Persi= st::ActiveRecord::Resource->_essential()</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI (338) :: Class::DBI [338]: B= BC::Plutus::Persist::ActiveRecord::Resource::__grouper( )</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">id</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">This is some debugging of the actual cal= l.</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">BBC::Plutus::Domain::Resource (207) :: B= BC::Plutus::Persist::ActiveRecord::Resource->create( ...</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">BBC::Plutus::Domain::Resource (208) :: = $VAR1 =3D {</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> NUMBER =3D> 1,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> SIZE =3D> 2,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> TYPE =3D> 'TEST',</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> LOYALTY =3D> 1</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">};</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Version dumps, should anyone want them a= re:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class-DBI-0.96</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class-Accessor-0.19</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class-Data-Inheritable-0.02</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Ima-DBI-0.33</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">DBI-1.43</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Summary of my perl5 (revision 5.0 versio= n 6 subversion 1) configuration:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Platform:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> osname=3Dsolaris, os= vers=3D2.6, archname=3Dsun4-solaris</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> uname=3D'sunos ops-d= ev4 5.6 generic_105181-19 sun4u sparc sunw,ultrasparc-iii-cengine '</FONT= > <BR><FONT SIZE=3D2 FACE=3D"Arial"> config_args=3D'-Dpre= fix=3D/usr/local/perl-5.6.1'</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> hint=3Dprevious, use= posix=3Dtrue, d_sigaction=3Ddefine</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> usethreads=3Dundef u= se5005threads=3Dundef useithreads=3Dundef usemultiplicity=3Dundef</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> useperlio=3Dundef d_= sfio=3Dundef uselargefiles=3Ddefine usesocks=3Dundef</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> use64bitint=3Dundef = use64bitall=3Dundef uselongdouble=3Dundef</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Compiler:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> cc=3D'gcc', ccflags = =3D'-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE= _OFFSET_BITS=3D64',</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> optimize=3D'-O',</FO= NT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> cppflags=3D'-fno-str= ict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS= =3D64'</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> ccversion=3D'', gccv= ersion=3D'2.95.3 20010315 (release)', gccosandvers=3D'solaris2.8'</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> intsize=3D4, longsiz= e=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D4321</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> d_longlong=3Ddefine,= longlongsize=3D8, d_longdbl=3Ddefine, longdblsize=3D16</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> ivtype=3D'long', ivs= ize=3D4, nvtype=3D'double', nvsize=3D8, Off_t=3D'off_t', lseeksize=3D8</F= ONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> alignbytes=3D8, usem= ymalloc=3Dy, prototype=3Ddefine</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Linker and Libraries:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> ld=3D'gcc', ldflags = =3D' -L/usr/local/lib '</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> libpth=3D/usr/local/= lib /usr/lib /usr/ccs/lib</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> libs=3D-lsocket -lns= l -lgdbm -ldl -lm -lc</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> perllibs=3D-lsocket = -lnsl -ldl -lm -lc</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> libc=3D/lib/libc.so,= so=3Dso, useshrplib=3Dfalse, libperl=3Dlibperl.a</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Dynamic Linking:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> dlsrc=3Ddl_dlopen.xs= , dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D' '</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> cccdlflags=3D'-fPIC'= , lddlflags=3D'-G -L/usr/local/lib'</FONT> </P> <BR> <P><FONT SIZE=3D2 FACE=3D"Arial">Characteristics of this binary (from lib= perl): </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Compile-time options: USE_LARGE_= FILES</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Built under solaris</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Compiled at May 12 2003 13:03:19= </FONT> </P> <P><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">--</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">Dr Ian McDonald</FONT= > <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">Software Engineer, In= teractive Drama & Entertainment</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">Conquer the Earth! - = The Doctor Who monsters game</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">The Rome Game: Do as = the Romans do. Lie, cheat, and steal.</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">A300, 56-58 Wood Lane= (CH), London W12 7SB</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">020 822 56162</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">ian.mcdonald@xxx.xx.x= k / "Ian McDonald-ONLINE" (not "Ian MacDonald")</FONT= > </P> <BR> <br>http://www.bbc.co.uk/ - World Wide Wonderland<br><br>This e-mail (and= any attachments) is confidential and may contain<br>personal views which= are not the views of the BBC unless specifically<br>stated.<br>If you ha= ve received it in error, please delete it from your system. <br>Do not us= e, copy or disclose the information in any way nor act in<br>reliance on = it and notify the sender immediately. Please note that the<br>BBC monitor= s e-mails sent or received. <br>Further communication will signify your c= onsent to this.</BODY> </HTML>= ------_=_NextPart_001_01C47598.0543E39A--
Death by deep recursion: why might this be?
|
Generated at 11:34 on 01 Dec 2004 by mariachi v0.52