Problem/Motivation

I found this while doing a security review of your module.

To reproduce:

1. Have a decent amount of content on your site. I used two commands to generate things:
$ drush genc 20 10 # generate 20 nodes, with at most 10 comments per node
$ drush genc 20 10 --types=people # 'people' is a content type I created

2. Create a basic view, accept the default values. Set the entity type to "comment."

3. Add an EVA field, and attach the view to Content:Node, and Bundles:(check all bundles available to you)

4. Save the view.

5. AJAX dies first with error message:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /?q=admin/structure/views/view/_script_alert_xss_script_/preview/entity_view_1/ajax
StatusText: OK
ResponseText: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /var/www/html/sites/all/modules/views/includes/base.inc on line 147

6. Then, when you click okay and go to your homepage, the site white-screens with the following error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /var/www/html/sites/all/modules/views/plugins/views_plugin_display.inc on line 823

7. To restore the site, EVA has to be manually disabled. After that, the view attachment doesn't show up. Attempting to save the view any time after this causes the same AJAX error and PHP white screen error.

Proposed resolution

* Check that the memory is available before allocation
* Handle the error by telling the user no.

Remaining tasks

None Known

User interface changes

None known

API changes

None known

Comments

nickbits’s picture

Version: 7.x-1.2 » 7.x-1.x-dev

Hi,

I have used EVA a lot on D6 but first time needed it on D7. I get the same error, second one - "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted" but all I have to do is:

  1. Enable EVA
  2. Create EVA attachment (don't need to do anything other than attach it)
  3. Visit the views page

Now simple thing is to increase the PHP memory limit. I did that, increased it to 512MB, left it 5 or 10 mins and the page still not rendered. But like you, as soon as I disable EVA it all works fine. Have tested 1.2 and the Dev release, get same issue.

So question is, is this a bug with EVA, or is something else causing a conflict?

Nick

PlayfulWolf’s picture

Priority: Normal » Major

have similar problem:
1. Create any View with EVA entity, Display mode: anything not Fields
2. Load any page with ANY(!!!) View display

Site WSOD's for few minutes before spitting out out of memory error
At first thought this is some server problem, but when deleting that View with EVA solves the problem

PlayfulWolf’s picture

daniroyo’s picture

Hi all,

I had a similar problem some days ago, and I finally resolved just few hours now, but removing one EVA field from my content view mode.

I have an EVA Field inside a content, inside a specific view mode that I am rendering.

The problem is that I am trying to render a content which has EVA Field, EVA that renders content via view mode, which has in its view mode, another EVA Field, and this EVA Field, depends on a Field of the first ONE.

I am going to try to clarify my problem.

One content type: A
Other content type: B

B has in its view mode one EVA Field, this EVA Field is trying to render one field from A, we will call A.picture

So, A has an EVA Field to render a list of contents (B), contents references with a entity reference field.

If I am not clear, I could post some images to clarify our problem.

I am not sre if we have here circular dependences, but... lets see.´

Let me know if someone knows how to solve mantaining the same structure ;)

geek-merlin’s picture

Status: Active » Postponed (maintainer needs more info)

After reading all descriptions it appears to me that all above is a consequence of #1296610: Prevent disabled fields from being rendered (performance).
Because i don't see a possibility of programmatic recursion prevention that does not impact legitimate use cases, setting to postponed.

If someone finds an instance of this issue that is not #1296610: Prevent disabled fields from being rendered (performance), please reopen with exact description.
If someone has a plan for a recursion prevention that does not impact legitimate use cases, please reopen.
Otherwise close after some time as dup.