Bug #68463
closedInfinite Recursion blocks the Live Workspace
0%
Description
When using the workspace module with the Live Workspace, we get the following message on some of our pages:
Connection Problem
Sorry, but an error occurred while connecting to the server. Please check your network connection.
After a little debugging we found out that the function resolveDataArrayChildDependencies() in the class TYPO3\CMS\Workspaces\Service\Dependency\CollectionService is trapped in an infinite recursion.
It seems that the relationship structure in our backend between certain Content Elements and pages is a circle which then leads to this infinite recursion.
We logged every $parent for every function call, additonally we logged every child. After a while we get this repeating pattern:
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: pages:41
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: pages:41
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: tt_content:2567
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: tt_content:2567
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: tt_content:2115
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: tt_content:2115
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: tt_content:2116
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: tt_content:2116
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: tt_content:9436
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: tt_content:9436
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: pages:20350
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: pages:20350
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: tt_content:82468
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: tt_content:82468
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: tt_content:82465
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: tt_content:82465
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: tt_content:82471
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: tt_content:82471
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: tt_content:82477
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: tt_content:82477
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: child: pages:41
20-07-15 15:26 - TYPO3\CMS\Workspaces\Service\Dependency\CollectionService: $parent: pages:41
"$pages:41" is a child of "tt_content:82477" which is itself a "grandgrand....child" from "$pages:41".
Files
Updated by Jörn M. about 9 years ago
Steps to reproduce:
- Add content/plugins with pagereferences
- Set for each reference to a page way up in the parent-lineage
- Go to workspace-module, select "Draft"
Expected behavior:
Display changes on this and sub-levels
Actual behavior:
Grows large stack (>1GB) and eventually dies of memory-limitations on a moderate site with ~40 pages. Server-log indicates segfault, debugger shows stack-overflow caused by near-infinite loop.
Updated by Peter Niederlag about 9 years ago
- Status changed from New to Needs Feedback
Hello Jörg,
could you please describe in more detail what you mean with "Add content/plugins with pagereferences"?
What types of content? What plugins? References in which field?
If you can, please try to describe the steps to reproduce the problem in a fresh TYPO3 installation.
What (exact)version of TYPO3 are you using?
What plugins/extensions are you using?
Are you using private(non-public) or patched extensions?
Greets,
Peter
Updated by Oliver Hader about 9 years ago
It might be possible that this happens, however to reproduce that some more details would be interesting on your TCA configuration that is required to produce this endless-loop.
Updated by Oliver Hader about 9 years ago
Is the plugin you referred to using FlexForms to define the page-loop?
If that's the case, https://review.typo3.org/#/c/37891/ might be the root of this endless-loop... that patch extends the handling for FlexForms but only is checking the type of the XML container, not the accordant sub-fields...
Updated by Stephan Ude almost 9 years ago
I have experienced the same problem. I tried to create an example as small as possible which causes the error. Here is what I got:
I have a plugin, containing a flexform in which you can enter a page list. Flexform is like this:
<T3DataStructure> <meta> <langDisable>1</langDisable> </meta> <sheets> <sDEF> <ROOT> <TCEforms> <sheetTitle>Foobar</sheetTitle> </TCEforms> <type>array</type> <el> <settings.pageList> <TCEforms> <label>Baz</label> <config> <type>group</type> <internal_type>db</internal_type> <allowed>pages</allowed> <size>10</size> <maxitems>100</maxitems> <minitems>0</minitems> </config> </TCEforms> </settings.pageList> </el> </ROOT> </sDEF> </sheets> </T3DataStructure>
I have two pages A and B. On page A I use the plugin and the page list inside the plugin only contains B.
On page B I have a reference to the content element (so the plugin) on page A.
When I now create workspace versions of A, B and the content element/plugin on page A, then I get the dependency loop while looking at either page A or B with the workspace module in the backend.
I am not sure if there are smaller examples for the problem. The machine I analysed is kind of a huge thing and this is just the smallest example I could extract from it.
Updated by Torsten Fink over 8 years ago
- File CollectionService.php CollectionService.php added
I build a little solution to avoid the endless trips, it works for me.
Updated by Gerrit Code Review over 8 years ago
- Status changed from Needs Feedback 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/46988
Updated by Gerrit Code Review over 8 years 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/46988
Updated by Gerrit Code Review over 8 years 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 https://review.typo3.org/46991
Updated by Gerrit Code Review over 8 years 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/46992
Updated by Gerrit Code Review over 8 years 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/46988
Updated by Gerrit Code Review over 8 years 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/46988
Updated by Gerrit Code Review over 8 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46988
Updated by Oliver Hader over 8 years ago
Updated by Oliver Hader over 8 years ago
- Status changed from Under Review to Accepted
Updated by Alexander Opitz over 8 years ago
IMHO this issue isn't only caused by #65126, this can also happen if you have circular dependencies, which will be resolved by this patch.
Updated by Stephan Ude over 8 years ago
I agree, the patch on #65126 does not solve this problem.
I just had another issue with circular dependencies in latest TYPO3 6.2: An FCE had a link to the page where it was placed on.
The problem persists and I think there are a couple of ways to produce such a dependency loop.
Updated by Christian Kuhn almost 2 years ago
- Status changed from Accepted to Needs Feedback
Is this still an issue with current v11 / v12 workspace module?
Updated by Benni Mack about 1 year ago
- Status changed from Needs Feedback to Closed
Closing this ticket due to lack of feedback. If you feel this is the wrong decision, let me know.