I have run into a perplexing issue and I am hoping someone might be able to help. We have a large site hosted on Solaris and have set up some remote sites hosted on Linux. The Linux sites recently reported a bug that we cannot replicate on our Solaris site. We have a component which has: a shared block which defines an array ($r->path_info() split by '/') a method which returns the array (method 1) a method which is shifting an array (method 2)
During the course of loading a page both methods are called. The shift method (method 2) first and then the method which is returning the array (method 1). On Linux its working as expected and the return from method 1 is missing the last element shifted off. On solaris it is not working this way, method 1 is returning the unshifted array after method 2 has shifted it. While looking at the problem we have found that on the Solaris side the shared block is being called twice. To prove this we put a cluck in the shared block: In the tmplkurl shared block from process 29043 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 147 HTML::Mason::Component::dynamic_subs_init('HTML::Mason::Component::FileBased=HASH(0x2160acc)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 749 HTML::Mason::Request::call_dynamic('MasonX::Request::WithApacheSession=HASH(0x1f95500)','method_check_path','default_path_type','') called at /home/user_id/tusk/current/code/tusk/tmpl/url line 109 HTML::Mason::Commands::__ANON__('default_path_type','') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 136 HTML::Mason::Component::run('HTML::Mason::Component::Subcomponent=HASH(0x1cac764)','default_path_type','') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1074 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1068 HTML::Mason::Request::comp('undef','undef','default_path_type','') called at /home/user_id/tusk/current/code/tusk/autohandler line 367 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 158 HTML::Mason::Component::run_dynamic_sub('HTML::Mason::Component::FileBased=HASH(0x1d96840)','main') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 753 HTML::Mason::Request::call_dynamic('MasonX::Request::WithApacheSession=HASH(0x1f95500)','main') called at /home/user_id/tusk/current/code/tusk/autohandler line 381 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 136 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x1d96840)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1072 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1068 HTML::Mason::Request::comp('undef','undef','undef') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 338 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 338 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 297 HTML::Mason::Request::exec('MasonX::Request::WithApacheSession=HASH(0x1f95500)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 134 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 134 HTML::Mason::Request::ApacheHandler::exec('MasonX::Request::WithApacheSession=HASH(0x1f95500)') called at /home/user_id/tusk/current/lib/MasonX/Request/WithApacheSession.pm line 131 eval {...} called at /home/user_id/tusk/current/lib/MasonX/Request/WithApacheSession.pm line 124 MasonX::Request::WithApacheSession::exec('MasonX::Request::WithApacheSession=HASH(0x1f95500)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 827 HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x196e424)','Apache=SCALAR(0x1d48100)') called at /home/user_id/tusk/current//conf/mason.pl line 77 eval {...} called at /home/user_id/tusk/current//conf/mason.pl line 77 TUSK::Mason::handler('Apache=SCALAR(0x1d48100)') called at /dev/null line 0 eval {...} called at /dev/null line 0 In the tmpl/url shared block from process 29043 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 147 HTML::Mason::Component::dynamic_subs_init('HTML::Mason::Component::FileBased=HASH(0x1cfd14c)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 749 HTML::Mason::Request::call_dynamic('MasonX::Request::WithApacheSession=HASH(0x1f95500)','method_get_last_path_id') called at /home/user_id/tusk/current/code/tusk/tmpl/url line 44 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 136 HTML::Mason::Component::run('HTML::Mason::Component::Subcomponent=HASH(0x1db05c4)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1072 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1068 HTML::Mason::Request::comp('undef','undef') called at /home/user_id/tusk/current/code/tusk/management/grouplinks/show line 6 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 147 HTML::Mason::Component::dynamic_subs_init('HTML::Mason::Component::FileBased=HASH(0x1d4165c)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 749 HTML::Mason::Request::call_dynamic('MasonX::Request::WithApacheSession=HASH(0x1f95500)','method_get_nav_bars') called at /home/user_id/tusk/current/code/tusk/management/grouplinks/show line 21 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 136 HTML::Mason::Component::run('HTML::Mason::Component::Subcomponent=HASH(0x1d2e80c)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1072 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1068 HTML::Mason::Request::comp('undef','undef') called at /home/user_id/tusk/current/code/tusk/autohandler line 448 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 158 HTML::Mason::Component::run_dynamic_sub('HTML::Mason::Component::FileBased=HASH(0x1d96840)','main') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 753 HTML::Mason::Request::call_dynamic('MasonX::Request::WithApacheSession=HASH(0x1f95500)','main') called at /home/user_id/tusk/current/code/tusk/autohandler line 381 HTML::Mason::Commands::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 136 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x1d96840)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1072 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1068 HTML::Mason::Request::comp('undef','undef','undef') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 338 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 338 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 297 HTML::Mason::Request::exec('MasonX::Request::WithApacheSession=HASH(0x1f95500)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 134 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 134 HTML::Mason::Request::ApacheHandler::exec('MasonX::Request::WithApacheSession=HASH(0x1f95500)') called at /home/user_id/tusk/current/lib/MasonX/Request/WithApacheSession.pm line 131 eval {...} called at /home/user_id/tusk/current/lib/MasonX/Request/WithApacheSession.pm line 124 MasonX::Request::WithApacheSession::exec('MasonX::Request::WithApacheSession=HASH(0x1f95500)') called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 827 HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x196e424)','Apache=SCALAR(0x1d48100)') called at /home/user_id/tusk/current//conf/mason.pl line 77 eval {...} called at /home/user_id/tusk/current//conf/mason.pl line 77 TUSK::Mason::handler('Apache=SCALAR(0x1d48100)') called at /dev/null line 0 eval {...} called at /dev/null line 0 I've tried to replicate the condition by creating a simple component calling a subcomponent with a shared block and two sub components but I can't get it to replicate. So I don't have a sample to post and perhaps I am not understanding the issue correctly. The solution is simple (I've tested it), just change the component to copy the array and then shift the copied array instead of the shared array. My concern is whether we are "taking advantage" of the bug elsewhere in the code which is why I am hoping someone can help me determine the root cause of the issue. If I can figure out what is causing it then I can search the code to see if we will have the problem anywhere else. I've checked versions of software which we are using: Both are using Apache 1.3.41, mod_perl 1.31 Perl is 5.8.0 on Solaris and 5.8.8 on Linux. HTML::Mason is 1.28 on Solaris and 1.40 on Linux. The release log for mason from 1.28 to 1.40 and didn't see anything that looked like it could be related to this after posting this I'll check the perl notes as well. Has any one ever seen anything like this before? If not, are there any suggestions as to where I can go from here to troubleshoot this? I've looked at the compiled mason objects but did not see anything obvious (although I've not looked at many objects before). If there is anything else I can provide to help narrow this down please let me know, thanks for any help or suggestions in advanced. -John ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users