> > while debugging lockups in a file/semaphore setup, I was very > suspicious of the semaphore hashing done by > Apache::Session::Lock::Semaphore. > > since there are a limited number of semaphores, Lock::Semaphore does a > hash on the session id to work out which semaphore to use. > (if you want to use > 16 (32 on linux) semaphores, you'll need to pass > a larger NSems arg to Lock::Semaphore btw - see the code). > > in the lockup cases i was getting, the %udat session id and the > %mdat file name both hashed to the same semaphore. so when Embperl > requests a write lock on both sessions ... >
This really makes sense. There is a possibility that both id's become the same hash value for the semaphore array and in this case we get a deadlock This will happen very seldom, so you see it only on a highly loaded site sometimes and only if you use %mdat and %udat. If you don't use both, you don't will get this effect, because no locking is done for the unused one. That's I guess is the reason why nobody reported this problem so far. I will fix it by using different semaphores in the next release Gerald ------------------------------------------------------------- Gerald Richter ecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice: +49 6133 925131 WWW: http://www.ecos.de Fax: +49 6133 925152 ------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
