Re: Apache::ASP -- Corruption of statedir files/truncation of methodnames
The statedir is local so it doesnt seem to be an NFS issue. There definitely seems to be a corruption of the StateDir files: here is a error that crops up in our error log. [Thu Apr 5 08:09:07 2001] [notice] child pid 11555 exit signal Segmentation fault (11) Use of uninitialized value at /usr/lib/perl5/MLDBM.pm line 161 (#1) (W) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign an initial value to your variables. Unauthorized use, disclosure, or distribution of information within this message is prohibited. On Wed, 4 Apr 2001, Joshua Chamas wrote: > Carl Lipo wrote: > > > > I've just started having problems with asp state files for Apache::ASP > > 2.09 becoming corrupted during use. My application will work just fine but > > at somepoint the session asp state files get corrupted and only deleting > > them allows the application to continue working. Oddly, this occurs on two > > different servers so the problem does not appear to be machine specific. > > > > The symptom of the problem is that application errors are returned > > from the asp code execution that look something like this: > > > > Uncaught exception from user code: > > Can't locate object method 'Quer' via package > > "Apache::ASP::Request'; at (eval 263) l > > ine 167. >INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called > > at /usr/local/lib/site_perl/Apache/ > > ASP.pm line 1504 > > > > Generally problems of this nature, where even perl data seems > to be corrupted, seem to be from buffer overrun type issues > that normally result in segfaults. Looking at your config, > I would suspect the culprit to be use of DB_File on your > StateDir, where /usr/local/etc/infosource/apps/netcfg/state-dir > may be mounted over NFS. NFS typically does not support the > flock() style locking that Apache::ASP uses to protect DB_File > from corruption. > > If you are & must use NFS, don't use DB_File, use the default > SDBM_File, which does not corrupt as easily. If you need to > get past the 1000 byte limit, then you might use > MLDBM::Sync::SDBM_File which I developed just for this purpose. > I need to add config support for this still to Apache::ASP though. > If you can switch to a CIFS/or samba mounted file system, do > this, as this supports flock() semantics. > > If StateDir is mounted locally, then possibly there is a bug in > Apache::ASP StateDB locking, but this is less likely the case > and we might look at other types of buffer overrun issues that > might corrupt perl data structures. If your modperl httpd is compiled > DSO, compile it static, as I have seen no end of odd errors with > the DSO config from time to time. > > Also, DBD::Oracle and long values with CLOBs/BLOBs can create > another type of buffer overrun, which is supposedly on OCI bug, > though you didn't mention use of Oracle this is an odd bug that > stung me recently. > > If you give up on trying to find this bug, which seems to be > related to StateDB corruption, you may create $Application & > $Session objects with Apache::Session in the global.asa Script_OnStart, > which would at least eliminate the StateDB issue. > > -- Josh > > _ > Joshua Chamas Chamas Enterprises Inc. > NodeWorks >> free web link monitoring Huntington Beach, CA USA > http://www.nodeworks.com1-714-625-4051 > >
Re: Apache::ASP -- Corruption of statedir files/truncation of methodnames
Carl Lipo wrote: > > I've just started having problems with asp state files for Apache::ASP > 2.09 becoming corrupted during use. My application will work just fine but > at somepoint the session asp state files get corrupted and only deleting > them allows the application to continue working. Oddly, this occurs on two > different servers so the problem does not appear to be machine specific. > > The symptom of the problem is that application errors are returned > from the asp code execution that look something like this: > > Uncaught exception from user code: > Can't locate object method 'Quer' via package > "Apache::ASP::Request'; at (eval 263) l > ine 167. >INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called > at /usr/local/lib/site_perl/Apache/ > ASP.pm line 1504 > Generally problems of this nature, where even perl data seems to be corrupted, seem to be from buffer overrun type issues that normally result in segfaults. Looking at your config, I would suspect the culprit to be use of DB_File on your StateDir, where /usr/local/etc/infosource/apps/netcfg/state-dir may be mounted over NFS. NFS typically does not support the flock() style locking that Apache::ASP uses to protect DB_File from corruption. If you are & must use NFS, don't use DB_File, use the default SDBM_File, which does not corrupt as easily. If you need to get past the 1000 byte limit, then you might use MLDBM::Sync::SDBM_File which I developed just for this purpose. I need to add config support for this still to Apache::ASP though. If you can switch to a CIFS/or samba mounted file system, do this, as this supports flock() semantics. If StateDir is mounted locally, then possibly there is a bug in Apache::ASP StateDB locking, but this is less likely the case and we might look at other types of buffer overrun issues that might corrupt perl data structures. If your modperl httpd is compiled DSO, compile it static, as I have seen no end of odd errors with the DSO config from time to time. Also, DBD::Oracle and long values with CLOBs/BLOBs can create another type of buffer overrun, which is supposedly on OCI bug, though you didn't mention use of Oracle this is an odd bug that stung me recently. If you give up on trying to find this bug, which seems to be related to StateDB corruption, you may create $Application & $Session objects with Apache::Session in the global.asa Script_OnStart, which would at least eliminate the StateDB issue. -- Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks >> free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Apache::ASP -- Corruption of statedir files/truncation of methodnames
In addition: here are the httpd.conf configurations for this application: PerlSetVar Global /usr/local/etc/infosource/apps/netcfg/ # PerlSetVar Global . PerlSetVar GlobalPackage INAP::NEIS PerlSetVar StateDir /usr/local/etc/infosource/apps/netcfg/state-dir PerlSetVar CookiePath /apps/netcfg SetHandler perl-script PerlHandler Apache::ASP Apache::SSI PerlSetVar SessionTimeout 90 #0 production, 2 or 1 for dev PerlSetVar Debug 0 PerlSetVar StatINCMatch PNAP|NCM # PerlSetVar StatINC 1 #0 production, text compression # PerlSetVar DynamicIncludes 0 PerlSetVar Clean 0 PerlSetVar StateDB DB_File PerlSetVar AllowSessionState 1 PerlSetVar DebugBufferLength 500 PerlSetVar StateCache 0 # PerlSetVar UseStrict 1 PerlSetVar TimeHiRes 1 On Wed, 4 Apr 2001, Carl Lipo wrote: > > I've just started having problems with asp state files for Apache::ASP > 2.09 becoming corrupted during use. My application will work just fine but > at somepoint the session asp state files get corrupted and only deleting > them allows the application to continue working. Oddly, this occurs on two > different servers so the problem does not appear to be machine specific. > > The symptom of the problem is that application errors are returned > from the asp code execution that look something like this: > > Uncaught exception from user code: > Can't locate object method 'Quer' via package > "Apache::ASP::Request'; at (eval 263) l > ine 167. >INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called > at /usr/local/lib/site_perl/Apache/ > ASP.pm line 1504 > > or > > $Response::Appe not defined at /usr/local/lib/site_perl/Apache/ASP.pm href=#3132>line 3132 > > Where the object method that cant be located is truncated from the actual > ASP method (i.e., Query will be truncated to be Quer or $Response::Append > to log will be tructed at Response::Appe). What appears to be happnening > is that the namespace is corrupted somehow and the Apache::ASP/mod_perl is > not mapping the names of methods correctly. > > When we delete the state files, the problem goes away (and then returns at > some point in the future). Has anyone encountered this problem? Is there a > bug in the 2.09 code? > > This is our environment: > Linux, Apache 1.3.19, mod_perl 1.25 > Apache::ASP 2.09 > > > Here is the actual error output: > > > Global: >/usr/local/etc/infosource/apps/netcfg/ >File: >/usr/local/applprod/infosource/apps/netcfg/viewNodes.htm > IP: >64.94.117.16 > HTTP_*: >HTTP_ACCEPT= image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* > HTTP_ACCEPT_CHARSET= iso-8859-1,*,utf-8 > HTTP_ACCEPT_ENCODING= gzip > HTTP_ACCEPT_LANGUAGE= en > HTTP_CONNECTION= Keep-Alive > HTTP_COOKIE= session-id=0eef76d5377c6e62def6333423014869 > HTTP_HOST= applprod4.sea.internap.com > HTTP_REFERER= https://applprod4.sea.internap.com/apps/netcfg/searchNode.htm > HTTP_USER_AGENT= Mozilla/4.75 [en] (X11; U; Linux 2.2.16 i686) > Query: >Form: >search= Search > searchLocation= > searchNodeName= > searchNodeStatus= > searchNodeType= > searchRack= > searchSiteCode= sea > sessionActive= Active > > > > Errors Output > > > Uncaught exception from user code: > Can't locate object method "Quer" via package >"Apache::ASP::Request" at (eval 263) line 167. > INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() >called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504 > eval {...} called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504 > Apache::ASP::Execute('Apache::ASP=HASH(0x8d7d930)') called at >/usr/local/lib/site_perl/Apache/ASP.pm line 174 > Apache::ASP::handler('Apache=SCALAR(0x8d2b978)') called at /dev/null line 0 > eval {...} called at /dev/null line 0 > , /usr/local/lib/site_perl/Apache/ASP.pm line 1506 > > > Debug Output > > > Uncaught exception from user code: > Can't locate object method "Quer" via package >"Apache::ASP::Request" at (eval 263) line 167. > INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() >called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504 > eval {...} called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504 > Apache::ASP::Execute('Apache::ASP=HASH(0x8d7d930)') called at >/usr/local/lib/site_perl/Apache/ASP.pm line 174 > Apache::ASP::handler('Apache=SCALAR(0x8d2b978)') called at /dev/null line 0 > eval {...} called at /dev/null line 0 > , /usr/local/lib/site_perl/Apache/ASP.pm line 1506 > > > > > ASP to Perl Script > > 1: package INAP::NEIS; ;; sub >INAP:
Apache::ASP -- Corruption of statedir files/truncation of methodnames
I've just started having problems with asp state files for Apache::ASP 2.09 becoming corrupted during use. My application will work just fine but at somepoint the session asp state files get corrupted and only deleting them allows the application to continue working. Oddly, this occurs on two different servers so the problem does not appear to be machine specific. The symptom of the problem is that application errors are returned from the asp code execution that look something like this: Uncaught exception from user code: Can't locate object method 'Quer' via package "Apache::ASP::Request'; at (eval 263) l ine 167. INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called at /usr/local/lib/site_perl/Apache/ ASP.pm line 1504 or $Response::Appe not defined at /usr/local/lib/site_perl/Apache/ASP.pm line 3132 Where the object method that cant be located is truncated from the actual ASP method (i.e., Query will be truncated to be Quer or $Response::Append to log will be tructed at Response::Appe). What appears to be happnening is that the namespace is corrupted somehow and the Apache::ASP/mod_perl is not mapping the names of methods correctly. When we delete the state files, the problem goes away (and then returns at some point in the future). Has anyone encountered this problem? Is there a bug in the 2.09 code? This is our environment: Linux, Apache 1.3.19, mod_perl 1.25 Apache::ASP 2.09 Here is the actual error output: Global: /usr/local/etc/infosource/apps/netcfg/ File: /usr/local/applprod/infosource/apps/netcfg/viewNodes.htm IP: 64.94.117.16 HTTP_*: HTTP_ACCEPT= image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* HTTP_ACCEPT_CHARSET= iso-8859-1,*,utf-8 HTTP_ACCEPT_ENCODING= gzip HTTP_ACCEPT_LANGUAGE= en HTTP_CONNECTION= Keep-Alive HTTP_COOKIE= session-id=0eef76d5377c6e62def6333423014869 HTTP_HOST= applprod4.sea.internap.com HTTP_REFERER= https://applprod4.sea.internap.com/apps/netcfg/searchNode.htm HTTP_USER_AGENT= Mozilla/4.75 [en] (X11; U; Linux 2.2.16 i686) Query: Form: search= Search searchLocation= searchNodeName= searchNodeStatus= searchNodeType= searchRack= searchSiteCode= sea sessionActive= Active Errors Output Uncaught exception from user code: Can't locate object method "Quer" via package "Apache::ASP::Request" at (eval 263) line 167. INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504 eval {...} called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504 Apache::ASP::Execute('Apache::ASP=HASH(0x8d7d930)') called at /usr/local/lib/site_perl/Apache/ASP.pm line 174 Apache::ASP::handler('Apache=SCALAR(0x8d2b978)') called at /dev/null line 0 eval {...} called at /dev/null line 0 , /usr/local/lib/site_perl/Apache/ASP.pm line 1506 Debug Output Uncaught exception from user code: Can't locate object method "Quer" via package "Apache::ASP::Request" at (eval 263) line 167. INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504 eval {...} called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504 Apache::ASP::Execute('Apache::ASP=HASH(0x8d7d930)') called at /usr/local/lib/site_perl/Apache/ASP.pm line 174 Apache::ASP::handler('Apache=SCALAR(0x8d2b978)') called at /dev/null line 0 eval {...} called at /dev/null line 0 , /usr/local/lib/site_perl/Apache/ASP.pm line 1506 ASP to Perl Script 1: package INAP::NEIS; ;; sub INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL { ;; @_ = (); ;; no strict;;use vars qw($Application $Session $Response $Server $Request);;use lib qw(/usr/local/etc/infosource/apps/netcfg/);;; 2: 3: $Response->AppendToLog("[NEIS] - init.htm:"); 4: 5: 6: ### 7: # 8: #init.htm 9: # 10: # Dexter and Wayland 11: # 12: # October 2000 13: # 14: # 10/12/00 Wayland Wasserman 15: # Common header file for entire NCM app 16: # Contains database info and other global data 17: # 18: # 19: 20: 21: use DBI;# Used for database calls. 22: use PNAP::NETCFG::DBconn qw(dbconnect); # Used for database calls. 23: use PNAP::Conf; 24: use PNAP::Database::Query; 25: use NCM::Nodes; 26: use NCM::Common; 27: use XML::Config; 28: use strict; 29: 30: # This part is in the Apache configuration file, httpd.conf. 31: # BEGIN 32: # { 33: # $ENV{'ORACLE_HOME'} = 'usr/local/oracle_client/v8_0_5'; 34: # } 35: 36: $Response->AppendToLog("[NEIS] - init.htm: test 1"); 37: 38: ### Read the conf file ### 39: # my $g_conf