Bug #55099
closedPHP Warnings after clearing configuration cache in BE
100%
Description
- rm -rf typo3temp/*
- Open BE, Page module
- Click on some random page in the tree
- Clear the configuration cache via toolbar icon
- 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'
Updated by Helmut Hummel almost 11 years ago
Markus Klein wrote:
Steps to reproduce
- rm -rf typo3temp/*
- Open BE, Page module
- Click on some random page in the tree
- Clear the configuration cache via toolbar icon
- 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.
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!
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?
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...
Updated by Franz Holzinger over 10 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
Updated by Markus Klein over 10 years ago
Please see the blueprint for solving this: http://wiki.typo3.org/Blueprints/LockingForCaches
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
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.
Updated by Alexander Opitz over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 76284d26065af1a0a5b141f5f16305a5821609fa.
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.
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
Updated by Alexander Opitz over 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 2268f64c18b607ba39d06b1580afb0ccd786d6b1.