#22052 [Fbk->Opn]: Ftp ftp_rawlist,ftp_nlist broken
| From: | ntrujillo at cox dot net | Date: | Tue, 04 Feb 2003 22:46:40 +0000 |
| Subject: | #22052 [Fbk->Opn]: Ftp ftp_rawlist,ftp_nlist broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32129@lists.php.net to get a copy of this message | ||
ID: 22052
User updated by: ntrujillo@cox.net
Reported By: ntrujillo@cox.net
-Status: Feedback
+Status: Open
Bug Type: Reproducible crash
Operating System: FreeBSD 5.0-RELEASE #0
PHP Version: 4.3.1-dev
New Comment:
got a php dump finally:
gdb
which php php.core.1
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 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-undermydesk-freebsd"...
Core was generated by `php'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.10...done.
Loaded symbols for /usr/local/lib/mysql/libmysqlclient.so.10
Reading symbols from /usr/local/lib/libming.so.3...done.
Loaded symbols for /usr/local/lib/libming.so.3
Reading symbols from /usr/lib/libm.so.2...done.
Loaded symbols for /usr/lib/libm.so.2
Reading symbols from /usr/local/lib/libgd.so.2...done.
Loaded symbols for /usr/local/lib/libgd.so.2
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /usr/local/lib/libpng.so.5...done.
Loaded symbols for /usr/local/lib/libpng.so.5
Reading symbols from /usr/lib/libz.so.2...done.
Loaded symbols for /usr/lib/libz.so.2
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Loaded symbols for /usr/local/lib/libjpeg.so.9
Reading symbols from /usr/lib/libcrypt.so.2...done.
Loaded symbols for /usr/lib/libcrypt.so.2
Reading symbols from /usr/lib/libc.so.5...done.
Loaded symbols for /usr/lib/libc.so.5
Reading symbols from /usr/libexec/ld-elf.so.1...done.
Loaded symbols for /usr/libexec/ld-elf.so.1
#0 _efree (ptr=0x0, __zend_filename=0x0, __zend_lineno=0,
__zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/ports/www/mod_php4/work/php-4.3.0/Zend/zend_alloc.c:215
215 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
(gdb) bt
#0 _efree (ptr=0x0, __zend_filename=0x0, __zend_lineno=0,
__zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/ports/www/mod_php4/work/php-4.3.0/Zend/zend_alloc.c:215
#1 0x0806c127 in ftp_chdir (ftp=0xffffffdc, dir=0x0) at
/usr/ports/www/mod_php4/work/php-4.3.0/ext/ftp/ftp.c:425
#2 0x080693e2 in zif_ftp_chdir (ht=0, return_value=0x8244724,
this_ptr=0x0, return_value_used=0)
at /usr/ports/www/mod_php4/work/php-4.3.0/ext/ftp/php_ftp.c:299
#3 0x0817a56b in execute (op_array=0x823f000) at
/usr/ports/www/mod_php4/work/php-4.3.0/Zend/zend_execute.c:1596
#4 0x0817a788 in execute (op_array=0x8237080) at
/usr/ports/www/mod_php4/work/php-4.3.0/Zend/zend_execute.c:1640
#5 0x0817a788 in execute (op_array=0x82201a4) at
/usr/ports/www/mod_php4/work/php-4.3.0/Zend/zend_execute.c:1640
#6 0x0816990c in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/ports/www/mod_php4/work/php-4.3.0/Zend/zend.c:864
#7 0x0813919b in php_execute_script (primary_file=0xbfbffb64) at
/usr/ports/www/mod_php4/work/php-4.3.0/main/main.c:1582
#8 0x08180183 in main (argc=2, argv=0xbfbffbc4) at
/usr/ports/www/mod_php4/work/php-4.3.0/sapi/cli/php_cli.c:753
#9 0x080647f5 in _start ()
(gdb) frame 3
#3 0x0817a56b in execute (op_array=0x823f000) at
/usr/ports/www/mod_php4/work/php-4.3.0/Zend/zend_execute.c:1596
1596
((zend_internal_function *) EX(function_state).function)->
handler(EX(opline)->extended_value,
EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr,
return_value_used TSRMLS_CC)
;
Previous Comments:
------------------------------------------------------------------------
[2003-02-04 14:31:07] iliaa@php.net
Cannot replicate the bug on Linux using the latest CVS, possibly a BSD
only issue. Can you reproduce the crash using PHP's CLI sapi?
The backtrace does not indicate the the crash is the result of PHP
code, but rather something in Apache code(?).
------------------------------------------------------------------------
[2003-02-04 14:20:57] ntrujillo@cox.net
Spider,
The Stable branch is still breaking somewhere along the ftp
ftp_*list functions in FreeBSD5. These errors don't appear with the
list command commented out. Please Take note that it is now
seg-faulting twice as opposed to once as well as killing 2 child
procs:
tail - /var/log/httpd-error.log
......
[Wed Feb 5 04:18:19 2003] [notice] child pid 13087 exit signal
Segmentation fault (11)
[Wed Feb 5 04:18:19 2003] [notice] child pid 13070 exit signal
Segmentation fault (11)
[Wed Feb 5 04:18:24 2003] [notice] child pid 13145 exit signal
Segmentation fault (11)
[Wed Feb 5 04:18:24 2003] [notice] child pid 13088 exit signal
Segmentation fault (11)
I dl'ed the recommended
tarchive:http://snaps.php.net/php4-STABLE-latest.tar.gz
gunzipped,untarred,retarred,bzipped,md5'ed, and recomplied from the
source.
Here are my results:
recompiled : PHP Version 4.3.1-dev
compile options:'./configure' '--with-apxs=/usr/local/sbin/apxs'
'--with-config-file-path=/usr/local/etc' '--enable-versioning'
'--with-regex=system' '--without-gd' '--without-mysql'
'--with-gd=/usr/local' '--enable-gd-native-ttf'
'--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local'
'--with-png-dir=/usr/local' '--with-zlib' '--with-mysql=/usr/local'
'--enable-ftp' '--enable-debug' '--with-ming=/usr/local'
'--enable-sockets' '--prefix=/usr/local' 'i386-portbld-freebsd5.0'
gdb dump:
bsd# gdb which httpd httpd.core.Wed\ Feb\ \ 5\ 04:07:45\ PST\ 2003
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 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-undermydesk-freebsd"...
(no debugging symbols found)...
Core was generated by `httpd'.
Program terminated with signal 5, Trace/breakpoint trap.
Reading symbols from /usr/lib/libcrypt.so.2...(no debugging symbols
found)...
done.
Loaded symbols for /usr/lib/libcrypt.so.2
Reading symbols from /usr/lib/libc.so.5...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libc.so.5
Reading symbols from /usr/local/libexec/apache/mod_mmap_static.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mmap_static.so
Reading symbols from /usr/local/libexec/apache/mod_vhost_alias.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_vhost_alias.so
Reading symbols from /usr/local/libexec/apache/mod_env.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_env.so
Reading symbols from /usr/local/libexec/apache/mod_log_config.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_log_config.so
Reading symbols from /usr/local/libexec/apache/mod_mime_magic.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mime_magic.so
Reading symbols from /usr/local/libexec/apache/mod_mime.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mime.so
Reading symbols from /usr/local/libexec/apache/mod_negotiation.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_negotiation.so
Reading symbols from /usr/local/libexec/apache/mod_status.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_status.so
Reading symbols from /usr/local/libexec/apache/mod_info.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_info.so
Reading symbols from /usr/local/libexec/apache/mod_include.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_include.so
Reading symbols from /usr/local/libexec/apache/mod_autoindex.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_autoindex.so
Reading symbols from /usr/local/libexec/apache/mod_dir.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_dir.so
Reading symbols from /usr/local/libexec/apache/mod_cgi.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_cgi.so
Reading symbols from /usr/local/libexec/apache/mod_asis.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_asis.so
Reading symbols from /usr/local/libexec/apache/mod_imap.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_imap.so
Reading symbols from /usr/local/libexec/apache/mod_actions.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_actions.so
Reading symbols from /usr/local/libexec/apache/mod_speling.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_speling.so
Reading symbols from /usr/local/libexec/apache/mod_userdir.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_userdir.so
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/local/libexec/apache/mod_alias.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_alias.so
Reading symbols from /usr/local/libexec/apache/mod_rewrite.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_rewrite.so
Reading symbols from /usr/local/libexec/apache/mod_access.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_access.so
Reading symbols from /usr/local/libexec/apache/mod_auth.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_auth.so
Reading symbols from /usr/local/libexec/apache/mod_auth_anon.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_auth_anon.so
Reading symbols from /usr/local/libexec/apache/mod_auth_db.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_auth_db.so
Reading symbols from /usr/local/libexec/apache/mod_digest.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_digest.so
Reading symbols from /usr/local/libexec/apache/libproxy.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/libproxy.so
Reading symbols from /usr/local/libexec/apache/mod_cern_meta.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_cern_meta.so
Reading symbols from /usr/local/libexec/apache/mod_expires.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_expires.so
Reading symbols from /usr/local/libexec/apache/mod_headers.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_headers.so
Reading symbols from /usr/local/libexec/apache/mod_usertrack.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_usertrack.so
Reading symbols from /usr/local/libexec/apache/mod_unique_id.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_unique_id.so
Reading symbols from /usr/local/libexec/apache/mod_setenvif.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_setenvif.so
Reading symbols from /usr/local/libexec/apache/libphp4.so...done.
Loaded symbols for /usr/local/libexec/apache/libphp4.so
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.10...done.
Loaded symbols for /usr/local/lib/mysql/libmysqlclient.so.10
Reading symbols from /usr/local/lib/libming.so.3...
done.
Loaded symbols for /usr/local/lib/libming.so.3
Reading symbols from /usr/lib/libm.so.2...done.
Loaded symbols for /usr/lib/libm.so.2
Reading symbols from /usr/local/lib/libgd.so.2...done.
Loaded symbols for /usr/local/lib/libgd.so.2
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /usr/local/lib/libpng.so.5...done.
Loaded symbols for /usr/local/lib/libpng.so.5
Reading symbols from /usr/lib/libz.so.2...done.
Loaded symbols for /usr/lib/libz.so.2
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Loaded symbols for /usr/local/lib/libjpeg.so.9
Reading symbols from /usr/libexec/ld-elf.so.1...done.
Loaded symbols for /usr/libexec/ld-elf.so.1
#0 0x28095801 in r_debug_state () from /usr/libexec/ld-elf.so.1
(gdb)
(gdb) bt
#0 0x28095801 in r_debug_state () from /usr/libexec/ld-elf.so.1
#1 0x0806c2c1 in ap_os_dso_unload ()
#2 0x0804ed8b in unload_module ()
#3 0x08050668 in run_cleanups ()
#4 0x0804f39c in ap_clear_pool ()
#5 0x0805e014 in standalone_main ()
#6 0x0805e907 in main ()
#7 0x0804ec45 in _start ()
------------------------------------------------------------------------
[2003-02-04 13:00:44] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-02-04 12:47:03] ntrujillo@cox.net
this module was compiled from a cvs'ed port to receive benefit of
asyncronous ftp support, however, the ftp_*list functions appear to be
very much broken.
A quick script summary:
<pre>
<?
$fFp = ftp_connect(anyhost);
$login = ftp_login($fFp,thisUser,'%thisPassword%');
$dir = ftp_pwd($fFp);
$theList = ftp_nlist($fFp,$dir);
print_r($theList);
?>
</pre>
A quasi-successful back trace:(no execs!!)
bsd# gdb which httpd /httpd.core
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 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-undermydesk-freebsd"...
(no debugging symbols found)...
Core was generated by `httpd'.
Program terminated with signal 5, Trace/breakpoint trap.
Reading symbols from /usr/lib/libcrypt.so.2...(no debugging symbols
found)...
done.
Loaded symbols for /usr/lib/libcrypt.so.2
Reading symbols from /usr/lib/libc.so.5...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libc.so.5
Reading symbols from /usr/local/libexec/apache/mod_mmap_static.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mmap_static.so
Reading symbols from /usr/local/libexec/apache/mod_vhost_alias.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_vhost_alias.so
Reading symbols from /usr/local/libexec/apache/mod_env.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_env.so
Reading symbols from /usr/local/libexec/apache/mod_log_config.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_log_config.so
Reading symbols from /usr/local/libexec/apache/mod_mime_magic.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mime_magic.so
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/local/libexec/apache/mod_mime.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mime.so
Reading symbols from /usr/local/libexec/apache/mod_negotiation.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_negotiation.so
Reading symbols from /usr/local/libexec/apache/mod_status.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_status.so
Reading symbols from /usr/local/libexec/apache/mod_info.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_info.so
Reading symbols from /usr/local/libexec/apache/mod_include.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_include.so
Reading symbols from /usr/local/libexec/apache/mod_autoindex.so...
(no debugging symbols found)...done.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22052&edit=1