Project

General

Profile

Actions

Bug #18279

closed

Several problems with locking API (t3lib_lock)

Added by Jeff Segars over 16 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Communication
Target version:
-
Start date:
2008-02-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The locking API has problems if an extension sets TSFE->set_no_cache().

When a page is rendered, a lock is generated as long as the page itself isn't set to be uncached. At this point in time, we know nothing about what individual extensions will do within page caching. When rendering completes, we again check to see if the page is marked as uncached, which it may be because of an extension setting TSFE->set_no_cache. If the page is now marked as uncached, we don't do anything with locks which in turn leaves us with an open lock. Subsequent reloads of the page will take approximately 30 seconds due to the open locks.

The attached patch fixes this issue by releasing the locks within TSFE->set_no_cache(). The patch also contains some debug output for more insight into the problem, but this should be removed before its committed.

I'm also attaching a test extension that contains a frontend plugin for setting TSFE->set_no_cache(). You can first try the plugin without the patch. Make sure you're not logged into the backend and page loads should take approximately 30 seconds. After applying the patch, it should be back to normal speeds.

(issue imported from #M7630)


Files

20080222_lock_nocache.diff (2.42 KB) 20080222_lock_nocache.diff Administrator Admin, 2008-02-22 20:20
test_lock.t3x (6.02 KB) test_lock.t3x Administrator Admin, 2008-02-22 20:22
0007630_v2.patch (7.16 KB) 0007630_v2.patch Administrator Admin, 2008-02-25 18:28
mergeError.gif (5.47 KB) mergeError.gif Administrator Admin, 2008-02-25 20:24

Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #18084: Better solution for "Page is being generated"ClosedMichael Stucki2008-01-31

Actions
Related to TYPO3 Core - Bug #18330: Fatal error if caching is disabled and locking enabledClosedOliver Hader2008-02-28

Actions
Has duplicate TYPO3 Core - Bug #18293: Hanging of TYPO3ClosedOliver Hader2008-02-24

Actions
Has duplicate TYPO3 Core - Bug #18356: typo3temp/locks not automatic madeClosedOliver Hader2008-03-03

Actions
Actions #1

Updated by emds-itsupport over 16 years ago

I sponsored this issue to have an official resolution of it before wednesday, as this is very critical for me, otherwise kindly disregard it.
Thanks

Actions #2

Updated by Oliver Hader over 16 years ago

The attachment "0007630_v2.patch" replaces the previous patch and was also posted to core list.

What does this patch do?
  • always release aquired locks (no matter if caching was disabled because this could also have been happened during runtime)
  • always remove semaphores (additional to release) to avoid shm leaks
  • added sysLog method and its calls to t3lib_lock
  • create typo3temp/locks/ directory automatically if it does not exist
Actions #3

Updated by emds-itsupport over 16 years ago

Before I apply the patch, I have just checked out the latest nightly revision of TYPO3 beta2 from SVN. Is this patch still going to work? or should I revert back to beta1?

Actions #4

Updated by Oliver Hader over 16 years ago

Patches are always created to the last SVN revision, thus it works also in your case... ;-)

Actions #5

Updated by emds-itsupport over 16 years ago

Thanks for that... however I have an error message for tslib_fe.php (cf. file attached: errorMerge.gif), relates to version number. I am under version 3286.

Concerning t3lib_lock.php, this file is not present anymore in the rep, which is a bit worrying.

Any idea?

Actions #6

Updated by Oliver Hader over 16 years ago

Committed to TYPO3_4-2 (rev. 3312)

Actions

Also available in: Atom PDF