DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th July 2009
Albright Albright is offline
Port Guard
 
Join Date: Apr 2009
Posts: 14
Thanked 0 Times in 0 Posts
Default Diagnosing a segfault error

I've set up a web server on a RootBSD VPS with Lighttpd and PHP via FastCGI to operate a site with the Drupal CMS. When I take a certain, repeatable series of steps in Drupal, I'm causing the PHP process to exit on signal 11, a segmentation fault.

I've already spent several hours over the past couple of weeks diagnosing this through trial and error, but haven't been able to figure out what's causing this or how to work around it. Even more flummoxing is that my company also has a RootBSD VPS account which is not having this problem. Their account is a step above mine and has a larger memory allocation, so I suspect that might be the problem or at least part of it, but I'm not sure.

I guess what I'm asking is, is there a way to get more information on what is causing such an error, or perhaps even where in Drupal's codebase it's occurring?
Reply With Quote
  #2   (View Single Post)  
Old 6th July 2009
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,066
Thanked 198 Times in 156 Posts
Default

I'm not sure, but I suspect this is a bug in php.

Does php leave a coredump? Try analyzing that (gdb -c), try recompiling PHP & extensions with debugging symbols (-DWITH_DEBUG).

Also, what exactly are you doing in drupal to cause this error?

Also, these options might be useful in php.ini
Code:
report_zend_debug = 1
fastcgi.logging = 1
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 7th July 2009
Albright Albright is offline
Port Guard
 
Join Date: Apr 2009
Posts: 14
Thanked 0 Times in 0 Posts
Default

Thanks for the help, CS, but I'm afraid I haven't figured it out yet.

Quote:
Originally Posted by Carpetsmoker View Post
I'm not sure, but I suspect this is a bug in php.
Perhaps, but then why does it only happen on this VPS?

Quote:
Does php leave a coredump? Try analyzing that (gdb -c), try recompiling PHP & extensions with debugging symbols (-DWITH_DEBUG).
It does, though since it tends to put it in a random Drupal directory, I have to use the find command to find it. However, once I studied up a bit on gdb, I couldn't get it to tell me anything useful:

Code:
> gdb -c /usr/local/www/www/sites/all/modules/nice_menus/php-cgi.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".
Core was generated by `php-cgi'.
Program terminated with signal 11, Segmentation fault.
#0  0x288f9107 in ?? ()
(gdb) bt
#0  0x288f9107 in ?? ()
Cannot access memory at address 0xbf9ffcb0
(gdb) exit
And after I compiled PHP with the Debug flag, it wasn't able to find the PHP extensions, causing other unrelated errors. =[

Quote:
Also, what exactly are you doing in drupal to cause this error?
I am enabling CSS optimization. This feature basically concatenates the various CSS files the site uses so that all the CSS is together in one file. Drupal sites can easily end up with a number of CSS files in the low teens at the least, so this feature is pretty important for production sites.

Quote:
Also, these options might be useful in php.ini
Code:
report_zend_debug = 1
fastcgi.logging = 1
Where will fastcgi.logging log to? Something in /var/log?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox segfault in windowmaker and icewm davidgurvich FreeBSD General 4 25th August 2008 02:58 PM


All times are GMT. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick