Bug #61900

Story #63720: Make class loader more robust against crashes.

ClassLoader: Stalled Lock file if ClassLoader caching fails.

Added by Alexander Opitz 10 months ago. Updated 8 months ago.

Status:Resolved Start date:2014-09-26
Priority:Should have Due date:
Assigned To:Alexander Opitz % Done:

100%

Category:Package Manager Spent time: -
Target version:next-patchlevel
TYPO3 Version:6.2 Is Regression:Yes
PHP Version: Sprint Focus:
Complexity:

Description

If creation of ClassLoader caching isn't possible, course an exception is thrown in this process, we get a stale lock file.
Also we can get a unclean cache, as in the example the ClassAliases cache isn't saved but we don't check this again.

Example shortened backtrace what may happening:

Fatal error:  Uncaught exception 'BadFunctionCallException' with  message 'TYPO3 Fatal Error: Extension key "external_import" is NOT  loaded!' in 
/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php:122 
Stack  trace:
#0  /typo3conf/ext/ppi_..._showtime/ext_autoload.php(4):   TYPO3/CMS/Core/Utility/ExtensionManagementUtility::extPath('external_import',  'interfaces/inte...')
#1  /typo3/sysext/core/Classes/Package/Package.php(292):  require('/...')
#2  /typo3/sysext/core/Classes/Core/ClassLoader.php(570):  TYPO3/CMS/Core/Package/Package->getClassFilesFromAutoloadRegistry()
#3  /typo3/sysext/core/Classes/Core/ClassLoader.php(496):   TYPO3/CMS/Core/Core/ClassLoader->loadClassFilesFromAutoloadRegistryIntoRuntimeClassInformationCache(Array)
#4   /typo3/sysext/core/Classes/Core/ClassLoader.php(452):  TYPO3/CMS/Core/Core/ClassLoader->buildPackageNamespacesAndCl in /typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php on line 122

This example happened after git updating an extension which now depends on another extension which isn't installed. Afterwards the ClassLoader cache was cleared.


Related issues

related to Core - Bug #57463: Upgrading 6.2: PHP Fatal error: Could not acquire lock fo... Resolved 2014-03-31
related to Core - Task #62852: Bring back class aliases to prevent Fatal Error Resolved 2014-11-11
related to Core - Bug #63683: ClassLoader: Stalled Lock file if ClassLoader caching fails. Resolved 2014-12-08

Associated revisions

Revision ab0aa415
Added by Alexander Opitz 9 months ago

[BUGFIX] ClassLoader: Clear after Exception

Clearing the class cache and release the lock if an exception was
thrown while generating the class loader cache.

Resolves: #61900
Releases: master, 6.2
Change-Id: Iaac534e9cf333fe29f9ac90aed118cc953f857fe
Reviewed-on: http://review.typo3.org/32982
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

Revision 5b1fa3df
Added by Alexander Opitz 9 months ago

[BUGFIX] ClassLoader: Clear after Exception

Clearing the class cache and release the lock if an exception was
thrown while generating the class loader cache.

Resolves: #61900
Releases: master, 6.2
Change-Id: Iaac534e9cf333fe29f9ac90aed118cc953f857fe
Reviewed-on: http://review.typo3.org/34162
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

History

#1 Updated by Alexander Opitz 10 months ago

  • Description updated (diff)

#2 Updated by Alexander Opitz 10 months ago

  • Description updated (diff)

#3 Updated by Gerrit Code Review 10 months ago

  • Status changed from Accepted 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 http://review.typo3.org/32982

#4 Updated by Gerrit Code Review 9 months ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34162

#5 Updated by Alexander Opitz 9 months ago

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

#6 Updated by Alexander Opitz 8 months ago

  • Status changed from Resolved to Accepted

#7 Updated by Alexander Opitz 8 months ago

  • Status changed from Accepted to Resolved

#8 Updated by Mathias Schreiber 8 months ago

  • Parent task set to #63720

Also available in: Atom PDF