Bug #94102

Endless scheduler task execution on PostgreSQL if task_group=NULL

Added by Stephan Großberndt 5 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-05-10
Due date:
% Done:

100%

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

Description

I have an issue with the TYPO3 scheduler and PostgreSQL. Apparently the "serialized_task_object" which is unserialized here and saved back to the database here may have the value in the column task_group set to NULL instead of 0.
I have not experienced any issues with that using MySQL but as the SQL definition reads task_group int(11) unsigned DEFAULT '0' NOT NULL, when trying to save the task back in PostgreSQL an SQL error ocurrs:

2021-05-10 12:37:36.332 CEST [22050] foo@bar STATEMENT:  UPDATE "tx_scheduler_task" SET "nextexecution" = $1, "disable" = $2, "description" = $3, "task_group" = $4, "serialized_task_object" = $5 WHERE "uid" = $6
2021-05-10 12:37:36.334 CEST [22050] foo@bar ERROR:  null value in column "task_group" violates not-null constraint
2021-05-10 12:37:36.334 CEST [22050] foo@bar DETAIL:  Failing row contains (2, 1357211168, 0, 1621170900, 1620639799, , CLI, \x4f3a34353a225459504f335c434d535c5265706f7274735c5461736b5c5379..., \x, , null, 0).

And here the real trouble begins: This seems to be executed in a loop by the scheduler endlessly hogging memory and processing power until running out of diskspace. As the task is not marked as "being executed" either multiple instances of the task will be spawned even if the configuration forbids multiple executions at once.

I haven't been able to find out how task_group may become NULL instead of 0, the easy fix would be to re-set the task group to 0 if it is NULL.

#1

Updated by Gerrit Code Review 5 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/c/Packages/TYPO3.CMS/+/69097

#2

Updated by Gerrit Code Review 5 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/+/69097

#3

Updated by Gerrit Code Review 5 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/+/69097

#4

Updated by Gerrit Code Review 5 months ago

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

#5

Updated by Stephan Großberndt 5 months ago

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

Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF