#40708 [NEW]: Crashes when using PostgreSQL module

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #40708 [NEW]: Crashes when using PostgreSQL module

    From: max at to-the-max dot net
    Operating system: FreeBSD 6.2-STABLE - AMD64
    PHP version: 5.2.1
    PHP Bug Type: PostgreSQL related
    Bug description: Crashes when using PostgreSQL module

    Description:
    ------------
    Every couple hundred of requests PHP crashes while accessing a PostgreSQL
    database.

    Backtrace always points to ext/pgsql/pgsql.c __zend_lineno=375


    Reproduce code:
    ---------------
    Different scripts. All have in common that they use the PostgreSQL module.

    Actual result:
    --------------
    ===
    Backtrace 1
    ===

    www3# gdb /usr/local/bin/php php.core.500
    GNU gdb 6.1.1 [FreeBSD]
    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 "amd64-marcel-freebsd"...
    Core was generated by `php'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/libcrypt.so.3...done.
    Loaded symbols for /lib/libcrypt.so.3
    Reading symbols from /usr/local/pgsql/lib/libpq.so.5...done.
    Loaded symbols for /usr/local/pgsql/lib/libpq.so.5
    Reading symbols from /usr/local/lib/libiconv.so.3...done.
    Loaded symbols for /usr/local/lib/libiconv.so.3
    Reading symbols from /lib/libz.so.3...done.
    Loaded symbols for /lib/libz.so.3
    Reading symbols from /lib/libm.so.4...done.
    Loaded symbols for /lib/libm.so.4
    Reading symbols from /lib/libc.so.6...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x7fff00000031, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    1012 if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev) {
    (gdb) bt
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x7fff00000031, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    #1 0x000000000067c6e1 in _zend_mm_free_int (heap=0x95c000,
    p=0x7fff00000031,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1520
    #2 0x000000000067d90d in _efree (ptr=0x7fff00000031,
    __zend_filename=0x78d218 "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c",

    __zend_lineno=375, __zend_orig_filename=0x0, __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1877
    #3 0x000000000050f30f in _php_pgsql_notice_ptr_dtor (ptr=0xac0098) at
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:375
    #4 0x00000000006a9872 in zend_hash_clean (ht=0x9539a8) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:552
    #5 0x000000000050fbfc in zm_deactivate_pgsql (type=1, module_number=10)
    at /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:574
    #6 0x00000000006a44d6 in module_registry_cleanup (module=0x9f5e00) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_API.c:1945
    #7 0x00000000006a9cf2 in zend_hash_apply (ht=0x957d40,
    apply_func=0x6a44a0 <module_registry_cleanup>)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:673
    #8 0x000000000069c205 in zend_deactivate_modules () at
    /usr/home/max/tmp/php-5.2.1/Zend/zend.c:839
    #9 0x00000000006458e1 in php_request_shutdown (dummy=0x0) at
    /usr/home/max/tmp/php-5.2.1/main/main.c:1293
    #10 0x0000000000718b06 in main (argc=1, argv=0x7fffffffedc8) at
    /usr/home/max/tmp/php-5.2.1/sapi/cgi/cgi_main.c:1796







    ===
    Backtrace 2
    ===


    www3# gdb /usr/local/bin/php php.core.501
    GNU gdb 6.1.1 [FreeBSD]
    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 "amd64-marcel-freebsd"...
    Core was generated by `php'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/libcrypt.so.3...done.
    Loaded symbols for /lib/libcrypt.so.3
    Reading symbols from /usr/local/pgsql/lib/libpq.so.5...done.
    Loaded symbols for /usr/local/pgsql/lib/libpq.so.5
    Reading symbols from /usr/local/lib/libiconv.so.3...done.
    Loaded symbols for /usr/local/lib/libiconv.so.3
    Reading symbols from /lib/libz.so.3...done.
    Loaded symbols for /lib/libz.so.3
    Reading symbols from /lib/libm.so.4...done.
    Loaded symbols for /lib/libm.so.4
    Reading symbols from /lib/libc.so.6...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x3d0000004e, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    1012 if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev) {
    (gdb) bt
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x3d0000004e, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    #1 0x000000000067c6e1 in _zend_mm_free_int (heap=0x95c000,
    p=0x3d0000004e,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1520
    #2 0x000000000067d90d in _efree (ptr=0x3d0000004e,
    __zend_filename=0x78d218 "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c",

    __zend_lineno=375, __zend_orig_filename=0x0, __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1877
    #3 0x000000000050f30f in _php_pgsql_notice_ptr_dtor (ptr=0xabac18) at
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:375
    #4 0x00000000006a9872 in zend_hash_clean (ht=0x9539a8) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:552
    #5 0x000000000050fbfc in zm_deactivate_pgsql (type=1, module_number=10)
    at /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:574
    #6 0x00000000006a44d6 in module_registry_cleanup (module=0x9f5e00) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_API.c:1945
    #7 0x00000000006a9cf2 in zend_hash_apply (ht=0x957d40,
    apply_func=0x6a44a0 <module_registry_cleanup>)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:673
    #8 0x000000000069c205 in zend_deactivate_modules () at
    /usr/home/max/tmp/php-5.2.1/Zend/zend.c:839
    #9 0x00000000006458e1 in php_request_shutdown (dummy=0x0) at
    /usr/home/max/tmp/php-5.2.1/main/main.c:1293
    #10 0x0000000000718b06 in main (argc=1, argv=0x7fffffffedc8) at
    /usr/home/max/tmp/php-5.2.1/sapi/cgi/cgi_main.c:1796




    ===
    Backtrace 2
    ===


    www3# gdb /usr/local/bin/php php.core.501
    GNU gdb 6.1.1 [FreeBSD]
    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 "amd64-marcel-freebsd"...
    Core was generated by `php'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/libcrypt.so.3...done.
    Loaded symbols for /lib/libcrypt.so.3
    Reading symbols from /usr/local/pgsql/lib/libpq.so.5...done.
    Loaded symbols for /usr/local/pgsql/lib/libpq.so.5
    Reading symbols from /usr/local/lib/libiconv.so.3...done.
    Loaded symbols for /usr/local/lib/libiconv.so.3
    Reading symbols from /lib/libz.so.3...done.
    Loaded symbols for /lib/libz.so.3
    Reading symbols from /lib/libm.so.4...done.
    Loaded symbols for /lib/libm.so.4
    Reading symbols from /lib/libc.so.6...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x3d0000004e, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    1012 if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev) {
    (gdb) bt
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x3d0000004e, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    #1 0x000000000067c6e1 in _zend_mm_free_int (heap=0x95c000,
    p=0x3d0000004e,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1520
    #2 0x000000000067d90d in _efree (ptr=0x3d0000004e,
    __zend_filename=0x78d218 "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c",

    __zend_lineno=375, __zend_orig_filename=0x0, __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1877
    #3 0x000000000050f30f in _php_pgsql_notice_ptr_dtor (ptr=0xabac18) at
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:375
    #4 0x00000000006a9872 in zend_hash_clean (ht=0x9539a8) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:552
    #5 0x000000000050fbfc in zm_deactivate_pgsql (type=1, module_number=10)
    at /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:574
    #6 0x00000000006a44d6 in module_registry_cleanup (module=0x9f5e00) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_API.c:1945
    #7 0x00000000006a9cf2 in zend_hash_apply (ht=0x957d40,
    apply_func=0x6a44a0 <module_registry_cleanup>)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:673
    #8 0x000000000069c205 in zend_deactivate_modules () at
    /usr/home/max/tmp/php-5.2.1/Zend/zend.c:839
    #9 0x00000000006458e1 in php_request_shutdown (dummy=0x0) at
    /usr/home/max/tmp/php-5.2.1/main/main.c:1293
    #10 0x0000000000718b06 in main (argc=1, argv=0x7fffffffedc8) at
    /usr/home/max/tmp/php-5.2.1/sapi/cgi/cgi_main.c:1796


    ===
    Other debug messages
    ===


    Some debug messages also indicate memory leaks:


    [Sat Mar 3 16:32:07 2007] Script: '/home/site/index.php'
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c(357) : Freeing 0x0098A360
    (16 bytes), script=/home/site/index.php
    [Sat Mar 3 16:32:07 2007] Script: '/home/site/index.php'
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c(285) : Freeing 0x0098E3E8
    (256 bytes), script=/home/site/index.php
    === Total 2 memory leaks detected ===
    [Sat Mar 3 16:32:07 2007] Script: '/home/site/index.php'
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c(285) : Freeing 0x00B3BE08
    (256 bytes), script=/home/site/index.php
    [Sat Mar 3 16:32:07 2007] Script: '/home/site/index.php'
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c(357) : Freeing 0x0098B7E8
    (16 bytes), script=/home/site/index.php


    --
    Edit bug report at [url]http://bugs.php.net/?id=40708&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40708&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40708&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40708&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40708&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40708&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40708&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40708&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40708&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40708&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40708&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40708&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40708&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40708&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40708&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40708&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40708&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40708&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40708&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40708&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40708&r=mysqlcfg[/url]
    max at to-the-max dot net Guest

  2. Similar Questions and Discussions

    1. LoadFile method: VBA crashes. Well, any othermethod crashes as well.
      Hi there, I've got Acrobat reader 7.0 (correctly installed etc) In Excel 2003 VBA, I reference "Adobe Acrobat 7.0 Browser Control Type Library...
    2. RFC: New module 'Module::Bundled::Files'
      I've written a module, tentatively named Module::Bundled::Files. A section of the POD docs is included to (attempt) to explain it's purpose. It...
    3. Announce: DbBrowser, a module to create mysqll/postgresql based paginated CGI datagrids
      This module provide a quick way to code pg/mysql db based cgi tabulated interfaces. The module store the base sql query, allow columns definition...
    4. Weird PostgreSQL crashes on FC2/FC3 64-bit
      Since I've upgraded my development server to FC2/FC3 64-bit, I occasionally get these weird PostgreSQL semi-lockups. Once in a while, a query...
    5. nvnet module not working after kernel (and module) recompile
      --- SYNeR <tups77@tsn.cc> escribió: Make sure that when you 'make-kpkg <options here> kernel_image kernel_headers' that you have that...
  3. #2

    Default #40708 [Opn->Fbk]: Crashes when using PostgreSQL module

    ID: 40708
    Updated by: [email]tony2001@php.net[/email]
    Reported By: max at to-the-max dot net
    -Status: Open
    +Status: Feedback
    Bug Type: PostgreSQL related
    Operating System: FreeBSD 6.2-STABLE - AMD64
    PHP Version: 5.2.1
    New Comment:

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]




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

    [2007-03-03 15:55:53] max at to-the-max dot net

    Description:
    ------------
    Every couple hundred of requests PHP crashes while accessing a
    PostgreSQL database.

    Backtrace always points to ext/pgsql/pgsql.c __zend_lineno=375


    Reproduce code:
    ---------------
    Different scripts. All have in common that they use the PostgreSQL
    module.

    Actual result:
    --------------
    ===
    Backtrace 1
    ===

    www3# gdb /usr/local/bin/php php.core.500
    GNU gdb 6.1.1 [FreeBSD]
    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 "amd64-marcel-freebsd"...
    Core was generated by `php'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/libcrypt.so.3...done.
    Loaded symbols for /lib/libcrypt.so.3
    Reading symbols from /usr/local/pgsql/lib/libpq.so.5...done.
    Loaded symbols for /usr/local/pgsql/lib/libpq.so.5
    Reading symbols from /usr/local/lib/libiconv.so.3...done.
    Loaded symbols for /usr/local/lib/libiconv.so.3
    Reading symbols from /lib/libz.so.3...done.
    Loaded symbols for /lib/libz.so.3
    Reading symbols from /lib/libm.so.4...done.
    Loaded symbols for /lib/libm.so.4
    Reading symbols from /lib/libc.so.6...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x7fff00000031, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    1012 if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev)
    {
    (gdb) bt
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x7fff00000031, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    #1 0x000000000067c6e1 in _zend_mm_free_int (heap=0x95c000,
    p=0x7fff00000031,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1520
    #2 0x000000000067d90d in _efree (ptr=0x7fff00000031,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c",
    __zend_lineno=375, __zend_orig_filename=0x0, __zend_orig_lineno=0)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1877
    #3 0x000000000050f30f in _php_pgsql_notice_ptr_dtor (ptr=0xac0098) at
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:375
    #4 0x00000000006a9872 in zend_hash_clean (ht=0x9539a8) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:552
    #5 0x000000000050fbfc in zm_deactivate_pgsql (type=1,
    module_number=10) at /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:574
    #6 0x00000000006a44d6 in module_registry_cleanup (module=0x9f5e00) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_API.c:1945
    #7 0x00000000006a9cf2 in zend_hash_apply (ht=0x957d40,
    apply_func=0x6a44a0 <module_registry_cleanup>)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:673
    #8 0x000000000069c205 in zend_deactivate_modules () at
    /usr/home/max/tmp/php-5.2.1/Zend/zend.c:839
    #9 0x00000000006458e1 in php_request_shutdown (dummy=0x0) at
    /usr/home/max/tmp/php-5.2.1/main/main.c:1293
    #10 0x0000000000718b06 in main (argc=1, argv=0x7fffffffedc8) at
    /usr/home/max/tmp/php-5.2.1/sapi/cgi/cgi_main.c:1796







    ===
    Backtrace 2
    ===


    www3# gdb /usr/local/bin/php php.core.501
    GNU gdb 6.1.1 [FreeBSD]
    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 "amd64-marcel-freebsd"...
    Core was generated by `php'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/libcrypt.so.3...done.
    Loaded symbols for /lib/libcrypt.so.3
    Reading symbols from /usr/local/pgsql/lib/libpq.so.5...done.
    Loaded symbols for /usr/local/pgsql/lib/libpq.so.5
    Reading symbols from /usr/local/lib/libiconv.so.3...done.
    Loaded symbols for /usr/local/lib/libiconv.so.3
    Reading symbols from /lib/libz.so.3...done.
    Loaded symbols for /lib/libz.so.3
    Reading symbols from /lib/libm.so.4...done.
    Loaded symbols for /lib/libm.so.4
    Reading symbols from /lib/libc.so.6...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x3d0000004e, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    1012 if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev)
    {
    (gdb) bt
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x3d0000004e, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    #1 0x000000000067c6e1 in _zend_mm_free_int (heap=0x95c000,
    p=0x3d0000004e,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1520
    #2 0x000000000067d90d in _efree (ptr=0x3d0000004e,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c",
    __zend_lineno=375, __zend_orig_filename=0x0, __zend_orig_lineno=0)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1877
    #3 0x000000000050f30f in _php_pgsql_notice_ptr_dtor (ptr=0xabac18) at
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:375
    #4 0x00000000006a9872 in zend_hash_clean (ht=0x9539a8) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:552
    #5 0x000000000050fbfc in zm_deactivate_pgsql (type=1,
    module_number=10) at /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:574
    #6 0x00000000006a44d6 in module_registry_cleanup (module=0x9f5e00) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_API.c:1945
    #7 0x00000000006a9cf2 in zend_hash_apply (ht=0x957d40,
    apply_func=0x6a44a0 <module_registry_cleanup>)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:673
    #8 0x000000000069c205 in zend_deactivate_modules () at
    /usr/home/max/tmp/php-5.2.1/Zend/zend.c:839
    #9 0x00000000006458e1 in php_request_shutdown (dummy=0x0) at
    /usr/home/max/tmp/php-5.2.1/main/main.c:1293
    #10 0x0000000000718b06 in main (argc=1, argv=0x7fffffffedc8) at
    /usr/home/max/tmp/php-5.2.1/sapi/cgi/cgi_main.c:1796




    ===
    Backtrace 2
    ===


    www3# gdb /usr/local/bin/php php.core.501
    GNU gdb 6.1.1 [FreeBSD]
    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 "amd64-marcel-freebsd"...
    Core was generated by `php'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/libcrypt.so.3...done.
    Loaded symbols for /lib/libcrypt.so.3
    Reading symbols from /usr/local/pgsql/lib/libpq.so.5...done.
    Loaded symbols for /usr/local/pgsql/lib/libpq.so.5
    Reading symbols from /usr/local/lib/libiconv.so.3...done.
    Loaded symbols for /usr/local/lib/libiconv.so.3
    Reading symbols from /lib/libz.so.3...done.
    Loaded symbols for /lib/libz.so.3
    Reading symbols from /lib/libm.so.4...done.
    Loaded symbols for /lib/libm.so.4
    Reading symbols from /lib/libc.so.6...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x3d0000004e, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    1012 if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev)
    {
    (gdb) bt
    #0 0x000000000067b0b9 in zend_mm_check_ptr (heap=0x95c000,
    ptr=0x3d0000004e, silent=1,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1012
    #1 0x000000000067c6e1 in _zend_mm_free_int (heap=0x95c000,
    p=0x3d0000004e,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c", __zend_lineno=375,
    __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1520
    #2 0x000000000067d90d in _efree (ptr=0x3d0000004e,
    __zend_filename=0x78d218
    "/usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c",
    __zend_lineno=375, __zend_orig_filename=0x0, __zend_orig_lineno=0)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_alloc.c:1877
    #3 0x000000000050f30f in _php_pgsql_notice_ptr_dtor (ptr=0xabac18) at
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:375
    #4 0x00000000006a9872 in zend_hash_clean (ht=0x9539a8) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:552
    #5 0x000000000050fbfc in zm_deactivate_pgsql (type=1,
    module_number=10) at /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c:574
    #6 0x00000000006a44d6 in module_registry_cleanup (module=0x9f5e00) at
    /usr/home/max/tmp/php-5.2.1/Zend/zend_API.c:1945
    #7 0x00000000006a9cf2 in zend_hash_apply (ht=0x957d40,
    apply_func=0x6a44a0 <module_registry_cleanup>)
    at /usr/home/max/tmp/php-5.2.1/Zend/zend_hash.c:673
    #8 0x000000000069c205 in zend_deactivate_modules () at
    /usr/home/max/tmp/php-5.2.1/Zend/zend.c:839
    #9 0x00000000006458e1 in php_request_shutdown (dummy=0x0) at
    /usr/home/max/tmp/php-5.2.1/main/main.c:1293
    #10 0x0000000000718b06 in main (argc=1, argv=0x7fffffffedc8) at
    /usr/home/max/tmp/php-5.2.1/sapi/cgi/cgi_main.c:1796


    ===
    Other debug messages
    ===


    Some debug messages also indicate memory leaks:


    [Sat Mar 3 16:32:07 2007] Script: '/home/site/index.php'
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c(357) : Freeing
    0x0098A360 (16 bytes), script=/home/site/index.php
    [Sat Mar 3 16:32:07 2007] Script: '/home/site/index.php'
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c(285) : Freeing
    0x0098E3E8 (256 bytes), script=/home/site/index.php
    === Total 2 memory leaks detected ===
    [Sat Mar 3 16:32:07 2007] Script: '/home/site/index.php'
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c(285) : Freeing
    0x00B3BE08 (256 bytes), script=/home/site/index.php
    [Sat Mar 3 16:32:07 2007] Script: '/home/site/index.php'
    /usr/home/max/tmp/php-5.2.1/ext/pgsql/pgsql.c(357) : Freeing
    0x0098B7E8 (16 bytes), script=/home/site/index.php



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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40708&edit=1[/url]
    tony2001@php.net Guest

Posting Permissions

  • You may not post new threads
  • You may 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