Bug #87261

Upgrade wizard for scheduler tasks with invalid Logger instance paths

Added by Joerg Boesche 7 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
scheduler
Target version:
-
Start date:
2018-12-21
Due date:
% Done:

100%

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

Description

Scheduler tasks with invalid logger instance paths for file logs need an update. The logger instance must be removed in the "serialized_task_object" database table field with the upgrade wizard.

Reproduce failing scheduler Task - Data from "serialized_task_object"

O:36:"TYPO3\CMS\Scheduler\Example\TestTask":9:{s:5:"email";s:11:"foo@bar.com";s:10:" * taskUid";i:3;s:11:" * disabled";b:0;s:19:" * runOnNextCronJob";b:0;s:12:" * execution";O:29:"TYPO3\CMS\Scheduler\Execution":6:{s:8:" * start";i:1545397126;s:6:" * end";s:0:"";s:11:" * interval";i:0;s:11:" * multiple";s:1:"0";s:10:" * cronCmd";s:11:"*/2 * * * *";s:23:" * isNewSingleExecution";b:0;}s:16:" * executionTime";i:1545397200;s:14:" * description";s:0:"";s:12:" * taskGroup";i:0;s:9:" * logger";O:25:"TYPO3\CMS\Core\Log\Logger":5:{s:7:" * name";s:36:"TYPO3.CMS.Scheduler.Example.TestTask";s:12:" * requestId";s:13:"da923bc5a3cc4";s:18:" * minimumLogLevel";i:7;s:10:" * writers";a:8:{i:0;a:2:{i:0;O:36:"TYPO3\CMS\Core\Log\Writer\FileWriter":1:{s:10:" * logFile";s:43:"/app/typo3temp/var/log/typo3_f0db86d347.log";}i:1;O:42:"TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter":0:{}}i:1;a:2:{i:0;r:22;i:1;r:24;}i:2;a:2:{i:0;r:22;i:1;r:24;}i:3;a:2:{i:0;r:22;i:1;r:24;}i:4;a:2:{i:0;r:22;i:1;r:24;}i:5;a:1:{i:0;r:24;}i:6;a:1:{i:0;r:24;}i:7;a:1:{i:0;r:24;}}s:13:" * processors";a:0:{}}}


Related issues

Related to TYPO3 Core - Bug #86785: Calling scheduler command on CLI throws error if not in /var/www/html Closed 2018-12-21
Related to TYPO3 Core - Bug #86941: Logger instances in scheduler tasks are deserialized with outdated paths Closed 2018-11-16
Related to TYPO3 Core - Bug #87780: Extbase Task should call parents __sleep and __wakeup Methods Under Review 2019-02-25

Associated revisions

Revision 682c732a (diff)
Added by Helmut Hummel 3 months ago

[BUGFIX] Fix serialization of loggers

Only dealing with PHP file resource in writers is not
enough to properly initialize a logger on wakeup.

A logger has to log with a new request IDs and possibly completely new writers
and processors due to configuration changes in the meantime.

Therefore the __sleep and __wakeup methods are removed in the FileWriter
and new methods are added to the logger instance to make sure a
wakeup will have a correctly configured logger instance.

Resolves: #86941
Resolves: #87261
Releases: master, 9.5
Change-Id: Ia36e251404eae2bdf0dfdf52ace7dcf1815ec456
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60325
Tested-by: Ralf Merz <>
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Reviewed-by: Ralf Merz <>
Reviewed-by: Susanne Moog <>

Revision 7b6f6b87 (diff)
Added by Helmut Hummel 3 months ago

[BUGFIX] Fix serialization of loggers

Only dealing with PHP file resource in writers is not
enough to properly initialize a logger on wakeup.

A logger has to log with a new request IDs and possibly completely new writers
and processors due to configuration changes in the meantime.

Therefore the __sleep and __wakeup methods are removed in the FileWriter
and new methods are added to the logger instance to make sure a
wakeup will have a correctly configured logger instance.

Resolves: #86941
Resolves: #87261
Releases: master, 9.5
Change-Id: Ia36e251404eae2bdf0dfdf52ace7dcf1815ec456
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60472
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Gerrit Code Review 7 months ago

  • Status changed from New 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/59259

#2 Updated by Joerg Boesche 7 months ago

  • Parent task deleted (#86785)

#3 Updated by Joerg Boesche 7 months ago

  • Related to Bug #86785: Calling scheduler command on CLI throws error if not in /var/www/html added

#4 Updated by Josef Glatz 6 months ago

  • Related to Bug #86941: Logger instances in scheduler tasks are deserialized with outdated paths added

#5 Updated by Gerrit Code Review 6 months ago

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

#6 Updated by Achim Fritz 5 months ago

  • Related to Bug #87780: Extbase Task should call parents __sleep and __wakeup Methods added

#7 Updated by Gerrit Code Review 4 months ago

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/c/Packages/TYPO3.CMS/+/60306

#8 Updated by Gerrit Code Review 4 months ago

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

#9 Updated by Gerrit Code Review 4 months ago

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

#10 Updated by Gerrit Code Review 4 months ago

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

#11 Updated by Gerrit Code Review 4 months ago

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/c/Packages/TYPO3.CMS/+/60325

#12 Updated by Gerrit Code Review 3 months ago

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

#13 Updated by Helmut Hummel 3 months ago

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

#14 Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF