[cgiapp] Weird Perl Internal Errors

Jerry Kaidor jerry at tr2.com
Fri Sep 3 16:28:07 EDT 2010


Update on my weird Perl internals error:

  I created a function that causes an innocuous error which is reported in
/var/log/httpd/error_log, along with my weird error.  Put calls to this
function to try to localize WHEN the weird error happens.

  Interestingly, no matter WHEN I put my "mark" error, it happens BEFORE
the weird error( that I'm looking for ).  Even if I put it in
cgiapp_postrun()!  So the weird error happens AFTER my application has
done every bit of its database stuff, and nothing remains but for cgiapp to
spit out the html...   Unless things are happening in some other order
because of multithreading or multiple processes.... But I don't think so. 
My understanding is that everything to serve a single web page is done by
a single apache child process.  I tried doing a complete cleanup of dbh's
in
teardown(), no difference.


   One cogent hint in the DBD::mysql docs - the author mentions that it's
important that everything be compiled with the same compiler settings.
By "everything" I mean Perl itself, DBD::mysql, and the mysql perl
client API stuff.  Don't think the mysql server comes into it, because
you just talk to that through a socket, but what do I know?

   If I have to recompile all that, I'm going to set up a second machine
as a sandbox.

                           - Jerry Kaidor




>>
>> Though off-topic for this list -- DBI appears to be the culprit -- since
>> DBD::* modules usually have XS parts, that's probably where these errors
>> are coming from.
>
> *** I have asked on dbi-users this morning.  Meanwhile, I'd like to attack
> this from a time angle.  Anybody know how to propogate errors back into
> the Apache webserver?  I'd like to create my own "errors" that would wind
> up in
> /var/log/httpd/error_log, and thusly bracket the problem in time.
>
>   Thanks in advance,
>
>                             - Jerry Kaidor ( jerry at tr2.com )
>
>
>
>
>
>
>>
>> You might ask on a DBI mailing list or the appropriate DB Driver list
>> (mysql-devel?) and be sure to include your operating system type and
>> version, perl version, database type and version and the versions of DBI
>> and the DBD driver you're running, and what triggers the error (apache
>> restart?  db reads, db writes??  something else?)
>>
>> Most likely you just have to re-install or upgrade your db drivers (e.g.
>> DBD::mysql)
>>
>> hth,
>>
>> -dave
>>
>> On 8/28/2010 11:26 AM, Jerry Kaidor wrote:
>>> Hello,
>>>
>>>      I'm getting some errors in my cgiapp-based application that seem
>>> to
>>> be
>>> related to Perl internals.  They are produced by the Apache webserver,
>>> and are ending up in /var/log/httpd/error_log.
>>>
>>>    There's one of them tacked onto the end of this message.   I have no
>>> clue as how to even approach this stuff.  I did find some mention of
>>> such items in the perlguts man page.
>>>
>>>     The first one seems to be saying:
>>> " There exists a scalar of unknown value."
>>> " There is a reference pointing to 0x8c64f64 located at 0x8c64f58."
>>> (etc)
>>>
>>>     Is there some way for me to get at the symbol table and find out
>>> what's
>>> at 0x8c64f58?  I sure would like to troubleshoot this in some other way
>>> than just removing pieces  of the app until it goes away....  Is there
>>> a
>>> "usual cause" for such distress in the cgiapp environment?  BTW, the
>>> app
>>> seems to work fine.
>>>
>>> Thanks in advance,
>>>
>>>                         - Jerry Kaidor
>>>
>>> ------- snip ---------------------
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6] SV =
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6] RV(0x8c64f64)
>>> at
>>> 0x8c64f58
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   REFCNT = 1
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   FLAGS =
>>> (ROK,READONLY)
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   RV =
>>> 0x8c64d28
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6] SV =
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> PVHV(0x8a0a51c)
>>> at 0x8c64d28
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]       REFCNT =
>>> 1
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]       FLAGS =
>>> (OBJECT,OOK,SHAREKEYS)
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   STASH =
>>> 0x8703ef8
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6] \t"DBI::db"
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   ARRAY =
>>> 0x8c68680
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   KEYS = 0
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   FILL = 0
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   MAX = 7
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   RITER = -1
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]
>>> [Sat Aug 28 07:37:21 2010] [error] [client 10.120.102.6]   EITER = 0x0
>>>
>>> -------------- endsnip ---------
>>>
>>>
>>>
>>>
>>> #####  CGI::Application community mailing list  ################
>>> ##                                                            ##
>>> ##  To unsubscribe, or change your message delivery options,  ##
>>> ##  visit:  http://lists.openlib.org/mailman/listinfo/cgiapp    ##
>>> ##                                                            ##
>>> ##  Web archive:   http://lists.openlib.org/pipermail/cgiapp/   ##
>>> ##  Wiki:          http://cgiapp.erlbaum.net/                 ##
>>> ##                                                            ##
>>> ################################################################
>>>
>>>
>>




More information about the cgiapp mailing list