kernel: php-cgi segfault at

thunn

Verified User
Joined
Mar 13, 2012
Messages
167
Dear Supporters,
I recently see some messages like this in error log:
Code:
Oct 21 18:24:50 mydomain kernel: php-cgi[18817]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fff03094e30 error 4
Oct 21 18:39:19 mydomain kernel: php-cgi[22970]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fff58652b50 error 4
Oct 21 18:39:30 mydomain kernel: php-cgi[22988]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fffabe7a5d0 error 4
Oct 21 18:39:52 mydomain kernel: php-cgi[23069]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fff7e7e65b0 error 4
Oct 21 18:42:09 mydomain kernel: php-cgi[23805]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fffb47ada40 error 4
Oct 21 18:54:25 mydomain kernel: php-cgi[27183]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fff2c1115e0 error 4
My hosting provider have tried to replace RAM but this still appear. I don't know how to resolved this. I have tried to re-build suphp but can't resolve.

Please help.

Thanks.
 
Please help.

Hello,

You might need to find what exact page/script crashes, and re-view the code in order to understand what modules, extensions are used there. And then disable/remove all extensions from PHP (find lines in php.ini beginning with extension=xxxx.so) and commented out it. And check if error disappear. If so, then one by one enable extension back and see if the error comes again. If it does not help, then you might need to re-build PHP, change PHP versions to the most recent one.

You might need to disable ionCube, Zend, APC, etc.
 
OK, thanks for both answers.

I will try to rebuild + debug steps by step to locate problem.
 
I am experiencing the same with apache 2.4, php 5.4 in suphp.
But maybe this isn't the problem you are having.

Code:
[Thu Oct 25 19:42:34.059119 2012] [core:notice] [pid 18972] AH00094: Command line: '/usr/sbin/httpd -D SSL'
[Thu Oct 25 19:42:45.073895 2012] [core:notice] [pid 18972] AH00052: child pid 18978 exit signal Segmentation fault (11)

When I am requesting a file that does not exist (with extention .php)
For example http://yourdomain.com/filethatnotexists.php
the connection drops, and the apache child segfaults.

This problem is probably caused by suphp, php5.4 and or apache 2.4 together.
 
I've just reverted back to apache 2.2.23.
The problem goes away.

Maybe there is a difference in how apache 2.2 and 2.4 handles non existent files.
While apache 2.2 returns 404 not found,
2.4 doesn't and passes the request directly to mod_suphp.
I would say that its a bug in mod_suphp, it should check first for the file to exist before segfaulting just like that.
 
I've just reverted back to apache 2.2.23.

I've done the same, but my issue was related to how PHP detects REMOTE_ADDR. In my case (I use NGINX+Apache), $_SERVER["REMOTE_ADDR"] brings server IP, but nor IP of user. And I use suPHP as the author of thread. So here we are now facing different issues with Apache 2.4.
 
Does someone think there will be an update of suphp?
If I remember correctly suphp hasn't got any update since 2009 ...
The current one doesn't seem to work ok on apache 2.4 I think ...

Or maybe I should start getting into modruid??
 
Is it CustomBuild 2.0? If yes, try "./build update; ./build suphp". We included some patches there.
 
Is it CustomBuild 2.0? If yes, try "./build update; ./build suphp". We included some patches there.

Will you please add the same suphp patches to custombuild 1.2? I am soon about to upgrade to apache 2.4.x, and I am running suphp. If those suphp patches will not be added to custombuild 1.2, then I would need to upgrade to custombuild 2.0 at the same time as I upgrade to apache 2.4.x, but I would like to avoid that.
 
John should upload CB 1.1 and 1.2 to DA servers with the same patches, he already has the scripts.
 
Thank you, smtalk. I have sent DirectAdmin support a email asking them to add suphp patches for apache 2.4.x to custombuild 1.2. If he does add them, I can plan to do my upgrades like this:

1: First upgrade to apache 2.4.x, then do testing and wait for a month to see if there is trouble.

2: Upgrade to custombuild 2.0 and continue to use suphp, then do testing and wait for a month to see if there is trouble.

3: Upgrade/replace suphp with mod_ruid2 and do testing.

4: Done! Welcome to the future! :)

Thank you for adding support for suphp into custombuild 2.0, it makes it a lot more safer for me to then be able to do the upgrades/changes separated like this, one by one, instead of being forced to do everything at the same time.
 
Hello,

1.1 and 1.2 updated with latest code on files1.
Allow up to 24 hours for the other mirrors to propagate this data.

John
 
Hello,

1.1 and 1.2 updated with latest code on files1.
Allow up to 24 hours for the other mirrors to propagate this data.

Is this change backword compatible with Apache 2.2.23? I am still running Apache 2.2.23 and just did this:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build php n
./build apache
./build suphp

After that, I see I have a new directory at /usr/local/directadmin/custombuild/patches wich contain these files:

suphp_attachment.patch
suphp_attachment.diff
suphp_script_name.patch
suphp_calling_user.patch

I am a little nervous now, please confirm that the patches will not create trouble for apache 2.2.23?

Also I noticed that my suphp.conf file at /usr/local/suphp/etc/suphp.conf changed from this

errors_to_browser=false
to be this
errors_to_browser=true

I hope that is ok also?
 
Last edited:
Dear Supporters,
I recently see some messages like this in error log:
Code:
Oct 21 18:24:50 mydomain kernel: php-cgi[18817]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fff03094e30 error 4
Oct 21 18:39:19 mydomain kernel: php-cgi[22970]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fff58652b50 error 4
Oct 21 18:39:30 mydomain kernel: php-cgi[22988]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fffabe7a5d0 error 4
Oct 21 18:39:52 mydomain kernel: php-cgi[23069]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fff7e7e65b0 error 4
Oct 21 18:42:09 mydomain kernel: php-cgi[23805]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fffb47ada40 error 4
Oct 21 18:54:25 mydomain kernel: php-cgi[27183]: segfault at 000000000000000b rip 00000000007246f9 rsp 00007fff2c1115e0 error 4
My hosting provider have tried to replace RAM but this still appear. I don't know how to resolved this. I have tried to re-build suphp but can't resolve.

Please help.

Thanks.

Hi All,
Just want to update on this issue. After I upgraded from php 5.3 to php 5.4.8 then the problem is resolved.

Thank you.
 
Back
Top