Joomla migration from Red-Hat to Debian  = child pid xxxx exit signal Segmentation fault (11)

Posted on 2012-08-23
Medium Priority
Last Modified: 2012-08-29
Hello there, I am migrating a Joomla website from Red Hat Enterprise Linux Server release 5.5 (Tikanga) to Debian Squeeze.

I copied all the files, restored the database, changed in a couple of files the directory structure following the errors in the Apache log. Gave correct permissions as www-data to all files and directories.

Never got this copy of the website working and I get only

[Thu Aug 23 22:09:25 2012] [notice] Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze14 with Suhosin-Patch configured -- resuming normal operations
[Thu Aug 23 22:09:40 2012] [notice] child pid 3561 exit signal Segmentation fault (11)

I thought it was some module/plugin giving the problem so I just renamed the ./components directory, created an empty one.

Finally I had a Joomla page giving 404.

I enabled the component com_content copying it to the new components directory and the problem is there again.

What am I missing?

Thanks in advance.
Question by:maraboshi
  • 5
  • 3
LVL 35

Expert Comment

ID: 38328918
About 99% of the time, segfaults are due to problems in the infrastructure (PHP engine, Apache, engine, etc) rather than PHP code. Did you properly recompile or install Apache and PHP on the new server, or did you try to copy Apache and PHP from the old server?

Author Comment

ID: 38328956
Hey thanks for the answer.

What do you mean by "properly", on Debian you do apt-get update, apt-get install apache2 and so on (my infrastructure is installed by Puppet, many many servers, not a single problem).

What I copied is the /var/www/website part and restored the DB.

PHP is 5.3.10 in the source server and 5.3.3-7 in the target (Suhosin is also slightly newer in the source).

I've found I can access and browse in the /administrator section of Joomla, with no issues.

The site is full of custom plugins and components written by the owners, I tried disabling them all with no success, from the interface.
LVL 35

Expert Comment

ID: 38329016
If you used apt-get / Puppet, you should be fine. I just wanted to make sure you didn't try to simply tar up your old infrastructure, untar it on the new server, and try to run it as-is.

Have you tried PHP without Suhosin? If the segmentation fault is conditional, then you definitely want to see what the trigger is, especially if it is repeatable. Extensions are compiled and I could see suhosin causing a segfault if it tried to access/change/protect something in memory that it shouldn't have.
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.


Author Comment

ID: 38329259
I just tried, no luck...any other idea?
LVL 35

Expert Comment

ID: 38329331
Is there any pattern to the segfaults? Any particular page that you visit that causes it, or will it happen on the same page if you hit it enough times?

Author Comment

ID: 38329359
I just migrated the Joomla website (RedHat/cPanel nightmare to plain and nice Debian Squeeze), following the instructions and common sense. No page of the website works, other than the administrator.

I did a strace of Apache and the dump shows as follows, which suggests some password or permission when accessing mysql is not correct...too bad I cannot find any other mysql user in the webfiles. I'm still searching for this ghost user if it's the problem.

socket(PF_FILE, SOCK_STREAM, 0) = 15
13:22:46 fcntl(15, F_SETFL, O_RDONLY)   = 0
13:22:46 fcntl(15, F_GETFL)             = 0x2 (flags O_RDWR)
13:22:46 fcntl(15, F_GETFL)             = 0x2 (flags O_RDWR)
13:22:46 fcntl(15, F_SETFL, O_RDWR|O_NONBLOCK) = 0
13:22:46 connect(15, {sa_family=AF_FILE, path="/var/run/mysqld/mysqld.sock"}, 110) = 0
13:22:46 fcntl(15, F_SETFL, O_RDWR)     = 0
13:22:46 setsockopt(15, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
13:22:46 setsockopt(15, SOL_SOCKET, SO_SNDTIMEO, "\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
13:22:46 setsockopt(15, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
13:22:46 setsockopt(15, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
13:22:46 poll([{fd=15, events=POLLIN}], 1, 60000) = 1 ([{fd=15, revents=POLLIN}])
13:22:46 read(15, "?\0\0\0\n5.1.63-0+squeeze1\0\215\33\2\0T]Uul"..., 16384) = 67
13:22:46 write(15, "D\0\0\1\205\242\2\0\0\0\0@\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 72) = 72
13:22:46 read(15, "R\0\0\2\377\25\4#28000Access denied for u"..., 16384) = 86
13:22:46 shutdown(15, 2 /* send and receive */) = 0
13:22:46 close(15)                      = 0
13:22:46 socket(PF_FILE, SOCK_STREAM, 0) = 15
13:22:46 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
13:22:46 --- SIGSEGV (Segmentation fault) @ 0 (0) ---

Accepted Solution

maraboshi earned 0 total points
ID: 38329414
Found it, it was some other database not being defined.

Thanks a lot for the help though!!! :-)

Author Closing Comment

ID: 38344677
If there is an access denied for a non existent db/user, PHP or whatever should give an error somewhere, not segmentation fault...bad coding I guess.

This command saved my day:

 strace -t -f -ff -o /var/log/apahe2/strace/dump -p $(cat /var/run/apache2.pid)

reload apache2, wait for the error, get what child pid was giving the error from the Apache error.log and tail the dump with the same pid number to see what is the error.

Example: in error.log you have child pid 1498 exit signal Segmentation fault

then tail  /var/log/apahe2/strace/dump.1498 and you should read where the error is.

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question