Project

General

Profile

Actions

Bug #40420

closed

Semaphore based locking returns warning

Added by Rudi Meyer over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2012-08-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using the 'semaphore' type locking functionality, sem_acquire return warning when identifier is released in another parallel request.

Example:
Core: Error handler (FE): PHP Warning: sem_acquire(): failed to acquire key 0x91b615ca: Identifier removed in /var/www/lib/typo3_src-4.6/t3lib/class.t3lib_lock.php line 211.

Is I understand it the flow is as following:

1. Request #1 is received.
2. sem_get is called with "id" as key
3. sem_acquire acquires semaphore with identifier from sem_get
4. Page generation begins
5. Request #2 is received
6. Request #2 sem_gets with "id" as key
7. Request #2 start loop on sem_acquire until it gets a lock
8. Request #1 completes, releases lock and removed identifier
9. Request #2 can't acquire, identifier is gone.

This could be considered similar to the unlink issue with the 'standard' locking method: http://forge.typo3.org/issues/32282 - the solution could be the same, adding a '@'...?


Files

class.t3lib_lock.php.patch (488 Bytes) class.t3lib_lock.php.patch Rudi Meyer, 2012-09-03 14:19

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #32282: typo3temp/locks warning. unlink function returns warningClosed2011-12-03

Actions
Related to TYPO3 Core - Bug #69936: Semaphore locking: PHP hangs with 3 concurrent requestsClosed2015-09-18

Actions
Actions

Also available in: Atom PDF