Project

General

Profile

Actions

Bug #55099

closed

PHP Warnings after clearing configuration cache in BE

Added by Markus Klein almost 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2014-01-17
Due date:
% Done:

100%

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

Description

Steps to reproduce
  1. rm -rf typo3temp/*
  2. Open BE, Page module
  3. Click on some random page in the tree
  4. Clear the configuration cache via toolbar icon
  5. Click on some page again in the tree

An extdirect exception popups at the bottom of the BE

Warning: rename(/var/www/html/master/typo3temp/Cache/Data/cache_classes/52d9026814521.temp,/var/www/html/master/typo3temp/Cache/Data/cache_classes/typo3_cms_extbase_property_typeconverter_fileconverter): No such file or directory in ..../typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php on line 244

(the affected class looks rather random, but it is always the same line 244)

You can continue at this point to work in BE, but
if you clear the configuration cache again and
quickly click on a page in the tree, the complete BE fails.

The warning above is displayed again and additionally this is displayed:

PHP Warning: Class 'TYPO3\CMS\Core\Log\Loggerphp' not found in ..../typo3/sysext/core/Classes/Core/ClassAliasMap.php line 270
or
PHP Warning: Class 'TYPO3\CMS\Core\Resource\ResourceInterfacer\AbstractController' not found in ..../typo3/sysext/core/Classes/Core/ClassAliasMap.php line 270

One has to clear typo3temp manually in order to get the BE back to work.
I've no clue what's going on here, looks like some timing issue and/or race condition.

Note: I've activated this setting in the installer in order to really see all (otherwise silent) warnings:
['SYS']['exceptionalErrors'] => '28674'


Related issues 7 (0 open7 closed)

Related to TYPO3 Core - Bug #55029: Class Loader fails if entry in class cache is discardedClosed2014-01-15

Actions
Related to TYPO3 Core - Bug #54768: t3lib_pageSelect* compatibility classes not loaded in backendClosed2014-01-06

Actions
Related to TYPO3 Core - Bug #54906: Fatal error: Interface 'Psr\Log\LoggerInterface' not foundClosedAlexander Opitz2014-03-122014-03-12

Actions
Related to TYPO3 Core - Bug #55294: Under heavy load, two request can simultaneously write to same cache file - should use lockingClosedBenni Mack2014-01-24

Actions
Related to TYPO3 Core - Bug #57008: New Installation: Could not acquire lock for ClassLoaderClosed2014-03-17

Actions
Related to TYPO3 Core - Feature #47712: Refactor LockingClosedMarkus Klein2013-02-08

Actions
Related to TYPO3 Core - Bug #67366: PHP Errors after clearing cache in BEClosed2015-06-09

Actions
Actions #1

Updated by Helmut Hummel almost 11 years ago

Markus Klein wrote:

Steps to reproduce
  1. rm -rf typo3temp/*
  2. Open BE, Page module
  3. Click on some random page in the tree
  4. Clear the configuration cache via toolbar icon
  5. Click on some page again in the tree

An extdirect exception popups at the bottom of the BE
[...]
(the affected class looks rather random, but it is always the same line 244)

I cannot reproduce this on my system, but saw these warnings on a customer system lately.
While this is very likely a race condition in the file backend, I'm still asking myself how this happens and if the temp file is missing during that operation or if some directory is not present.

Actions #2

Updated by Helmut Hummel almost 11 years ago

Markus Klein wrote:

You can continue at this point to work in BE, but
if you clear the configuration cache again and
quickly click on a page in the tree, the complete BE fails.

If the classes cache is inconsistent, everything breaks currently.
See #55029

Needs to be fixed!

Actions #3

Updated by Markus Klein almost 11 years ago

Thanks for your response Helmut.

Without knowing the code right now, do the cache backends use any locking at all?

Actions #4

Updated by Oliver Hader almost 11 years ago

Important one... just ran into this issue with extensions using type hints in backend hooks pointing e.g. to t3lib_TCEmain and that class alias not being available...

Actions #5

Updated by Franz Holzinger almost 11 years ago

I randomly get some error and warning messages if I want to use the EM.

PHP Warning:  rename(/mypath/typo3temp/Cache/Data/cache_classes/530ce35ad4603.temp,/mypath/typo3temp/Cache/Data/cache_classes/typo3_cms_core_compatibility_loadedextensionsarray) [<a href='function.rename'>function.rename</a>]: No such file or directory in /mypath/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php on line 244
PHP Warning:  rename(/mypath/typo3temp/Cache/Data/cache_classes/530ce35b64123.temp,/mypath/typo3temp/Cache/Data/cache_classes/clearcachemenu) [<a href='function.rename'>function.rename</a>]: No such file or directory in /mypath/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php on line 244
PHP Warning:  rename(/mypath/typo3temp/Cache/Data/cache_classes/530ce35b68f43.temp,/mypath/typo3temp/Cache/Data/cache_classes/typo3_cms_backend_toolbar_livesearchtoolbaritem) [<a href='function.rename'>function.rename</a>]: No such file or directory in /mypath/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php on line 244
PHP Fatal error:  Class 'TYPO3\CMS\Backend\Sprite\AbstractSpriteHandler' not found in /mypath/typo3/sysext/backend/Classes/Sprite/SimpleSpriteHandler.php on line 40
PHP Fatal error:  Class 'TYPO3\CMS\Core\Resource\Driver\AbstractDriver' not found in /mypath/typo3/sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php on line 35
PHP Fatal error: Class 'TYPO3\CMS\Core\Resource\ResourceStorage' not found in /mypath/typo3temp/Cache/Code/cache_core/ext_localconf_ff0939e805d9053eba290499baf8d6edbd4fb258.php on line 38

Actions #6

Updated by Markus Klein almost 11 years ago

Please see the blueprint for solving this: http://wiki.typo3.org/Blueprints/LockingForCaches

Actions #7

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Accepted to Under Review

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28156

Actions #8

Updated by Thomas Maroschik over 10 years ago

I have written a bash script to provoke the error

#!/bin/bash

i="0" 
url="http://introductionpackage.dev.dfau/index.php?id=51" 

while true
do
        rm -R typo3temp/Cache
        i=$[$i+1]
        curl -s -o - $url | grep -o "Fatal error:.*</i>" && echo "Request $i failed" &
        i=$[$i+1]
        curl -s -o - $url | grep -o "Fatal error:.*</i>" && echo "Request $i failed" &
        wait
done
wait

Please replace the url variable with one that matches your site. Run this script from the site root. It tests frontend requests but the issue is present there too.

Actions #9

Updated by Alexander Opitz over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Ernesto Baschny over 10 years ago

  • Status changed from Resolved to On Hold

This was reverted for 6.2 beta7: https://review.typo3.org/#/c/28426/

Will be re-added afterwards again.

Actions #11

Updated by Gerrit Code Review over 10 years ago

  • Status changed from On Hold to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28480

Actions #12

Updated by Alexander Opitz over 10 years ago

  • Status changed from Under Review to Resolved
Actions #13

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF