nixCraft Poll

Topics

Lighttpd php segfault at 0000000000000040 rip 0000003e30228278 rsp 0000007fbffff708 error 4

Posted by Vivek Gite [Last updated: October 17, 2006]

Lighttpd logo

I have recently noticed this error. Although server continues to work w/o problem at some point your server will crash. It is better to fix this error. The main problem was chrooted lighttpd installation. Few libraries were not copied. You need to use ldd command to locate name of libraries. In my case it was curl library used my DOMXML php module. Use following procedure to trace required libraries:

# mkdir /webroot/bin
# cp /bin/bash /webroot/bin
# cp /usr/bin/strace /webroot/bin
# l2chroot /usr/bin/strace
# l2chroot /bin/bash
# chroot /webroot
# strace php /path/to/script.php 2> /tmp/debug.txt
# exit
# vi /webroot/tmp/debug.txt

Now find out which shared libraries not found. Next you need to copy all missing libraries to /lib or /usr/lib location. You need to repeat above procedure till all shared libraries not copied to chroot jail.

Following is recommended solution if you run Apache or lighttpd in chroot jail.
Copy all shared libs from /lib and /usr/lib to /chroot directory. But don't copy any executable from /bin/ /usr/bin or /usr/sbin directory.
# cp -avr /lib/ /chroot/lib/
# cp -avr /usr/lib/ /chroot/usr/lib/

Above solution is quite secure and I have successfully implemented it for high performance Apache shared load balancing business hosting. More than 800+ sites are hosted using 6 Apache web server and 2 node MySQL cluster.

Don't forget to remove /chroot/bin directory and all files after troubleshooting.

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in other helpful articles:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.