ID:               21167
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         LDAP related
 Operating System: Linux Redhat 8.0
 PHP Version:      4.2.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The segfault occurs 4 levels deep inside the ldap library itself. It is
more then likely that the bug is not in PHP but rather in the ldap
library you are using.


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

[2003-01-05 16:10:33] [EMAIL PROTECTED]

iliaa,

>Did you do make clean & removed config.cache before >compiling PHP
with --enable-debug flag?

yes, i did.

>Also, try running the php via gdb,
>gdb /home/rsaura/php-4.3.0/sapi/cgi/php
>run -f pp.php4

here you are...

[root@avipsa64 vmps]# gdb /home/rsaura/php-4.3.0/sapi/cgi/php
GNU gdb Red Hat Linux (5.2.1-4)
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-redhat-linux"...
(gdb) run -f pp.php4
Starting program: /home/rsaura/php-4.3.0/sapi/cgi/php -f pp.php4

Program received signal SIGSEGV, Segmentation fault.
0x40055615 in ldap_free_request () from /usr/lib/libldap.so.2
(gdb) bt
#0  0x40055615 in ldap_free_request () from /usr/lib/libldap.so.2
#1  0x4004e62c in ldap_ld_free () from /usr/lib/libldap.so.2
#2  0x4004e38b in ldap_unbind_ext () from /usr/lib/libldap.so.2
#3  0x4004e66f in ldap_unbind_s () from /usr/lib/libldap.so.2
#4  0x08084347 in _close_ldap_link (rsrc=0x820c8d4)
    at /home/rsaura/php-4.3.0/ext/ldap/ldap.c:175
#5  0x08155369 in list_entry_destructor (ptr=0x820c8d4)
    at /home/rsaura/php-4.3.0/Zend/zend_list.c:177
#6  0x081534e7 in zend_hash_del_key_or_index (ht=0x81b01e8, arKey=0x0,
    nKeyLength=0, h=3, flag=1) at
/home/rsaura/php-4.3.0/Zend/zend_hash.c:514
#7  0x081550c9 in _zend_list_delete (id=3)
    at /home/rsaura/php-4.3.0/Zend/zend_list.c:56
#8  0x08084aad in zif_ldap_unbind (ht=1, return_value=0x820c894,
this_ptr=0x0,
    return_value_used=0) at /home/rsaura/php-4.3.0/ext/ldap/ldap.c:482
#9  0x0815e1b6 in execute (op_array=0x820c49c)
    at /home/rsaura/php-4.3.0/Zend/zend_execute.c:1596
#10 0x0814e864 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at /home/rsaura/php-4.3.0/Zend/zend.c:864
#11 0x0811fb1a in php_execute_script (primary_file=0xbffffaa0)
    at /home/rsaura/php-4.3.0/main/main.c:1573
#12 0x08164322 in main (argc=3, argv=0xbffffb44)
    at /home/rsaura/php-4.3.0/sapi/cgi/cgi_main.c:1424
#13 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)

>If your php binary does have debug symbols and the 
>backtrace is still
>uninformative it is likely the crash is occuring within >the ldap
library itself.

Indeed the symbol information shows it segfaulting on libldap.so (as
sugested) but ldap-clients & ldap PAM module work fine here.

thanks.

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

[2003-01-05 13:37:10] [EMAIL PROTECTED]

Did you do make clean & removed config.cache before compiling PHP with
--enable-debug flag?
Also, try running the php via gdb,
gdb /home/rsaura/php-4.3.0/sapi/cgi/php
run -f pp.php4

If your php binary does have debug symbols and the backtrace is still
uninformative it is likely the crash is occuring within the ldap
library itself.

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

[2003-01-03 14:19:07] [EMAIL PROTECTED]

I've configured PHP-4.3.0 this way:

./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu
--target=i386-redhat-linux-gnu --program-prefix= --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 --mandir=/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-dom=/usr --with-exec-dir=/usr/bin
--with-gettext --with-regex=system --with-xml --with-expat-dir=/usr
--with-zlib --with-layout=GNU --enable-exif --enable-ftp
--enable-magic-quotes --enable-safe-mode --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-discard-path
--enable-track-vars --enable-trans-sid --with-pear=/usr/share/pear
--with-ldap --enable-memory-limit --enable-shmop --enable-versioning

but the new core file does not show any debug symbol:

[root@avipsa64 vmps]# gdb -c core.23469
GNU gdb Red Hat Linux (5.2.1-4)
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-redhat-linux".
Core was generated by `/home/rsaura/php-4.3.0/sapi/cgi/php -f
pp.php4'.
Program terminated with signal 11, Segmentation fault.
#0  0x40055615 in ?? ()
(gdb) bt
#0  0x40055615 in ?? ()
#1  0x4004e62c in ?? ()
#2  0x4004e38b in ?? ()
#3  0x4004e66f in ?? ()
#4  0x08084347 in ?? ()
#5  0x08155369 in ?? ()
#6  0x081534e7 in ?? ()
#7  0x081550c9 in ?? ()
#8  0x08084aad in ?? ()
#9  0x0815e1b6 in ?? ()
#10 0x0814e864 in ?? ()
#11 0x0811fb1a in ?? ()
#12 0x08164322 in ?? ()
#13 0x420158d4 in ?? ()
(gdb)

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

[2003-01-03 11:49:36] [EMAIL PROTECTED]

Could you compile your PHP with --enable-debug flag, so that your
backtrace contains more information.

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

[2003-01-03 09:21:29] [EMAIL PROTECTED]

Erroneously closed.

The above code segfaults spuriously on 4.2.2, 4.3.0 and 4.4.0-dev
(latest CVS snapshot) on RH-8.0 linux system with the following ldap
libraries installed:

[root@avipsa64 root]# rpm -qa |grep ldap
nss_ldap-198-3
openldap-devel-2.0.25-1
openldap-clients-2.0.25-1
openldap-2.0.25-1

SIGSEGVs with CGI and DSO versions.

the stack backtrace on the core file shows:

[root@avipsa64 vmps]# gdb -c core.22324
GNU gdb Red Hat Linux (5.2.1-4)
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-redhat-linux".
Core was generated by `/home/rsaura/php-4.3.0/sapi/cgi/php -f
pp.php4'.
Program terminated with signal 11, Segmentation fault.
#0  0x40055615 in ?? ()
(gdb) bt
#0  0x40055615 in ?? ()
#1  0x4004e62c in ?? ()
#2  0x4004e38b in ?? ()
#3  0x4004e66f in ?? ()
#4  0x0807bbab in ?? ()
#5  0x081165c1 in ?? ()
#6  0x081152cb in ?? ()
#7  0x081163e1 in ?? ()
#8  0x0807c160 in ?? ()
#9  0x0811ca3a in ?? ()
#10 0x08111f0b in ?? ()
#11 0x080f175c in ?? ()
#12 0x08120b0f in ?? ()
#13 0x420158d4 in ?? ()
(gdb) q
[root@avipsa64 vmps]# ldd /home/rsaura/php-4.3.0/sapi/cgi/php
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4001c000)
        libldap.so.2 => /usr/lib/libldap.so.2 (0x4003d000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0x40067000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40072000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40080000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x400ad000)
        libm.so.6 => /lib/i686/libm.so.6 (0x400bf000)
        libdl.so.2 => /lib/libdl.so.2 (0x400e2000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x400e5000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x400fa000)
        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
        libsasl.so.7 => /usr/lib/libsasl.so.7 (0x401a2000)
        libssl.so.2 => /lib/libssl.so.2 (0x401ad000)
        libcrypto.so.2 => /lib/libcrypto.so.2 (0x401de000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x402b2000)
        libpam.so.0 => /lib/libpam.so.0 (0x402b9000)
[root@avipsa64 vmps]#

the faults seems to happen inside libldap.

best regards.

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

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
    http://bugs.php.net/21167

-- 
Edit this bug report at http://bugs.php.net/?id=21167&edit=1

Reply via email to