Apache::ASP/Solaris 2.7 - session locking issues
Has anyone had any problems with failure to write locks on Apache:ASP under Solaris or any other platform? Getting quite a number of the following in the log files... [Tue Nov 7 10:23:11 2000] [error] [asp] [6708] [error] can't write lock /usr/apache/asp.global/.state/57/57d8991eb40ed4d6e886304ac5806101.l ock: Bad file number, /usr/local/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 4670 ...but not very consistent. Most of the time, it works just fine. When it does fail, it seems to trigger a bug in the UnLock module in that the global $UNLOCK value gets set to LOCK_SH|LOCK_EX (which is invalid) in the code that is commented as being written for QNX. For some reason, Fcntl::FUNLCK is returning LOCK_SH|LOCK_EX on Solaris, and the next time the module attempts to unlock a lock file, the call to flock($file, ($UNLOCK || LOCK_UN)) [line 4687 or thereabouts] fails with an 'Invalid argument' error. Anyway, ending up with some really weird issues using ASP on Solaris. We have one code base for a client that is used on both NT and Solaris (spent a fair bit of time getting that to work). But now, even some form values in the Solaris version appear to be getting corrupted somehow. For some unknown reason, a form that is submitted is getting a key value that is not at all what is in the form - it almost appears to be coming from another instance of the same form from another user on the system at the time. We're using the latest version of the ASP code so if anyone has any ideas, it would be most useful. Thanks in advance! Daniel. begin:vcard n:Little;Daniel fn:Daniel Little tel;cell:(204) 955-0300 tel;fax:(204) 487-6680 tel;work:(204) 837 5503 url:http://www.metrex.net org:Metrex Systems Consulting Inc.; version:2.1 email;internet:[EMAIL PROTECTED] title:President end:vcard
Re: Apache::ASP/Solaris 2.7 - session locking issues
Hi there, On Tue, 7 Nov 2000, Daniel Little wrote: Has anyone had any problems with failure to write locks on Apache:ASP under Solaris or any other platform? I just grepped one of my logfiles (a small one, about 70 megabytes:) and there was no occurrence of this message. Linux 2.2.16, Perl 5.6.0, Apache 1.3.12, mod_perl 1.24, ASP 0.19 (yes, 0.19). I did it on this log because it's the only server (in development) I've got which is running 5.6.0. Solaris does funny things sometimes, but I think Josh might have something to say about this one if you're patient. 73, Ged.
Re: Apache::ASP/Solaris 2.7 - session locking issues
From: "G.W. Haywood" [EMAIL PROTECTED] On Tue, 7 Nov 2000, Daniel Little wrote: Has anyone had any problems with failure to write locks on Apache:ASP under Solaris or any other platform? I just grepped one of my logfiles (a small one, about 70 megabytes:) and there was no occurrence of this message. Linux 2.2.16, Perl 5.6.0, Apache 1.3.12, mod_perl 1.24, ASP 0.19 (yes, 0.19). I did it on this log because it's the only server (in development) I've got which is running 5.6.0. There are only two things different to that on our environment - ASP 2.03 (instead of 0.19 - ouch!) and Solaris 2.7 (instead of Linux 2.2.16). All the rest are the same (and we're on a Sparc - I presume yours is Intel?). Solaris does funny things sometimes, but I think Josh might have something to say about this one if you're patient. Sure, I can wait for Josh's response. We had to backout our Solaris version this A.M. due to these problems. Note, we did find the problem with the form variables that were just showing up as plain incorrect. All I can say is 'use strict;' - it pays. I had some difficulties with 'use strict;' on NT about a year ago and when we moved the platform to UNIX, had a number of issues around variables getting clobbered, getting lost entirely, etc., and switching to using strict with all variables assigned in the ASP script solved the problems. I guess that's what I get for practicing unsafe code practices... ;) Anyway, thanks for the response. I think we're going to have to build a load test platform to reproduce the bugs without going live. Most of these problems did not show up in more than three months of testing the environment. Sigh. Daniel. begin:vcard n:Little;Daniel fn:Daniel Little tel;cell:(204) 955-0300 tel;fax:(204) 487-6680 tel;work:(204) 837 5503 url:http://www.metrex.net org:Metrex Systems Consulting Inc.; version:2.1 email;internet:[EMAIL PROTECTED] title:President end:vcard
Re: Apache::ASP/Solaris 2.7 - session locking issues
Hi Daniel, On Tue, 7 Nov 2000, Daniel Little wrote: we're on a Sparc - I presume yours is Intel? Yes. Er, well, AMD K6-2/450 in that case. All I can say is 'use strict;' Like it says in the Guide :) Anyway, thanks for the response. I think we're going to have to build a load test platform to reproduce the bugs without going live. Most of these problems did not show up in more than three months of testing the environment. Sigh. Nothing like going live to test a system. I think I may have mentioned that before... 73, Ged.
Re: Apache::ASP/Solaris 2.7 - session locking issues
Daniel Little wrote: Has anyone had any problems with failure to write locks on Apache:ASP under Solaris or any other platform? Getting quite a number of the following in the log files... [Tue Nov 7 10:23:11 2000] [error] [asp] [6708] [error] can't write lock /usr/apache/asp.global/.state/57/57d8991eb40ed4d6e886304ac5806101.l ock: Bad file number, /usr/local/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 4670 ...but not very consistent. Most of the time, it works just fine. There are a few race conditions that could contribute to this state. One is fixed by the Apache::ASP v2.0x releases, and another 2 is covered by my development version 2.07 which I am about to release. If you would like to test this ahead of time, before it reaches CPAN in the next couple days, that would be great. Just let me know and I'll send it separately. --Joshua When it does fail, it seems to trigger a bug in the UnLock module in that the global $UNLOCK value gets set to LOCK_SH|LOCK_EX (which is invalid) in the code that is commented as being written for QNX. For some reason, Fcntl::FUNLCK is returning LOCK_SH|LOCK_EX on Solaris, and the next time the module attempts to unlock a lock file, the call to flock($file, ($UNLOCK || LOCK_UN)) [line 4687 or thereabouts] fails with an 'Invalid argument' error. Anyway, ending up with some really weird issues using ASP on Solaris. We have one code base for a client that is used on both NT and Solaris (spent a fair bit of time getting that to work). But now, even some form values in the Solaris version appear to be getting corrupted somehow. For some unknown reason, a form that is submitted is getting a key value that is not at all what is in the form - it almost appears to be coming from another instance of the same form from another user on the system at the time. We're using the latest version of the ASP code so if anyone has any ideas, it would be most useful. Thanks in advance! Daniel.