473,786 Members | 2,866 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is a segmentation fault, and why is it killing PHP on my server?


We made some changes to our server yesterday, and ever since, every
single installation of WordPress that was on the server has stopped
running. Other PHP scripts still run fine, but WordPress is dead.

I logged into the server using ssh and looked the Apache error_log. The
only thing there was a whole bunch of lines like this:

[Fri Aug 18 18:00:25 2006] [notice] child pid 27827 exit signal
Segmentation fault (11)
I'm not finding any PHP errors that might tell me what is wrong with
WordPress.

Can anyone give me advice about what to do?

Aug 18 '06 #1
8 4931
On 18 Aug 2006 15:08:33 -0700, "lawrence k" <lk******@geoci ties.comwrote:

Re: the subject line:

http://www.google.co.uk/search?q=segmentation+fault

This first hit is informative.
>We made some changes to our server yesterday,
What changes did you make?
>and ever since, every
single installation of WordPress that was on the server has stopped
running. Other PHP scripts still run fine, but WordPress is dead.
OK, so you should reverse the changes you made.

And, this should serve as a lesson to make changes to a test server first,
assuming this is a server where the application is worth some amount of money
greater than zero.
>I logged into the server using ssh and looked the Apache error_log. The
only thing there was a whole bunch of lines like this:

[Fri Aug 18 18:00:25 2006] [notice] child pid 27827 exit signal
Segmentation fault (11)

I'm not finding any PHP errors that might tell me what is wrong with
WordPress.

Can anyone give me advice about what to do?
PHP should never suffer a segmentation fault; if it does, then there is
either:

(a) a bug in PHP
(b) a bug in a PHP extension
(c) a bug in a library loaded by PHP core
(d) a bug in a library loaded by a PHP extension
(e) something bizarrely wrong with your system as a whole

In any case:

http://bugs.php.net/how-to-report.php

And to make a bug report that is possible to act on, you need a backtrace to
identify what's causing the segfault:

http://bugs.php.net/bugs-generating-backtrace.php

Without this it's impossible to even guess what's wrong.

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Aug 18 '06 #2
*** lawrence k escribió/wrote (18 Aug 2006 15:08:33 -0700):
[Fri Aug 18 18:00:25 2006] [notice] child pid 27827 exit signal
Segmentation fault (11)

I'm not finding any PHP errors that might tell me what is wrong with
WordPress.
A segfault means that the PHP interpreter crashed. It's almost certainly a
bug or a damaged installation. WordPress code, no matter how good or bad,
cannot do it by its own.

You either forgot something when you did such changes to your server, or
the new version of whatever you installed is buggy or not compatible.
Hmmm... You aren't using Red Hat 9, are you?

--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Aug 18 '06 #3

lawrence k wrote:
We made some changes to our server yesterday, and ever since, every
single installation of WordPress that was on the server has stopped
running. Other PHP scripts still run fine, but WordPress is dead.

I logged into the server using ssh and looked the Apache error_log. The
only thing there was a whole bunch of lines like this:

[Fri Aug 18 18:00:25 2006] [notice] child pid 27827 exit signal
Segmentation fault (11)

Thanks for the feedback that I got. I'm sorry if I didn't include
enough information the first time. Here is more info:

We have a server that we lease from Rackspace, a linux box running Red
Hat Enterprise Linux 3. Yesterday we tried to get some e-commerce
software going and we realized our build of PHP didn't have mhash
installed. So we called Rackspace and asked them to rebuild our copy of
PHP, this time including mhash. Rackspace did so. And then all of our
WordPress blogs died.

If you go here, you'll see that our WordPress blog is dead:

http://www.monkeyclaus.org/

also on the same server:

http://www.bluewallllc.com/blog/

All you'll see is what I'm echoing to the screen.

It turns out WordPress is now dying on this line:

$this->col_info[$i] = mysql_fetch_fie ld($this->result);

That line is in wp-db.php (which is in the wp-includes folder).

Other sites on our server, including PHP/MySql sites, are having no
problem:

accumulist.com/

We're currently running version 4.3.2 of PHP.

The configure command for the new build of PHP was this:

'./configure' '--host=i686-redhat-linux-gnu'
'--build=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
'--enable-force-cgi-redirect' '--disable-debug' '--enable-pic'
'--disable-rpath' '--enable-inline-optimization' '--with-bz2'
'--with-db4=/usr' '--with-curl' '--with-dom=/usr'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf'
'--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv'
'--with-mhash=/usr/lib' '--with-jpeg-dir=/usr' '--with-openssl'
'--with-png' '--with-pspell' '--with-regex=system' '--with-xml'
'--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib'
'--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--enable-mbstring' '--enable-mbstr-enc-trans'
'--enable-mbregex' '--with-pear=/usr/share/pear' '--with-imap=shared'
'--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared'
'--with-unixODBC=shared ' '--enable-memory-limit' '--enable-bcmath'
'--enable-shmop' '--enable-versioning' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--enable-mcal'
'--with-apxs2filter=/usr/sbin/apxs'

Does anyone see anything missing? I assume that
'--with-mysql=shared,/usr' covers all the MySql stuff.

Any ideas?

Aug 19 '06 #4

Andy Hassall wrote:
On 18 Aug 2006 15:08:33 -0700, "lawrence k" <lk******@geoci ties.comwrote:
I logged into the server using ssh and looked the Apache error_log. The
only thing there was a whole bunch of lines like this:

[Fri Aug 18 18:00:25 2006] [notice] child pid 27827 exit signal
Segmentation fault (11)

I'm not finding any PHP errors that might tell me what is wrong with
WordPress.

Can anyone give me advice about what to do?

PHP should never suffer a segmentation fault; if it does, then there is
either:

(a) a bug in PHP
(b) a bug in a PHP extension
(c) a bug in a library loaded by PHP core
(d) a bug in a library loaded by a PHP extension
(e) something bizarrely wrong with your system as a whole

Could something have gone wrong in the build process? If so, what? I'm
going to call Rackspace and talk it over with them, but I'd like to do
some research first, so I sound intelligent. But my experience building
stuff on Linux is pretty basic.

Aug 19 '06 #5

Andy Hassall wrote:
On 18 Aug 2006 15:08:33 -0700, "lawrence k" <lk******@geoci ties.comwrote:

Re: the subject line:

http://www.google.co.uk/search?q=segmentation+fault

This first hit is informative.
We made some changes to our server yesterday,

What changes did you make?
and ever since, every
single installation of WordPress that was on the server has stopped
running. Other PHP scripts still run fine, but WordPress is dead.

OK, so you should reverse the changes you made.

And, this should serve as a lesson to make changes to a test server first,
assuming this is a server where the application is worth some amount of money
greater than zero.
I logged into the server using ssh and looked the Apache error_log. The
only thing there was a whole bunch of lines like this:

[Fri Aug 18 18:00:25 2006] [notice] child pid 27827 exit signal
Segmentation fault (11)

I'm not finding any PHP errors that might tell me what is wrong with
WordPress.

Can anyone give me advice about what to do?

PHP should never suffer a segmentation fault; if it does, then there is
either:

(a) a bug in PHP
(b) a bug in a PHP extension
(c) a bug in a library loaded by PHP core
(d) a bug in a library loaded by a PHP extension
(e) something bizarrely wrong with your system as a whole
(f) Seg faults can also occur if there is too much recursion, which can
be caused by user PHP code.

Aug 19 '06 #6
Richard Levasseur wrote:
Andy Hassall wrote:
>>On 18 Aug 2006 15:08:33 -0700, "lawrence k" <lk******@geoci ties.comwrote:

Re: the subject line:

http://www.google.co.uk/search?q=segmentation+fault

This first hit is informative.

>>>We made some changes to our server yesterday,

What changes did you make?

>>>and ever since, every
single installation of WordPress that was on the server has stopped
running. Other PHP scripts still run fine, but WordPress is dead.

OK, so you should reverse the changes you made.

And, this should serve as a lesson to make changes to a test server first,
assuming this is a server where the application is worth some amount of money
greater than zero.

>>>I logged into the server using ssh and looked the Apache error_log. The
only thing there was a whole bunch of lines like this:

[Fri Aug 18 18:00:25 2006] [notice] child pid 27827 exit signal
Segmentati on fault (11)

I'm not finding any PHP errors that might tell me what is wrong with
WordPress.

Can anyone give me advice about what to do?

PHP should never suffer a segmentation fault; if it does, then there is
either:

(a) a bug in PHP
(b) a bug in a PHP extension
(c) a bug in a library loaded by PHP core
(d) a bug in a library loaded by a PHP extension
(e) something bizarrely wrong with your system as a whole


(f) Seg faults can also occur if there is too much recursion, which can
be caused by user PHP code.
I've also had bad PHP code cause segfaults. It shouldn't happen, but
the interpreter isn't perfect.

Never had good PHP code cause a segfault, so that's good enough for me :-).

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Aug 19 '06 #7
"lawrence k" <lk******@geoci ties.compíse v diskusním príspevku
news:11******** **************@ 74g2000cwt.goog legroups.com...
>
lawrence k wrote:
[... ]
It turns out WordPress is now dying on this line:

$this->col_info[$i] = mysql_fetch_fie ld($this->result);
Try to test mysql command out of PHP, eg. using mysql command line client.
Is the result as you expect?
That line is in wp-db.php (which is in the wp-includes folder).
Try to put this line into main php code without using include.

--

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
Aug 19 '06 #8
On 19 Aug 2006 04:36:42 -0700, "Richard Levasseur" <ri********@gma il.com>
wrote:
> (a) a bug in PHP
(b) a bug in a PHP extension
(c) a bug in a library loaded by PHP core
(d) a bug in a library loaded by a PHP extension
(e) something bizarrely wrong with your system as a whole

(f) Seg faults can also occur if there is too much recursion, which can
be caused by user PHP code.
That's arguably a case of (a); the out of memory / stack overflow condition
should be caught and gracefully raised as a fatal error message, not as
segfaulting the process.

Although looking at bugs.php.net there's various reports of this, with the PHP
maintainers marking them as "Won't Fix" or "Bogus".

And: http://news.php.net/article.php?grou...s&article=8851

Admittedly, if you've already filled the stack, then calling an error handling
function may be a challenge ;-)

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Aug 19 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2962
by: Justin Tang | last post by:
Hi I am wondering about the segmentation fault in PHP. Namely, I'm running PHP version 4.6.9 on my server right now and when I try to process a large piece of text via textarea(3k+), the resulting POST data I get seems to be result from a segementation fault error. The data I receive becomes truncated followed by the variable name, equal sign, then the entire span of the data. Code:
6
8428
by: jerrygarciuh | last post by:
Hello, I have a script running in the wee hours via cron job. When I access the script via browser it works like a charm. I noticed it was not succeeding and ran it manually from the command line and it threw a Segmentation Fault. Googling produces a ton of information on this subject but al of specific to certain binaries and it doesn't seem germaine to solving my problem. Any one have any advice? Whole script is below.
3
2125
by: I_have_nothing | last post by:
Hi! I am new in C. I got a lots of "Segmentation Fault"s in my code. I guess One possibility is: if " int array_i; " is declard and the code trys to access "array_i", a Segmentation Fault will be returned by gcc compiler on linux. What are the other "major" reasons to have "Segmentation Fault"? I hope this is not a stupid question and someone is will to give me some exampls(part of code) with errors a newer might esasily make and
3
11445
by: Zheng Da | last post by:
Program received signal SIGSEGV, Segmentation fault. 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 #1 0x40094c54 in malloc () from /lib/tls/libc.so.6 It's really strange; I just call malloc() like "tmp=malloc(size);" the system gives me Segmentation fault I want to write a code to do like a dynamic array, and the code is as
6
4780
by: I_have_nothing | last post by:
Hi! I am new in C. I try to use dynamical allocation fuction malloc( ) and realloc( ). I found something strange. After several calling realloc( ), the malloc( ) will give me a Segmentation fault. If I just call realloc( ) once before calling malloc( ), it is OK. Why? I am trying to read some double-typed items from infile and save them
5
2998
by: Fra-it | last post by:
Hi everybody, I'm trying to make the following code running properly, but I can't get rid of the "SEGMENTATION FAULT" error message when executing. Reading some messages posted earlier, I understood that a segmentation fault can occur whenever I declare a pointer and I leave it un-initialized. So I thought the problem here is with the (const char *)s in the stuct flightData (please note that I get the same fault declaring as char * the...
27
3372
by: Paminu | last post by:
I have a wierd problem. In my main function I print "test" as the first thing. But if I run the call to node_alloc AFTER the printf call I get a segmentation fault and test is not printed! #include <stdlib.h> #include <stdio.h> typedef struct _node_t {
7
5881
by: pycraze | last post by:
I would like to ask a question. How do one handle the exception due to Segmentation fault due to Python ? Our bit operations and arithmetic manipulations are written in C and to some of our testcases we experiance Segmentation fault from the python libraries. If i know how to handle the exception for Segmentation fault , it will help me complete the run on any testcase , even if i experiance Seg Fault due to any one or many functions in...
3
5187
by: madunix | last post by:
My Server is suffering bad lag (High Utlization) I am running on that server Oracle10g with apache_1.3.35/ php-4.4.2 Web visitors retrieve data from the web by php calls through oci cobnnection from 10g release2 PHP is configured with the following parameters './configure' '--prefix=/opt/oracle/php' '--with-apxs=/opt/oracle/apache/bin/apxs' '--with-config-file-path=/opt/oracle/apache/conf' '--enable-safe-mode' '--enable-session'...
0
9650
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.