Re: [PHP-DEV] Help with segfault

2001-09-18 Thread derick

Hello,

can you make a backtrace of it (with gdb)?

Derick

On Tue, 18 Sep 2001, Richard Heyes wrote:

 Hi, I'm getting some strange segfaults from a script I'm running. Isn't
 consistent unfortunately, but I have managed to get this strace output
 from the apache child serving the request. Does it mean anything to
 anyone? Look like it's going through all the include() calls in the php
 script, last one being page.cache.prepend.inc, and then barfing. :(

 TIA

 [root@delllive php-4.0.6]# strace -p 28188
 fcntl(26, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
 select(19, [17 18], NULL, NULL, NULL)   = 1 (in [18])
 accept(18, {sin_family=AF_INET, sin_port=htons(63416),
 sin_addr=inet_addr(*.*.*.*)}}, [16]) = 3
 fcntl(26, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
 rt_sigaction(SIGUSR1, {SIG_IGN}, {0x805a4f0, [],
 SA_INTERRUPT|0x400}, 8) = 0
 getsockname(3, {sin_family=AF_INET, sin_port=htons(80),
 sin_addr=inet_addr(192.168.10.5)}}, [16]) = 0
 setsockopt(3, IPPROTO_TCP1, [1], 4) = 0
 read(3, GET / HTTP/1.1\r\nAccept: image/gi..., 4096) = 505
 rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0
 time(NULL)  = 1000809165
 gettimeofday({1000809165, 730544}, NULL) = 0
 stat(/www/vhtdocs/adtrader3/htdocs, {st_mode=S_IFDIR|0775,
 st_size=4096, ...}) = 0
 open(/.htaccess, O_RDONLY)= -1 ENOENT (No such file or
 directory)
 open(/www/.htaccess, O_RDONLY)= -1 ENOENT (No such file or
 directory)
 open(/www/vhtdocs/.htaccess, O_RDONLY) = -1 ENOENT (No such file or
 directory)
 open(/www/vhtdocs/adtrader3/.htaccess, O_RDONLY) = -1 ENOENT (No such
 file or directory)
 open(/www/vhtdocs/adtrader3/htdocs/.htaccess, O_RDONLY) = -1 ENOENT
 (No such file or directory)
 stat(/www/vhtdocs/adtrader3/htdocs/index.html, 0xb868) = -1 ENOENT
 (No such file or directory)
 stat(/www/vhtdocs/adtrader3/htdocs, {st_mode=S_IFDIR|0775,
 st_size=4096, ...}) = 0
 stat(/www/vhtdocs/adtrader3/htdocs/index.php, {st_mode=S_IFREG|0775,
 st_size=6248, ...}) = 0
 stat(/www/vhtdocs/adtrader3/htdocs/index.php, {st_mode=S_IFREG|0775,
 st_size=6248, ...}) = 0
 umask(077)  = 022
 umask(022)  = 077
 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
 rt_sigaction(SIGPROF, {0x4022effc, [], SA_RESTART|0x400}, {SIG_DFL},
 8) = 0
 rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
 brk(0x8138000)  = 0x8138000
 brk(0x8139000)  = 0x8139000
 time(NULL)  = 1000809165
 getpid()= 28188
 getpid()= 28188
 getcwd(/, 4095)   = 2
 chdir(/www/vhtdocs/adtrader3/htdocs)  = 0
 open(/www/vhtdocs/adtrader3/htdocs/index.php, O_RDONLY) = 4
 getcwd(/mnt/disk1/www/vhtdocs/adtrader3/htdocs, 4095) = 40
 lstat(/www, {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0
 readlink(/www, /raid/www, 4095) = 9
 lstat(/raid, {st_mode=S_IFLNK|0777, st_size=11, ...}) = 0
 readlink(/raid, /mnt/disk1/, 4095)  = 11
 lstat(/mnt, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 lstat(/mnt/disk1, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 lstat(/mnt/disk1/www, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
 lstat(/mnt/disk1/www/vhtdocs, {st_mode=S_IFDIR|0775, st_size=4096,
 ...}) = 0
 lstat(/mnt/disk1/www/vhtdocs/adtrader3, {st_mode=S_IFDIR|S_ISGID|0775,
 st_size=4096, ...}) = 0
 lstat(/mnt/disk1/www/vhtdocs/adtrader3/htdocs, {st_mode=S_IFDIR|0775,
 st_size=4096, ...}) = 0
 lstat(/mnt/disk1/www/vhtdocs/adtrader3/htdocs/index.php,
 {st_mode=S_IFREG|0775, st_size=6248, ...}) = 0
 brk(0x813e000)  = 0x813e000
 ioctl(4, TCGETS, 0xbfffe6fc)= -1 ENOTTY (Inappropriate ioctl
 for device)
 read(4, ?php\n/*..., 8192) = 6248
 read(4, , 1944)   = 0
 brk(0x813f000)  = 0x813f000
 brk(0x8143000)  = 0x8143000
 brk(0x8153000)  = 0x8153000
 read(4, , 8192)   = 0
 ioctl(4, TCGETS, 0xbfffd70c)= -1 ENOTTY (Inappropriate ioctl
 for device)
 close(4)= 0
 open(./siteconf.inc, O_RDONLY)= -1 ENOENT (No such file or
 directory)
 open(/www/vhtdocs/adtrader3/includes//siteconf.inc, O_RDONLY) = 4
 getcwd(/mnt/disk1/www/vhtdocs/adtrader3/htdocs, 4095) = 40
 lstat(/www, {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0
 readlink(/www, /raid/www, 4095) = 9
 lstat(/raid, {st_mode=S_IFLNK|0777, st_size=11, ...}) = 0
 readlink(/raid, /mnt/disk1/, 4095)  = 11
 lstat(/mnt, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 lstat(/mnt/disk1, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 lstat(/mnt/disk1/www, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
 lstat(/mnt/disk1/www/vhtdocs, {st_mode=S_IFDIR|0775, st_size=4096,
 ...}) = 0
 lstat(/mnt/disk1/www/vhtdocs/adtrader3, 

RE: [PHP-DEV] Help with segfault

2001-09-18 Thread Richard Heyes

 Please follow this:
 www.php.net/bugs-generating-backtrace.php

Ok, hows this:

[root@delllive /root]# gdb /usr/sbin/httpd 
GNU gdb 19991004
Copyright 1998 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...(no debugging symbols
found)...
(gdb) run -X
Starting program: /usr/sbin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x402f5c36 in php_fopen_url_wrap_http (path=0x819eafc , mode=0x0,
options=135600764, issock=0x8183404, socketd=0xb820, 
opened_path=0x4035b198) at http_fopen_wrapper.c:143
143 strcat(scratch, resource-pass);
(gdb) bt
#0  0x402f5c36 in php_fopen_url_wrap_http (path=0x819eafc , mode=0x0,
options=135600764, issock=0x8183404, socketd=0xb820, 
opened_path=0x4035b198) at http_fopen_wrapper.c:143
#1  0x4035b198 in yy_state_buf () at ripemd.c:401
#2  0x402962e8 in php_if_fd_clear (ht=135916284, return_value=0x0,
this_ptr=0xb824, return_value_used=-1073743840)
at sockets.c:340
#3  0x402f302e in php_if_levenshtein (ht=135916284, return_value=0x0,
this_ptr=0x4035b198, return_value_used=0)
at levenshtein.c:112
#4  0x402f3130 in php_if_levenshtein (ht=135916284, return_value=0x0,
this_ptr=0x4035b198, return_value_used=23)
at levenshtein.c:113
#5  0x402f2b7f in reference_levdist (s1=0x1 Address 0x1 out of bounds,
l1=0, s2=0x4035b198 xæ\026, l2=33552612, 
cost_ins=-1073743644, cost_rep=1076157160, cost_del=1) at
levenshtein.c:52
#6  0x402f2c8c in reference_levdist (s1=0x1 Address 0x1 out of bounds,
l1=1077260696, s2=0x40370220 45\023\b$\001\022\b, 
l2=135478660, cost_ins=-1073743636, cost_rep=1076159160,
cost_del=135392092) at levenshtein.c:65
#7  0x4024dae8 in php_if_apache_lookup_uri (ht=135476532,
return_value=0x0, this_ptr=0x4035b198, return_value_used=23)
at php_apache.c:377
#8  0x4024e747 in php_error_cb (type=135476532, error_filename=0x0,
error_lineno=135477900, format=0x8112214 ß\2303@hç$@\027, 
args=0xb94c) at main.c:391
#9  0x4024e785 in php_error_cb (type=135476532, error_filename=0x0,
error_lineno=135476532, format=0x813355c D\001\022\bé\003, 
args=0x1f4) at main.c:403
#10 0x805345e in ap_invoke_handler () at ripemd.c:401
#11 0x80618fb in ap_some_auth_required () at ripemd.c:401
#12 0x8061bd6 in ap_internal_redirect () at ripemd.c:401
#13 0x401c6db5 in ?? () at ripemd.c:401 from
/etc/httpd/modules/mod_dir.so
#14 0x805345e in ap_invoke_handler () at ripemd.c:401
#15 0x80618fb in ap_some_auth_required () at ripemd.c:401
#16 0x8061958 in ap_process_request () at ripemd.c:401
#17 0x805b940 in ap_child_terminate () at ripemd.c:401
#18 0x805baa7 in ap_child_terminate () at ripemd.c:401
#19 0x805bba8 in ap_child_terminate () at ripemd.c:401
#20 0x805c058 in ap_child_terminate () at ripemd.c:401
#21 0x805c65f in main () at ripemd.c:401
#22 0x400bc9cb in __libc_start_main (main=0x805c3e0 main, argc=2,
argv=0xbb24, init=0x804f014 _init, 
fini=0x807b99c _fini, rtld_fini=0x4000ae60 _dl_fini,
stack_end=0xbb1c) at ../sysdeps/generic/libc-start.c:92
(gdb) 

-- 
Richard Heyes

--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]