Segmentation fault in apache using June 10 2008 snapshot

triskelion - June 27, 2008 - 07:20
Project:NodeReferrer
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

When I call a page with a nodereferrer field, apache throws a segmentation fault. De-activating the module, or removing the field from the content type allows the page to serve properly.

Might be earier to track if the changes you made were logged in the release notes. I had a peek at the code, but nothing jumps out at me.

I looked at /node/266531 and /node/116576 for clues. I am running Apache 2.2, D 5.7 with php 5.1.6. It's not old code causing the problems.

#1

triskelion - June 27, 2008 - 23:16

Update.

I put a trace on nodereferrer.module and found that nodereferrer_field_settings was being called with $op="database columns" several hundred times leading up to the seg fault. A backtrace gave the following:

nodereferrer_field_settings("database columns", array(field_cck_partners))
from includes/module.inc line 386
call_user_func_array("nodereferrer_field_settings", array(database columns))
from sites/all/modules/cck/content.module line 900
module_invoke("nodereferrer","field_settings","database columns",array(field_cck_partners))
from sites/all/modules/cck/content.module line 561
content_database_info(array(field_cck_partners type nodereferrer))
from sites/all/modules/cck/content.module line 174
_content_field_invoke_default("load", object(nodereferrer content type))
from sites/all/modules/cck/content.module line 307
content_load(object(nodereferrer content type))
from modules/node/node.module line 479
content_nodeapi(object(nodereferrer content type),"load",NULL,NULL)
from modules/node/node.module line 547
node_invoke_nodeapi(object(nodereferrer content type),"load")
from sites/all/modules/webform/webform.module line 105
node_load( array( FALSE) )
from
webform_menu( array( FALSE) )
from includes/module.inc line 406
call_user_func_array("webform_menu", array( FALSE) )
from includes/menu.inc line 1221
module_invoke_all( "menu", FALSE )
from includes/menu.inc line 220
_menu_append_contextual_items( array(0) )
from includes/menu.inc line 391
menu_get_menu( array(0) )
from index.php line 15
menu_execute_active_handler( array(0) )

As you have no case in nodereferrer_field_settings for "database columns" I assume a loop is being created which fills the stack and causes the seg fault.

I set up a fresh install of D5.7 to try to find the incompatibilities. I activated nodereference and nodereferrer, and created two content types: A with nodereferences to B (multiple select) and N listing A-type nodes with a back reference. Everything worked fine. I suspected Localizer might be the culprit, so I activated it, and still everything worked fine. I installed a few other stable modules like pathauto, views, comments, and the seg fault appeared when I tried to display any B-type nodes with the nodereferrer field. Then I started removing modules. The behaviour persisted even when I was down to nodereference, nodereferrer and localizer (with their required modules), even though the combination had been working at the beginning. Sorry, but I never thought to look for variables which had not been cleared in the uninstalls. When I removed the localizer modules, function was restored for nodereferrer.

In another fresh setup, I installed the works from the development site, including gmap, location, etc, with nodereferrer and no localizer. Everything worked fine. Installing localizer triggered the seg fault.

Site works fine with localizer and no nodereferrer, or with nodereferrer and no localizer. I need both! I have opened an issue with the localizer project at #275923: Segmentation fault in apache nodereferrer with localizer with reference to this report. Both are fine modules, and I hope they learn to play well together. I am a Drupal newbie, but I have some solid php background, and I am willing to test. Hope the two projects can get together and sort this out.

#2

dopry - July 19, 2008 - 19:08
Status:active» postponed (maintainer needs more info)

You might look for a recursive loop between nodes loading each other... Can you find the loop in the backtrace?

#3

triskelion - January 5, 2009 - 15:22
Status:postponed (maintainer needs more info)» closed

Just noticed this issue is still open. I am using 5x-3 and have not encountered any problems. I am very pleased with the ver. 3 so far and am marking this issue as closed.

 
 

Drupal is a registered trademark of Dries Buytaert.