I've encountered a repeating error which causes Drupal to return a blank page when attempting to add or edit a menu item. The submitted add/edit is not processed. The only error message is in the apache error log which reports "[notice] child pid 401 exit signal Bus error (10)" (pid changes each time).

Initially I assumed it was a buggy module so I did a clean install of Drupal with a brand new database and without any extra modules (I did add the Aberdeen theme but disabling it didn't remove the problem so I don't think this is relevant). I then started adding content again but quickly encountered the same problem. I was able to add a 2 or 3 menu items before the problem manifested but after that every attempt to add/edit a menu item failed.

The problem is critical because it's preventing any further updates to the site menus - although user access to the site itself seems to be working OK so far.

I'm running Drupal 5.1 with PHP 4.3.11 and MySQL 4.0.23 on Mac OSX 10.4.8
A dump of the the MySQL Drupal database files is attached.

Regards

David Bell
Alpha Information Services ltd
Glasgow, Scotland

CommentFileSizeAuthor
drupal_dump 09.02.2007-error.sql_.txt109.61 KBdb_ais

Comments

porter-1’s picture

I'm getting exactly the same thing, a blank page hanging. have to use the back button.

Drupal 5.1 PHP 4.3.10 MySql 4.0.15 Mac OS X 10.2.8 Apache 1.3.33

path is / on localhost

this sort of thing:
Sat Feb 24 16:44:48 2007] [notice] child pid 7295 exit signal Bus error (10)
[Sat Feb 24 16:44:51 2007] [notice] child pid 8487 exit signal Bus error (10)
[Sat Feb 24 16:48:05 2007] [notice] child pid 7250 exit signal Bus error (10)
[Sat Feb 24 16:48:28 2007] [notice] child pid 8488 exit signal Bus error (10)

when trying to enable disabled menu items, or add new menu items (by entering the path to existing nodes), from here this menu: admin/build/menu
Apart from that it works fine. Sorry I don't have more info to add.

pwolanin’s picture

Could be a PHP 4.3 issue (or maybe MySQL 4.0)? I've never had this error running Drupal 5.x under OSX system 10.3.9 or 10.4.8 with the default PHP 4.4.4 and apache 1.33, with either G4 or intel machines.

chellman’s picture

I've just encountered this problem myself. The problem function is menu_parent_options, which is recursive, and is apparently spinning out of control with given an $mid. I say it's the problem function because I can load the page if I comment the function call out in menu_edit_item_form.

This only happens if an $mid is passed to menu_edit_item_form. In other words, if I just load /admin/build/menu/item/add/, this issue does not appear.

A workaround appears to be using that page instead. I'm going to do some more looking to see if there's a fix somewhere, or if this is discussed elsewhere.

chellman’s picture

If you have a lot of menu items to add, you can work around this by changing the function as follows:

function menu_parent_options($mid, $pid = 0, $depth = 0) {
  $options = array();

  if ($depth > 3) return $options;  /* ADD THIS LINE */

I did this while I had a bunch of items to add, then removed it.

The menu system is being totally refactored for Drupal 6 if I remember correctly. I don't know if a backport of the improvements to Drupal 5 is in order. Maybe I'll take a peek at that and see if it would be nightmarish.

chx’s picture

Priority: Critical » Minor

First of all, congratulations to the original reporter, David, this is the best bug report I have ever seen. But I am demoting to minor, because it does seem to be a PHP 4.3 issue. I have used the database in the original report and called menu_parent_options on every mid in the database, no faults on PHP 5.2.1

vatavale’s picture

I have PHP 4.4.7 and Apache (1.3, 2.0) crush on edit or create menu item.

johnalbin’s picture

Title: Drupal 5.1 fails with bus error message when menu item added or edited » Drupal 5 fails with bus error message when menu item added or edited
Version: 5.1 » 5.x-dev

It is not a PHP 4.3 issue. As I was getting the same error with PHP 4.4.7, MySQL 5.0.45 and Drupal 5.2.

It is, however, a PHP Optimizer issue. I’ve tried Optimizer 3.2.6 (which comes with Zend Studio/Platform) and the latest 3.3.0. After disabling Optimizer, I no longer have the menu editing problem.

johnalbin’s picture

Okay, I have another website that has Zend Optimizer with the same problem.

And even if I turned off Zend Optimizer, the problem persisted UNTIL I then went to admin/settings/devel, made no changes to the settings and re-saved them. And then problem disappeared.

Not sure why that additional step was needed on this website, but I thought I would make a note of it.

greggles’s picture

Title: Drupal 5 fails with bus error message when menu item added or edited » Drupal 5 fails with bus error message when menu item added or edited (Zend and PHP4)

I have many sites running PHP5 with Zend Optimizer3.2.8 and have never seen this problem. I don't have access to sites using Zend Optimizer with PHP4 to be able to test that.

Can the folks affected by this describe what happens if they update PHP to PHP5?

You really should be doing that, especially in dev environments since PHP4 is losing supprt this calendar year and losing security support within a year.

greggles’s picture

One other thought - given that this is such a rare bug I would be fine with won't fixing it. The loss of behavior is critical - anyone who has this bug will report it. But we only see 2 comments a month. That can only happen from a "corner case" that is in a very dark hidden corner.

There are all sorts of apc, xcache, and eaccelerator problems that cause segmentation faults and we don't waste time trying to fix them. That's the nature of these optimizers and I think bugs should be raised with the optimizer (after testing against the most recent versions, of course).

johnalbin’s picture

Title: Drupal 5 fails with bus error message when menu item added or edited (Zend and PHP4) » Drupal 5 fails with bus error message when menu item added or edited (PHP4)

I would suspect that if I moved to PHP5 that the issue would be fixed.

But annoyingly, I discovered that disabling Zend Optimizer didn't fix the problem as I first thought. Instead of crashing when trying to view the menu add/edit page, it now waits to crash until I submit the menu add/edit form.

So I'm back to having a PHP4-specific bug caused by... uh...

gremlins?

(Can't wait for D6's menu system.)

joele’s picture

I also have this error, with

MySQL database 5.0.37
PHP 4.4.7
Unicode library PHP Mbstring Extension
Web server Apache/1.3.33 (Darwin) PHP/4.4.7

paul_gregory’s picture

I'm experiencing the same problem with a development website with lots of nodes. This problem doesn't appear with other (smaller) Drupal 5.x sites on the same development server.

PHP 4.4.7
Apache 2 on MAMP for the Mac
MySQL 5.0.41

When I switch MAMP to the bundled PHP 5 the problem seems to clear up - but our production server is going to be running PHP 4.3.9 so I want to develop on a PHP 4 platform.

wickwood’s picture

I also have this problem with a local development website, but it has almost no nodes yet because I'm just installing it. The Client's webhost is running PHP 4.4.1/MySQL4.1.22, so I am setting up my MAMP Pro to simulate that (PHP 4.4.7/MySQL5.0.41). I'm working on iMac with OSX 10.5.

Anyways, I discovered the problem when trying to add menu items to the Primary Links.

I have found that the problem only exists when the Zend Cache is set to none. If I use Eaccelator or Xcache, the problem does away.

I tried the trick of visiting the admin/settings/devel page, but that did nothing to help.

Hope that helps.

Steve

nasi’s picture

Title: Drupal 5 fails with bus error message when menu item added or edited (PHP4) » Drupal 5 fails with bus error message when certain actions performed (PHP4)
Component: menu system » base system

I've just come across the same problem myself, running MAMP (PHP 4.4.8, MySQL 5.0.41) on OSX 10.5 with Drupal 5.15.

In my case I only had two nodes created on the site and I experienced this error whenever I tried to edit a node (i.e. /node/xx/edit).

Using the tip above seems to have helped. I have set the cache to eAccelerator and all seems to be fine now. Hopefully this is just a problem with the dev environment and won't come back when I move to the production server.

Anyway, this extra information may be helpful to someone.

damien tournoud’s picture

Status: Active » Closed (won't fix)

Apparently this is a PHP4 issue... which is not supported anymore by the PHP team for some reasons :)

dougfz’s picture

Version: 5.x-dev » 5.20
Component: base system » menu.module
Assigned: Unassigned » dougfz
Priority: Minor » Critical

Drupal: 5.20,
MySQL: 5.0.77
PHP: 5.2.11
Apache: 2.2.14

I've got the same problem on an established site that was working fine locally and live. The hosting company upgraded Apache and PHP without warning.

Testing locally I was unable to replicate the problem I have no access to the server error logs and was unable edit or create nodes (Client not very impressed). Resorted to editing locally and doing a database uploads (Not an ideal solution).

Not sure if there is a limit to the number of menu items allowed as the site doe's have a lot of menu items. I mention this because I found that turning the menu module off enables me to do my edits which is why i've noted it as a component issue.

I hope this helps

iancawthorne’s picture

I too am having the same problem by the sounds of it. We have at least 15 sites effected. Our server was upgraded from php 5.2.10 to 5.2.11 without warning and now some (but not all) node edit forms and node add forms show page not found, plus all kinds of menu related forms.

Disabling the menu module allows the form to work, but this is no good as the site then has no menus.

Drupal : 5.20
PHP : 5.2.11
Apache : 2.2.14
MySQL version : 5.0.85-community

lucyconnuk’s picture

I seem to be having the same problem. Took code and database back to how it was before PHP upgrade, so that (as far as I can tell) the only difference is the PHP version. Before, it worked perfectly with no 500.shtml errors. Now, it's giving 500.shtml errors when trying to add new nodes of some types (usually, but not always CCK types.) Turning menu module off solves the problem, though I have no idea why it would be related.

my versions:
Apache: 2.2.14
MySQL: 5.0.87-community
PHP: 5.2.11
Drupal: 5.20

jtjones23’s picture

subscribing