Professional Web Applications Themes

#25294 [Fbk->Opn]: ftp_nlist fails on nai site with coredump - PHP Development

ID: 25294 User updated by: steveh at brendata dot co dot uk Reported By: steveh at brendata dot co dot uk -Status: Feedback +Status: Open Bug Type: FTP related Operating System: Linux 2.4.21 PHP Version: 4.3.3 New Comment: Ok, it failed as before, here's the output: (gdb) run test.php Starting program: /usr/src/php-4.3.3/sapi/cli/php test.php resource(4) of type (FTP Buffer) resource(4) of type (FTP Buffer) bool(false) resource(4) of type (FTP Buffer) [Fri Aug 29 09:04:06 2003] Script: 'test.php' --------------------------------------- /usr/src/php-4.3.3/ext/ftp/ftp.c(1443) : Block 0x081EF888 status: Beginning: Overrun (magic=0x401E0470, expected=0x7312F8DC) End: Unknown --------------------------------------- Program exited normally. (gdb) Previous Comments: ------------------------------------------------------------------------ [2003-08-28 19:48:11] [email]sniperphp.net[/email] Try ...

  1. #1

    Default #25294 [Fbk->Opn]: ftp_nlist fails on nai site with coredump

    ID: 25294
    User updated by: steveh at brendata dot co dot uk
    Reported By: steveh at brendata dot co dot uk
    -Status: Feedback
    +Status: Open
    Bug Type: FTP related
    Operating System: Linux 2.4.21
    PHP Version: 4.3.3
    New Comment:

    Ok, it failed as before, here's the output:

    (gdb) run test.php
    Starting program: /usr/src/php-4.3.3/sapi/cli/php test.php
    resource(4) of type (FTP Buffer)
    resource(4) of type (FTP Buffer)
    bool(false)
    resource(4) of type (FTP Buffer)
    [Fri Aug 29 09:04:06 2003] Script: 'test.php'
    ---------------------------------------
    /usr/src/php-4.3.3/ext/ftp/ftp.c(1443) : Block 0x081EF888 status:
    Beginning: Overrun (magic=0x401E0470, expected=0x7312F8DC)
    End: Unknown
    ---------------------------------------

    Program exited normally.
    (gdb)


    Previous Comments:
    ------------------------------------------------------------------------

    [2003-08-28 19:48:11] [email]sniperphp.net[/email]

    Try the following:

    # rm config.cache
    # ./configure --disable-all --disable-cgi --enable-ftp --enable-debug
    # make clean && make

    And then run the script:

    # gdb sapi/cli/php
    (gdb) run ftptest.php
    ..
    ..



    ------------------------------------------------------------------------

    [2003-08-28 11:19:11] steveh at brendata dot co dot uk

    Just realised, one thing I haven't mentioned (!) is that I'm running
    this as a command line script (php test.php).

    Here's the backtrace (looks like it's when it's trying to deallocate
    stuff)

    (gdb) bt
    #0 0x403a9490 in chunk_free (ar_ptr=0x4045d300, p=0x830ba58) at
    malloc.c:3231
    #1 0x403a93f4 in __libc_free (mem=0x830baa8) at malloc.c:3154
    #2 0x08175fb4 in shutdown_memory_manager (silent=0, clean_cache=0) at
    /usr/src/php-4.3.3/Zend/zend_alloc.c:492
    #3 0x0815be20 in php_request_shutdown (dummy=0x0) at
    /usr/src/php-4.3.3/main/main.c:1005
    #4 0x081a6c61 in main (argc=2, argv=0xbffffbe4) at
    /usr/src/php-4.3.3/sapi/cli/php_cli.c:869
    #5 0x40344657 in __libc_start_main (main=0x81a61fc <main>, argc=2,
    ubp_av=0xbffffbe4, init=0x8072174 <_init>,
    fini=0x81ac480 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>,
    stack_end=0xbffffbdc) at ../sysdeps/generic/libc-start.c:129

    ------------------------------------------------------------------------

    [2003-08-28 11:15:57] steveh at brendata dot co dot uk

    Looks like it's dying after the dump:
    [rootLinux3 /root]# php test.php
    resource(4) of type (FTP Buffer)
    resource(4) of type (FTP Buffer)
    bool(false)
    resource(4) of type (FTP Buffer)
    Segmentation fault (core dumped)
    [rootLinux3 /root]# cat test.php
    <?php
    $fp = ftp_connect("ftp.nai.com");
    var_dump($fp);
    ftp_login($fp, "anonymous","ntrujillocox.net");
    var_dump($fp);
    var_dump(ftp_nlist($fp,"/"));
    var_dump($fp);
    ?>

    Here's the ./configure:

    ../configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr
    --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=
    /usr/share --includedir=/usr/include --libdir=/usr/lib
    --libexecdir=/usr/libexec --localstatedir=/var
    --sharedstatedir=/usr/com --ma
    ndir=/usr/share/man --infodir=/usr/share/info --prefix=/usr
    --with-config-file-path=/etc --enable-force-cgi-redirect
    --enable-debug-
    -enable-pic --disable-rpath --enable-inline-optimization --with-bz2
    --with-db3 --with-exec-dir=/usr/bin --with-png-dir=/usr --with-g
    d --enable-gd-native-ttf --with-ttf --with-gdbm --with-gettext
    --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-op
    enssl --with-png --with-pspell --with-regex=system --with-ftp
    --with-zlib --with-layout=GNU --enable-bcmath --enable-debugger --enab
    le-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem
    --enable-sysvshm --enable-discard-path --enable-track-vars --en
    able-trans-sid --enable-yp --enable-wddx --without-oci8
    --with-imap=shared --with-imap-ssl --with-kerberos=/usr/kerberos
    --with-ldap
    =shared --with-mysql=shared,/usr --with-xml --with-pgsql=shared
    --with-snmp=shared,/usr --with-snmp=shared --enable-ucd-snmp-hack
    --with-unixODBC=shared --enable-memory-limit --enable-bcmath
    --enable-shmop --enable-versioning --enablecalendar --enable-dbx
    --enable-dio --enable-mbstring --enable-mbstr-enc-trans
    --withapxs=/usr/sbin/apxs --with-sybasect=shared,/usr/local/freetds
    --enable-ftp

    ------------------------------------------------------------------------

    [2003-08-28 11:02:49] [email]sniperphp.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a backtrace to see what is happening behind the scenes. To
    find out how to generate a backtrace, please read
    [url]http://bugs.php.net/bugs-generating-backtrace.php[/url]

    Once you have generated a backtrace, please submit it to this bug
    report and change the status back to "Open". Thank you for helping
    us make PHP better.



    ------------------------------------------------------------------------

    [2003-08-28 09:55:26] [email]pollitaphp.net[/email]

    I can't reproduce a crash with the code snippet provided using 4.3.3 on
    a 2.4.21 kernel.

    Please provide the ./configure line used to compile PHP and note on
    which line (I'm assuming the nlist line itself) the crash occurs.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/25294[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=25294&edit=1[/url]
    steveh at brendata dot co dot uk Guest

  2. #2

    Default #25294 [Fbk->Opn]: ftp_nlist fails on nai site with coredump

    ID: 25294
    User updated by: steveh at brendata dot co dot uk
    Reported By: steveh at brendata dot co dot uk
    -Status: Feedback
    +Status: Open
    Bug Type: FTP related
    Operating System: Linux 2.4.21
    PHP Version: 4.3.3
    New Comment:

    Downloading the snapshot now.


    Previous Comments:
    ------------------------------------------------------------------------

    [2003-09-06 09:16:51] [email]sniperphp.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php4-STABLE-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php4-win32-STABLE-latest.zip[/url]



    ------------------------------------------------------------------------

    [2003-09-03 08:21:52] steveh at brendata dot co dot uk

    Just tested with the latest snapshot and exactly the same as before?

    ------------------------------------------------------------------------

    [2003-08-31 16:09:31] [email]iliaaphp.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php4-STABLE-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php4-win32-STABLE-latest.zip[/url]



    ------------------------------------------------------------------------

    [2003-08-29 03:16:48] steveh at brendata dot co dot uk

    Ok, it failed as before, here's the output:

    (gdb) run test.php
    Starting program: /usr/src/php-4.3.3/sapi/cli/php test.php
    resource(4) of type (FTP Buffer)
    resource(4) of type (FTP Buffer)
    bool(false)
    resource(4) of type (FTP Buffer)
    [Fri Aug 29 09:04:06 2003] Script: 'test.php'
    ---------------------------------------
    /usr/src/php-4.3.3/ext/ftp/ftp.c(1443) : Block 0x081EF888 status:
    Beginning: Overrun (magic=0x401E0470, expected=0x7312F8DC)
    End: Unknown
    ---------------------------------------

    Program exited normally.
    (gdb)

    ------------------------------------------------------------------------

    [2003-08-28 19:48:11] [email]sniperphp.net[/email]

    Try the following:

    # rm config.cache
    # ./configure --disable-all --disable-cgi --enable-ftp --enable-debug
    # make clean && make

    And then run the script:

    # gdb sapi/cli/php
    (gdb) run ftptest.php
    ..
    ..



    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/25294[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=25294&edit=1[/url]
    steveh at brendata dot co dot uk Guest

Similar Threads

  1. #25294 [Csd]: ftp_nlist fails on nai site with coredump
    By steveh at brendata dot co dot uk in forum PHP Development
    Replies: 0
    Last Post: September 10th, 11:14 AM
  2. #25294 [Fbk->Csd]: ftp_nlist fails on nai site with coredump
    By pollita@php.net in forum PHP Development
    Replies: 0
    Last Post: September 9th, 09:22 PM
  3. #25294 [Fbk]: ftp_nlist fails on nai site with coredump
    By pollita@php.net in forum PHP Development
    Replies: 0
    Last Post: September 9th, 08:46 PM
  4. #25294 [Opn->Fbk]: ftp_nlist fails on nai site with coredump
    By pollita@php.net in forum PHP Development
    Replies: 3
    Last Post: September 9th, 12:32 AM
  5. #25294 [Opn]: ftp_nlist fails on nai site with coredump
    By steveh at brendata dot co dot uk in forum PHP Development
    Replies: 0
    Last Post: August 28th, 04:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139