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

Posted on 2012-08-23
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
    LVL 34

    Expert Comment

    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

    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 34

    Expert Comment

    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.

    Author Comment

    I just tried, no luck...any other idea?
    LVL 34

    Expert Comment

    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

    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

    Found it, it was some other database not being defined.

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

    Author Closing Comment

    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/

    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

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now