Bug #91637

Scheduler not working after upgrade to 9.5.19

Added by Florian Meyer 21 days ago. Updated 21 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2020-06-11
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
9.5.19, scheduler
Complexity:
Is Regression:
Sprint Focus:

Description

CLI says:
typo3/sysext/core/bin/typo3 scheduler:run

In BlockSerializationTrait.php line 34:

Cannot unserialize TYPO3\CMS\Core\Log\Writer\AbstractWriter

Backend says:
TYPO3 logo
Oops, an error occurred!
Cannot unserialize TYPO3\CMS\Core\Log\Writer\AbstractWriter
More information regarding this error might be available online.

The Log file says:
Thu, 11 Jun 2020 16:20:37 +0200 [CRITICAL] request="9b4526a1c645a" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1588784142: Cannot unserialize TYPO3\CMS\Core\Log\Writer\AbstractWriter | BadMethodCallException thrown in file /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Security/BlockSerializationTrait.php in line 34. Requested URL: https://www.XXX.de/typo3/index.php?route=%2Fsystem%2FtxschedulerM1%2F&token=--AnonymizedToken-- - {"TYPO3_MODE":"BE","exception":"BadMethodCallException: Cannot unserialize TYPO3\\CMS\\Core\\Log\\Writer\\AbstractWriter in /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Security/BlockSerializationTrait.php:34\nStack trace:\n#0 [internal function]: TYPO3\\CMS\\Core\\Log\\Writer\\AbstractWriter->__wakeup()\n#1 /var/www/html/typo3_src-9.5.19/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(908): unserialize('O:49:\"ApacheSol...')\n#2 /var/www/html/typo3_src-9.5.19/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(333): TYPO3\\CMS\\Scheduler\\Controller\\SchedulerModuleController->listTasksAction()\n#3 /var/www/html/typo3_src-9.5.19/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(200): TYPO3\\CMS\\Scheduler\\Controller\\SchedulerModuleController->getModuleContent(Object(TYPO3\\CMS\\Scheduler\\Task\\Enumeration\\Action))\n#4 [internal function]: TYPO3\\CMS\\Scheduler\\Controller\\SchedulerModuleController->mainAction(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#5 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Http/RouteDispatcher.php(93): call_user_func_array(Array, Array)\n#6 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Http/RequestHandler.php(73): TYPO3\\CMS\\Backend\\Http\\RouteDispatcher->dispatch(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(TYPO3\\CMS\\Core\\Http\\Response))\n#7 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Middleware/SiteResolver.php(59): TYPO3\\CMS\\Backend\\Http\\RequestHandler->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#8 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\SiteResolver->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(TYPO3\\CMS\\Backend\\Http\\RequestHandler))\n#9 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Middleware/AdditionalResponseHeaders.php(39): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#10 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\AdditionalResponseHeaders->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#11 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Middleware/OutputCompression.php(45): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#12 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\OutputCompression->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#13 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Middleware/LegacyBackendTemplateInitialization.php(42): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#14 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\LegacyBackendTemplateInitialization->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#15 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php(70): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#16 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\BackendUserAuthenticator->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#17 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php(73): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#18 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\BackendRouteInitialization->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#19 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Middleware/ForcedHttpsBackendRedirector.php(53): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#20 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\ForcedHttpsBackendRedirector->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#21 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php(71): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#22 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\LockedBackendGuard->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#23 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php(58): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#24 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Core\\Middleware\\NormalizedParamsAttribute->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#25 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(67): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#26 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/AbstractApplication.php(108): TYPO3\\CMS\\Core\\Http\\MiddlewareDispatcher->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#27 /var/www/html/typo3_src-9.5.19/typo3/sysext/backend/Classes/Http/Application.php(68): TYPO3\\CMS\\Core\\Http\\AbstractApplication->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#28 /var/www/html/typo3_src-9.5.19/typo3/sysext/core/Classes/Http/AbstractApplication.php(120): TYPO3\\CMS\\Backend\\Http\\Application->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#29 /var/www/html/typo3_src-9.5.19/typo3/index.php(24): TYPO3\\CMS\\Core\\Http\\AbstractApplication->run()\n#30 /var/www/html/typo3_src-9.5.19/typo3/index.php(25): {closure}()\n#31 {main}"}

Before the upgrade i ran 9.5.5 without any issues to the scheduler function.
Any idea about how to solve or how i can work around this issue? What info can i deliver to help solving this issue?

History

#1 Updated by Andreas Fernandez 21 days ago

  • Status changed from New to Needs Feedback

Thank you for your report.

This is indeed a change coming from the latest security changes, as a serialized writer object may disclose a log file's location on the server.

It seems a custom scheduler task injects a logger which is already sufficient to trigger this misbehavior. Please identify the offending scheduler task and drop the logger instance by utilizing the __sleep() method, e.g.

public function __sleep(): array
{
    return []; // no 'logger'
}

After you've fixed the code, you may need to clean up any configured task by either deleting and re-adding them or write a custom upgrade wizard that deserializes the objects, drops the logger, and serializes the objects again. This depends on how many tasks you have configured.

Also available in: Atom PDF