From:             [EMAIL PROTECTED]
Operating system: RH Linux 7.2
PHP version:      4.1.0
PHP Bug Type:     SNMP related
Bug description:  snmp seg fault

I'm using RH Linux 7.2 php 4.1.0 with ucd-snmp that comes 
along with the linux distribution. My configure parameter is 
as follows

./configure  --with-apxs=/usr/sbin/apxs
--enable-calendar --with-pgsql --with-snmp
--enable-ucd-snmp-hack --enable-wddx --enable-sysvsem
--with-sysvshm --enable-inline-optimization
--enable-ftp --with-gd --enable-gd-native-ttf
--with-openssl

The compilation is smooth, but when i execute any snmp 
related functions i get segmentation fault. I had got same 
problem with php 4.0.6 as well and i changed to 4.1.0 but 
the problem persists.

gdb out is as follows:


Core was generated by `php snmp.php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libssl.so.2...done.
Loaded symbols for /lib/libssl.so.2
Reading symbols from /lib/libcrypto.so.2...done.
Loaded symbols for /lib/libcrypto.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib/libsnmp-0.4.2.1.so...done.
Loaded symbols for /usr/lib/libsnmp-0.4.2.1.so
Reading symbols from /usr/lib/libpq.so.2...done.
Loaded symbols for /usr/lib/libpq.so.2
Reading symbols from /usr/lib/libgd.so.1.8...done.
Loaded symbols for /usr/lib/libgd.so.1.8
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /usr/kerberos/lib/libkrb5.so.3...done.
Loaded symbols for /usr/kerberos/lib/libkrb5.so.3
Reading symbols from 
/usr/kerberos/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/kerberos/lib/libk5crypto.so.3
---Type <return> to continue, or q <return> to quit---
Reading symbols from 
/usr/kerberos/lib/libcom_err.so.3...done.
Loaded symbols for /usr/kerberos/lib/libcom_err.so.3
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libpng.so.2...done.
Loaded symbols for /usr/lib/libpng.so.2
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0  0x402c8c71 in strlen () from /lib/i686/libc.so.6
(gdb) bt
#0  0x402c8c71 in strlen () from /lib/i686/libc.so.6
#1  0x4017969f in bprintf () from /usr/lib/libsnmp-0.4.2.1.so
#2  0x4017a453 in sprint_object_identifier () from 
/usr/lib/libsnmp-0.4.2.1.so
#3  0x4017ce3a in sprint_value () from 
/usr/lib/libsnmp-0.4.2.1.so
#4  0x080a1ab5 in php_snmp (ht=3, return_value=0x81e358c, 
this_ptr=0x0,
    return_value_used=1, st=2) at snmp.c:318
#5  0x080a1dbb in zif_snmpwalk (ht=3, return_value=0x81e358c, 
this_ptr=0x0,
    return_value_used=1) at snmp.c:397
#6  0x08134376 in execute (op_array=0x81e368c) at 
./zend_execute.c:1590
#7  0x08111788 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3)
    at zend.c:814
#8  0x08067255 in php_execute_script (primary_file=0xbffff980) 
at main.c:1309
#9  0x08064e38 in main (argc=2, argv=0xbffffa24) at 
cgi_main.c:738
#10 0x4025e507 in __libc_start_main (main=0x8064648 <main>, 
argc=2,
    ubp_av=0xbffffa24, init=0x8062760 <_init>, fini=0x813c500 
<_fini>,
    rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbffffa1c)
    at ../sysdeps/generic/libc-start.c:129
(gdb)


Seems like the problem is with ucd-snmp that comes along RH 
linux. I'm tring with fresh source of ucd-snmp.

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


-- 
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]

Reply via email to