Issue Bug Closed

#40420Semaphore based locking returns warning

Rudi Meyer 08/30/12, 13:59 updated 10/24/17, 20:20

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 0×91b615ca: 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 ‘@’…?

Reviews 1