SIGSEGV (Segmentation fault)

gate2vn

Verified User
Joined
Nov 9, 2004
Messages
500
Location
Oslo
I have tried to rebuild php from this http://help.directadmin.com/item.php?id=26 but when running php from CLI, the file seems do nothing. So this is the strace result

.......
read(9, 0x9bf1770, 8192) = -1 EAGAIN (Resource temporarily unavailable)
fcntl64(9, F_SETFL, O_RDWR) = 0
write(9, "\17\0\0\0\2chipmunk_ctest", 19) = 19
read(9, "\3\0\0\1", 4) = 4
read(9, "\0\0\0", 3) = 3
read(8, "", 8192) = 0
mremap(0xb7277000, 495616, 8192, MREMAP_MAYMOVE) = 0xb7277000
close(8) = 0
munmap(0xb72f0000, 4096) = 0
munmap(0xb7277000, 8192) = 0
time(NULL) = 1123902402
fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
read(9, 0x9bf1770, 8192) = -1 EAGAIN (Resource temporarily unavailable)
fcntl64(9, F_SETFL, O_RDWR) = 0
write(9, "1\0\0\0\3Delete from tablename wh"..., 53) = 53
read(9, "\3\0\0\1", 4) = 4
read(9, "\0\0\0", 3) = 3
read(4, "", 8192) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++


Is there any idea about this Segmentation fault error?

thanks
 
This error is just happening in DA box. I have tried in another box, and see the same error. On cPanel box it's working fine

Is there any idea?
 
Can you please post (as attachment) the entire log file ?
It tries to read from #9, but it can't for some reason, this might have got something to do with it.

edit:
wait a day or so before you bump, I like a lot of people just hit 'show all new posts since last visit' once every few days...
 
I am not trying to bump. Just update the thread with more information :)

anyway, this is the full strace result
 

Attachments

Hello,

Have you tried it without -a? Just curious.

Also, try:
Code:
[root@server]# gdb /usr/local/bin/php
run /path/to/cron2.php
[i]... it runs.. should generates segfault...[/i]
bt full
Looking for any errors there.

John
 
Hi

Without -a, it just shows nothing.
[root@server cron]# run cron2.php
[root@server cron]#

anyway, with gdb

[root@server cron]# gdb /usr/local/bin/php
GNU gdb Red Hat Linux (6.3.0.0-0.30.1rh)
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-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run cron2.php
Starting program: /usr/local/bin/php cron2.php

Program exited normally.
(gdb)

It doesnt show any error :confused:
 
Hello,
Without -a, it just shows nothing.
[root@server cron]# run cron2.php
[root@server cron]#
I meant through php ;)
Code:
/usr/local/bin/php ./cron2.php
So is it working when no segfault is being produced? (like when run through gdb.)

John
 
DirectAdmin Support said:
Hello,

I meant through php ;)
Code:
/usr/local/bin/php ./cron2.php
So is it working when no segfault is being produced? (like when run through gdb.)

John

Ah, sorry, I just copy your code :) Yes, I tried php cron2.php without anything showed.

When running in gdb, there is no segfault, but the delete command was not processed. That cron file used to delete empty records after 1 day in my database. Also, why running with -a, it shows segfault?

thanks
 
Hello,

If you are getting segfaults on the mysql commands.. check the rpm versions you have installed:
Code:
[root@server]# rpm -qa | grep MySQL
MySQL-client-4.0.23-0
MySQL-server-4.0.23-0
MySQL-shared-4.0.23-0
MySQL-devel-4.0.23-0
[root@server]#
Just make sure that everything is matching. Also, if you don't have the shared rpm, then you might install it, but make *sure* it's the same version as the others. If you make any changes to the MySQL versions, be sure to recompile php, and with a "./build clean" first.

John
 
Back
Top