Project

General

Profile

Actions

Bug #68463

closed

Infinite Recursion blocks the Live Workspace

Added by form4 GmbH & Co. KG almost 9 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2015-07-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

CollectionService.php (6.5 KB) CollectionService.php Torsten Fink, 2016-03-01 16:19

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #65126: Refindex not correctly updated for flexform fieldsClosed2015-02-17

Actions
Is duplicate of TYPO3 Core - Bug #70921: Really resolve meaning of FlexForm fields in version dependency resolverAcceptedOliver Hader2015-10-21

Actions
Actions #1

Updated by Jörn M. over 8 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.

Actions #2

Updated by Peter Niederlag over 8 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

Actions #3

Updated by Oliver Hader over 8 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.

Actions #4

Updated by Oliver Hader over 8 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...

Actions #5

Updated by Stephan Ude about 8 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.

Actions #6

Updated by Torsten Fink about 8 years ago

I build a little solution to avoid the endless trips, it works for me.

Actions #7

Updated by Gerrit Code Review about 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

Actions #8

Updated by Gerrit Code Review about 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

Actions #9

Updated by Gerrit Code Review about 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

Actions #10

Updated by Gerrit Code Review about 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

Actions #11

Updated by Gerrit Code Review about 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

Actions #12

Updated by Gerrit Code Review about 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

Actions #13

Updated by Gerrit Code Review about 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

Actions #14

Updated by Oliver Hader about 8 years ago

Behavior is caused by #65126 - WIP of a fix has been started in #70921

Actions #15

Updated by Oliver Hader about 8 years ago

  • Status changed from Under Review to Accepted
Actions #16

Updated by Alexander Opitz almost 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.

Actions #17

Updated by Stephan Ude almost 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.

Actions #18

Updated by Christian Kuhn over 1 year ago

  • Status changed from Accepted to Needs Feedback

Is this still an issue with current v11 / v12 workspace module?

Actions #19

Updated by Benni Mack 6 months 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.

Actions

Also available in: Atom PDF