LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Very Serious Bug in Slackware(32)-current: LAMP Stack Nuked (http://www.linuxquestions.org/questions/slackware-14/very-serious-bug-in-slackware-32-current-lamp-stack-nuked-862222/)

Darth Vader 02-12-2011 08:07 AM

Very Serious Bug in Slackware(32)-current: LAMP Stack Nuked
 
LAMP stack don't work on a typical LAMP server installation and even in an testing localhost.

Steps to reproduce this bug:
  1. Create an fresh&full installation of Slackware(32)-current.
  2. Activate the MYSQL using the best Slackware recommended way.
  3. Activate the HTTPD with the PHP extensions, on localhost.
  4. Install on /var/www/htdocs some CMS, i.e. phpMyAdmin or Drupal
  5. Open in an web-browser the http://localhost and try to continue your CMS installation.
  6. Got your White Screen of Death.

If you want to admire one White Screen of Death first, try: http://admin.darkstarlinux.ro/.

This is an phpMyAdmin installation. Try an random user/password and see what happen.


EDIT: Now this server use patched packages, see below for details.

Excerpt from an /var/log/httpd/error_log

Code:

[Sat Feb 12 14:40:50 2011] [notice] Apache/2.2.17 (Unix) DAV/2 PHP/5.3.5 configured -- resuming normal operations
[Sat Feb 12 14:41:02 2011] [notice] child pid 3269 exit signal Segmentation fault (11)
[Sat Feb 12 14:41:02 2011] [notice] child pid 3270 exit signal Segmentation fault (11)
[Sat Feb 12 14:42:50 2011] [notice] SIGHUP received.  Attempting to restart
[Sat Feb 12 14:42:50 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Feb 12 14:42:50 2011] [notice] Digest: done
[Sat Feb 12 14:42:51 2011] [notice] Apache/2.2.17 (Unix) DAV/2 PHP/5.3.5 configured -- resuming normal operations
[Sat Feb 12 14:43:10 2011] [notice] child pid 3296 exit signal Segmentation fault (11)
[Sat Feb 12 14:43:10 2011] [notice] child pid 3297 exit signal Segmentation fault (11)
[Sat Feb 12 14:44:08 2011] [notice] SIGHUP received.  Attempting to restart
[Sat Feb 12 14:44:08 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Feb 12 14:44:08 2011] [notice] Digest: done
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/dbase.so' - /usr/lib/php/extensions/dbase.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/mhash.so' - /usr/lib/php/extensions/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Sat Feb 12 14:44:09 2011] [notice] Apache/2.2.17 (Unix) DAV/2 PHP/5.3.5 configured -- resuming normal operations


lonestar_italy 02-12-2011 08:37 AM

I am watching this kind of issue right now too.
I think php5 needs some recompilation because of apr/apr-utils upgrade, and possibly some other libraries do too.

Code:

root@slack:/tmp/apache-cores# gdb httpd
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/httpd...(no debugging symbols found)...done.
(gdb) b ap_proces_request
Function "ap_proces_request" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (ap_proces_request) pending.
(gdb) run -X -d /usr/sbin/httpd
Starting program: /usr/sbin/httpd -X -d /usr/sbin/httpd
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00000058 in ?? ()
(gdb) where
#0  0x00000058 in ?? ()
#1  0xb7f09de5 in apr_brigade_flatten () from /usr/lib/libaprutil-1.so.0
#2  0xb754b87e in ?? () from /usr/lib/httpd/modules/libphp5.so
#3  0xb7462c2a in sapi_read_standard_form_data ()
  from /usr/lib/httpd/modules/libphp5.so
#4  0xb746331b in sapi_activate () from /usr/lib/httpd/modules/libphp5.so
#5  0xb7459a82 in php_request_startup () from /usr/lib/httpd/modules/libphp5.so
#6  0xb754c1f5 in ?? () from /usr/lib/httpd/modules/libphp5.so
#7  0xb754c8a4 in ?? () from /usr/lib/httpd/modules/libphp5.so
#8  0xb7fe0271 in ap_run_handler ()
#9  0xb7fe0679 in ap_invoke_handler ()
#10 0xb7fef3e8 in ap_process_request ()
#11 0xb7fec018 in ?? ()
#12 0xb7fe7591 in ap_run_process_connection ()
#13 0xb7ff47b1 in ?? ()
#14 0xb7ff4b01 in ?? ()
#15 0xb7ff542f in ap_mpm_run ()
#16 0xb7fc9bd6 in main ()
(gdb)


Darth Vader 02-12-2011 08:48 AM

Quote:

Originally Posted by lonestar_italy (Post 4256041)
I am watching this kind of issue right now too.
I think php5 needs some recompilation because of apr/apr-utils upgrade, and possibly some other libraries do too.

Code:

root@slack:/tmp/apache-cores# gdb httpd
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/httpd...(no debugging symbols found)...done.
(gdb) b ap_proces_request
Function "ap_proces_request" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (ap_proces_request) pending.
(gdb) run -X -d /usr/sbin/httpd
Starting program: /usr/sbin/httpd -X -d /usr/sbin/httpd
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00000058 in ?? ()
(gdb) where
#0  0x00000058 in ?? ()
#1  0xb7f09de5 in apr_brigade_flatten () from /usr/lib/libaprutil-1.so.0
#2  0xb754b87e in ?? () from /usr/lib/httpd/modules/libphp5.so
#3  0xb7462c2a in sapi_read_standard_form_data ()
  from /usr/lib/httpd/modules/libphp5.so
#4  0xb746331b in sapi_activate () from /usr/lib/httpd/modules/libphp5.so
#5  0xb7459a82 in php_request_startup () from /usr/lib/httpd/modules/libphp5.so
#6  0xb754c1f5 in ?? () from /usr/lib/httpd/modules/libphp5.so
#7  0xb754c8a4 in ?? () from /usr/lib/httpd/modules/libphp5.so
#8  0xb7fe0271 in ap_run_handler ()
#9  0xb7fe0679 in ap_invoke_handler ()
#10 0xb7fef3e8 in ap_process_request ()
#11 0xb7fec018 in ?? ()
#12 0xb7fe7591 in ap_run_process_connection ()
#13 0xb7ff47b1 in ?? ()
#14 0xb7ff4b01 in ?? ()
#15 0xb7ff542f in ap_mpm_run ()
#16 0xb7fc9bd6 in main ()
(gdb)


I agree, it's something connected with PHP, because an Python based CMS, like Trac, works fine. But, I tried to rebuild from official SlackBuilds the PHP (and Alpine, as dependencies). The results of this rebuild are, sadly, the same White Screen of Death.

To add to the strange problem, some Gentoo dudes claim that is something connected with GCC-4.5.X, and an build with GCC-4.4.5 works fine.

lonestar_italy 02-12-2011 08:55 AM

I have the WSD using WordPress, but only when trying to upgrade some plugin. The rest of blog/CMS seems to be working fine.

Considering there is also a mysql upgrade, maybe it's something at php/sql interaction level. But a php recompilation should have solved it indeed :-(

Darth Vader 02-12-2011 09:46 AM

Finally, I found a solution for this bug. Then, we need to patch APR and HTTPD.

I created two packages, apr-1.4.2-i486-2.txz and httpd-2.2.17-i486-3.txz which perform fine in a local installation. Now I try the server side testing.

The additional patches and those packages including the build sources, are on ftp://ftp.darkstarlinux.ro/pub/people/darth/LAMP/. Is anyone interested to test it?

<EDIT>
Looks like those patches works fine on the server side, too. I hope that the Slackware Team will patch the official packages, too.

lonestar_italy 02-12-2011 10:05 AM

Yes, I installed your patched packages and they seem to have solved my issue too.

well done :) But what are the details?

Darth Vader 02-12-2011 10:16 AM

Quote:

Originally Posted by lonestar_italy (Post 4256106)
Yes, I installed your patched packages and they seem to have solved my issue too.

well done :) But what are the details?

Thanks! Well, looks like there are GCC-4.5.X compatibility problems in the source code.

The additional patches used are on ftp://ftp.darkstarlinux.ro/pub/peopl.../LAMP/patches/.

ponce 02-12-2011 10:29 AM

here seems to be a short discussion on the topic:

http://forums.gentoo.org/viewtopic-t-855112.html

ponce 02-12-2011 10:52 AM

tried this and rebuilding httpd only seems to work around it as well.

Darth Vader 02-12-2011 11:11 AM

Quote:

Originally Posted by ponce (Post 4256142)
tried this and rebuilding httpd only seems to work around it as well.

Well, there isn't a single way to skin the cat. ;)

I tested locally and your sollution works fine, but maybe APR is still ill?

ponce 02-12-2011 11:20 AM

For what I have understood from the gentoo forum topic, the ubuntu related bug and the gcc related bug (though invalid - pretty much hardcore for me :D ), seems like the problem with httpd segfaulting with POST action on x86 are gcc 4.5.x optimizations.

willysr 02-13-2011 10:57 AM

This thread should be marked as SOLVED by now as the new updates already being pushed to public

Darth Vader 02-13-2011 12:21 PM

Quote:

Originally Posted by willysr (Post 4256932)
This thread should be marked as SOLVED by now as the new updates already being pushed to public

Sorry, my bad!


All times are GMT -5. The time now is 05:55 PM.