How to reproduce :
- install Domain Access 3.x prior to commit a719dcd (for example, use commit f5d241d)
- work with it (create a second domain, for example)
- update Domain Access code to last 3.x-dev (as of today, it is commit ddc960e, but I can also reproduce from commit a719dcd)
- Drupal segfaults on every pages (no possible updgrade path : update.php segfaults, drush segfaults, home page too...)
I guess the problem comes from something in commit a719dcd (see diff here).
I'm using Apache 2.2.19, PHP 5.3.6, and MySQL Community Server 5.5.15.
Regards,
David
Comments
Comment #1
David Stosik commentedThat's even worse. Domain Access also segfaults on a clean install.
How to reproduce :
- install Drupal minimal profile
- download Domain Access 3.x-dev (drush command: drush dl domain-3.x-dev )
- enable Domain Access module (drush command: drush en domain )
- copy "include_once DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';" to site settings.php file
- Drupal segfaults ! (index.php, update.php, drush...)
Still using those versions (on MacOS X Lion): Apache 2.2.19, PHP 5.3.6, and MySQL Community Server 5.5.15.
David
Comment #2
David Stosik commentedFirst problem: there is a double "passing by reference", in call and in function signature, for domain_update_messages().
I'm experiencing other problems on a clean install, I think I'd better open other issues when I found more.
Comment #3
David Stosik commentedAs it kills a clean install, I set priority to critical.
Comment #4
agentrickardNice catch on the reference. Is that really enough to cause a segfault, though?
This obviously doesn't happen for me.
Running:
* PHP 5.3.2
* MySQL 5.1.44-log
* Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2
(using MAMP on OS X Snow Leopard)
I'm curious if PHP 5.3.6 is different enough to explain the difference.
Does this patch stop the segfaults for you? (Committing anyway, but need to know).
Comment #5
agentrickardMarking this one fixed, but would love more details here.
Note that the offending patch/commit passed the provided tests, so I wonder just what the variance is that causes the problem for you.
Comment #6
David Stosik commentedYeah, the patch I provided stops the segfault.
Are you sure your tests execute this piece of code ?
As long as it's not executed, I only get a notice telling me that call-time pass-by-reference is deprecated.
I only get a segfault when the call is done.
Comment #7
agentrickardWell, even with the code, my system never throws a segfault -- not even when I was debugging the original code. So even a test wouldn't catch the segfault.
Adding a test here is a good idea. We can check if the drupal_set_message() fires as expected.
Setting to needs work to add that test.
Comment #8
David Stosik commentedNot the first time the deprecated "call-time pass-by-reference" generates segfaults : #832108: Call-time pass-by-reference error / segmentation fault
Comment #9
agentrickardSetting back to needs work for the test.
Comment #10
jonabhcant find this domain.module you mention. where is it located ?
Comment #11
MPeli commentedI applied the patch. Unfortunately, it did not help. I get following error:
Deprecated function: Call-time pass-by-reference has been deprecated in drupal_load() (line 1114 of /home/users/MyUser/example.com/web/includes/bootstrap.inc).Comment #12
agentrickardThat error is unrelated too this issue, sorry.
Comment #13
agentrickardComment #14
Marvine commentedHi,
I reopen the issue because I have the same problem.
First I have the following error message :
PHP Fatal error: include_once(): Cannot redeclare class insertquery_mysql
Even if I wrap my function with
if (!class_exists('InsertQuery_mysql')) {cf. http://help.getpantheon.com/pantheon/topics/fatal_error_require_once_cannot_redeclare_class_insertquery_mysql_in_srv_bindings_e00a4bcbe3264dbc99e16a53cf85d78b_code_includes_database_database_inc_on_line
Next, i have crash with (in /var/log/httpd/error_log) :
[Tue Oct 30 10:59:33 2012] [error] [client 10.26.176.74] PHP Fatal error: include_once(): Cannot redeclare class insertquery_mysql in /home/project1/trunk/includes/bootstrap.inc on line 1128, referer: http://site1.dev.domain.com/
[Tue Oct 30 10:59:34 2012] [notice] child pid 3250 exit signal Segmentation fault (11)
Any ideas ?
Comment #15
carn1x commented@#14, I believe that error can be attributed to APC (possibly other caching software like eAccelerator / XCache). Caching has also been known to cause segfaults. Try turning your caching off or changing to another one.