Bug #13490: Semaphores don't release automatically
| From: | m at savich dot ru | Date: | Fri, 28 Sep 2001 23:03:33 +0000 |
| Subject: | Bug #13490: Semaphores don't release automatically | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-66801@lists.php.net to get a copy of this message | ||
From: m@savich.ru
Operating system: FreeBSD 4.1.1
PHP version: 4.0.6
PHP Bug Type: Semaphore related
Bug description: Semaphores don't release automatically
simplest script:
<?
$id = sem_get(0xff03e3);
sem_acquire($id);
?>
modules:
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mysql'
'--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars'
'--enable-sockets'
description:
When i run that script for the first time, warning doesnt appear, as it is
described in manual. All the other calls hang apache processes without any
chance for semaphore to unlock.
However, if i try such variant:
<?
set_time_limit(0);
$id = sem_get(0xff03e3);
sem_acquire($id);
sleep(1);
sem_release($id);
?>
everything works perfectly for single calls, but when I run my crash-test,
which calls the php script 200 times at once, it hangs the semaphore again
and many apache processes stay frozen.
I think, the reason is incorrect request finalization.
--
Edit bug report at: http://bugs.php.net/?id=13490&edit=1