Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: SourceForge.net <noreply@so...> - 2006-11-30 14:03:36
|
Bugs item #1606062, was opened at 2006-11-30 15:03 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: perl Group: linux Status: Open Resolution: None Priority: 5 Private: No Submitted By: Peter Valdemar Mørch (pmorch) Assigned to: Nobody/Anonymous (nobody) Summary: perl bulkwalk (async) ends up core dumping prematurely Initial Comment: When using SNMP.pm's asynchronous interface for bulkwalk it returns values successfully 117 times, but on the 118th attempt it dumps core. The stack trace from the core file is placed last in this mail. I used net-snmp-5.4.tar.gz that I downloaded today from source, and did this: configure --prefix=/home/pvm/work/net-snmp-5.4/prefix --with-perl-modules=PREFIX=/home/pvm/work/net-snmp-5.4/prefix make make install and then ran: perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl bulkasync.pl is attached Using perl 5.8.8 on debian etch on a 2.6.18 linux kernel I've placed the following files in http://demo.capmon.dk/~pvm/bulkwalkasyncbug/ for more info: bulkasync.pl core debian-etch.txt dpkg-versions.txt perl-V.txt SNMPbug.txt ( == This bug report ) uname-a.txt Perhaps the follwing bugs are related. At least they all seem to be related to bulkwalk. I don't know: Bug # 1206613 : Munging Perl's stack: Use of freed vlaue in iteration Bug # 998598 : memleak in async perl interface Bug # 834859 : perl bulkwalk (asynchronous) causes cleanup to segfaultv Bug # 1533078 : bulkwalk does not work in SNMP::Session [PATCH] > gdb perl core GNU gdb 6.4.90-debian Copyright (C) 2006 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 "i486-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/tls/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libdl.so.2 Reading symbols from /lib/tls/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/tls/libpthread.so.0... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/tls/libcrypt.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libcrypt.so.1 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15 Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.8...done. Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.8 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so Reading symbols from /usr/lib/perl/5.8.8/auto/Data/Dumper/Dumper.so...done. Loaded symbols for /usr/lib/perl/5.8/auto/Data/Dumper/Dumper.so Reading symbols from /lib/tls/libnss_files.so.2...done. Loaded symbols for /lib/tls/libnss_files.so.2 Core was generated by `perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl'. Program terminated with signal 11, Segmentation fault. #0 0x080bc574 in Perl_pp_const () (gdb) bt #0 0x080bc574 in Perl_pp_const () #1 0x080bcb6e in Perl_pp_method_named () #2 0x080bc3b9 in Perl_runops_standard () #3 0x080626be in Perl_magicname () #4 0x0806318d in Perl_call_sv () #5 0xb79fd0cc in __call_callback (sv=0x82dfdf0, flags=2) at SNMP.xs:1511 #6 0xb7a05f06 in _bulkwalk_finish (context=0x8312988, okay=<value optimized out>) at SNMP.xs:2454 #7 0xb7a093f0 in _bulkwalk_async_cb (op=1, ss=0x816bfc0, reqid=1062572725, pdu=0x8342f80, context_ptr=0x8312988) at SNMP.xs:1824 #8 0xb7baad5c in _sess_process_packet (sessp=0x83283a8, sp=0x816bfc0, isp=0x8304f88, transport=0x8312908, opaque=0x82f0920, olength=20, packetptr=0x832f3e0 "0\202\001\006\002\001\001\004\006public¢\201ø\002\004?U\222µ\002\001", length=266) at snmp_api.c:5273 #9 0xb7bad13e in _sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5779 #10 0xb7bae059 in snmp_sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5798 #11 0xb7bae0bc in snmp_read (fdset=0xbfb32fcc) at snmp_api.c:5412 #12 0xb79fd56b in XS_SNMP__main_loop (my_perl=0x814e008, cv=0x816ef0c) at SNMP.xs:4924 #13 0x080bdae1 in Perl_pp_entersub () #14 0x080bc3b9 in Perl_runops_standard () #15 0x08063bfd in perl_run () #16 0x0805ffd1 in main () (gdb) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 |
From: SourceForge.net <noreply@so...> - 2006-12-05 15:08:19
|
Bugs item #1606062, was opened at 2006-11-30 15:03 Message generated for change (Comment added) made by pmorch You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: perl Group: linux Status: Open Resolution: None Priority: 5 Private: No Submitted By: Peter Valdemar Mørch (pmorch) Assigned to: Nobody/Anonymous (nobody) Summary: perl bulkwalk (async) ends up core dumping prematurely Initial Comment: When using SNMP.pm's asynchronous interface for bulkwalk it returns values successfully 117 times, but on the 118th attempt it dumps core. The stack trace from the core file is placed last in this mail. I used net-snmp-5.4.tar.gz that I downloaded today from source, and did this: configure --prefix=/home/pvm/work/net-snmp-5.4/prefix --with-perl-modules=PREFIX=/home/pvm/work/net-snmp-5.4/prefix make make install and then ran: perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl bulkasync.pl is attached Using perl 5.8.8 on debian etch on a 2.6.18 linux kernel I've placed the following files in http://demo.capmon.dk/~pvm/bulkwalkasyncbug/ for more info: bulkasync.pl core debian-etch.txt dpkg-versions.txt perl-V.txt SNMPbug.txt ( == This bug report ) uname-a.txt Perhaps the follwing bugs are related. At least they all seem to be related to bulkwalk. I don't know: Bug # 1206613 : Munging Perl's stack: Use of freed vlaue in iteration Bug # 998598 : memleak in async perl interface Bug # 834859 : perl bulkwalk (asynchronous) causes cleanup to segfaultv Bug # 1533078 : bulkwalk does not work in SNMP::Session [PATCH] > gdb perl core GNU gdb 6.4.90-debian Copyright (C) 2006 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 "i486-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/tls/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libdl.so.2 Reading symbols from /lib/tls/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/tls/libpthread.so.0... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/tls/libcrypt.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libcrypt.so.1 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15 Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.8...done. Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.8 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so Reading symbols from /usr/lib/perl/5.8.8/auto/Data/Dumper/Dumper.so...done. Loaded symbols for /usr/lib/perl/5.8/auto/Data/Dumper/Dumper.so Reading symbols from /lib/tls/libnss_files.so.2...done. Loaded symbols for /lib/tls/libnss_files.so.2 Core was generated by `perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl'. Program terminated with signal 11, Segmentation fault. #0 0x080bc574 in Perl_pp_const () (gdb) bt #0 0x080bc574 in Perl_pp_const () #1 0x080bcb6e in Perl_pp_method_named () #2 0x080bc3b9 in Perl_runops_standard () #3 0x080626be in Perl_magicname () #4 0x0806318d in Perl_call_sv () #5 0xb79fd0cc in __call_callback (sv=0x82dfdf0, flags=2) at SNMP.xs:1511 #6 0xb7a05f06 in _bulkwalk_finish (context=0x8312988, okay=<value optimized out>) at SNMP.xs:2454 #7 0xb7a093f0 in _bulkwalk_async_cb (op=1, ss=0x816bfc0, reqid=1062572725, pdu=0x8342f80, context_ptr=0x8312988) at SNMP.xs:1824 #8 0xb7baad5c in _sess_process_packet (sessp=0x83283a8, sp=0x816bfc0, isp=0x8304f88, transport=0x8312908, opaque=0x82f0920, olength=20, packetptr=0x832f3e0 "0\202\001\006\002\001\001\004\006public¢\201ø\002\004?U\222µ\002\001", length=266) at snmp_api.c:5273 #9 0xb7bad13e in _sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5779 #10 0xb7bae059 in snmp_sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5798 #11 0xb7bae0bc in snmp_read (fdset=0xbfb32fcc) at snmp_api.c:5412 #12 0xb79fd56b in XS_SNMP__main_loop (my_perl=0x814e008, cv=0x816ef0c) at SNMP.xs:4924 #13 0x080bdae1 in Perl_pp_entersub () #14 0x080bc3b9 in Perl_runops_standard () #15 0x08063bfd in perl_run () #16 0x0805ffd1 in main () (gdb) ---------------------------------------------------------------------- >Comment By: Peter Valdemar Mørch (pmorch) Date: 2006-12-05 16:08 Message: Logged In: YES user_id=740837 Originator: YES I have now noticed that this probably is a duplicate of this other bug: [ 1077186 ] perl bulkwalk (asynchronous) causes segfault That other bug was closed for no apparent reason other than inactivity on the original poster's part. I intend not to be inactive! :D Should I mark this as a dup of that other one or what? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 |
From: SourceForge.net <noreply@so...> - 2007-02-14 21:26:59
|
Bugs item #1606062, was opened at 2006-11-30 06:03 Message generated for change (Comment added) made by fenner You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: perl Group: linux Status: Open Resolution: None Priority: 5 Private: No Submitted By: Peter Valdemar Mørch (pmorch) Assigned to: Nobody/Anonymous (nobody) Summary: perl bulkwalk (async) ends up core dumping prematurely Initial Comment: When using SNMP.pm's asynchronous interface for bulkwalk it returns values successfully 117 times, but on the 118th attempt it dumps core. The stack trace from the core file is placed last in this mail. I used net-snmp-5.4.tar.gz that I downloaded today from source, and did this: configure --prefix=/home/pvm/work/net-snmp-5.4/prefix --with-perl-modules=PREFIX=/home/pvm/work/net-snmp-5.4/prefix make make install and then ran: perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl bulkasync.pl is attached Using perl 5.8.8 on debian etch on a 2.6.18 linux kernel I've placed the following files in http://demo.capmon.dk/~pvm/bulkwalkasyncbug/ for more info: bulkasync.pl core debian-etch.txt dpkg-versions.txt perl-V.txt SNMPbug.txt ( == This bug report ) uname-a.txt Perhaps the follwing bugs are related. At least they all seem to be related to bulkwalk. I don't know: Bug # 1206613 : Munging Perl's stack: Use of freed vlaue in iteration Bug # 998598 : memleak in async perl interface Bug # 834859 : perl bulkwalk (asynchronous) causes cleanup to segfaultv Bug # 1533078 : bulkwalk does not work in SNMP::Session [PATCH] > gdb perl core GNU gdb 6.4.90-debian Copyright (C) 2006 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 "i486-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/tls/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libdl.so.2 Reading symbols from /lib/tls/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/tls/libpthread.so.0... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/tls/libcrypt.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libcrypt.so.1 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15 Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.8...done. Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.8 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so Reading symbols from /usr/lib/perl/5.8.8/auto/Data/Dumper/Dumper.so...done. Loaded symbols for /usr/lib/perl/5.8/auto/Data/Dumper/Dumper.so Reading symbols from /lib/tls/libnss_files.so.2...done. Loaded symbols for /lib/tls/libnss_files.so.2 Core was generated by `perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl'. Program terminated with signal 11, Segmentation fault. #0 0x080bc574 in Perl_pp_const () (gdb) bt #0 0x080bc574 in Perl_pp_const () #1 0x080bcb6e in Perl_pp_method_named () #2 0x080bc3b9 in Perl_runops_standard () #3 0x080626be in Perl_magicname () #4 0x0806318d in Perl_call_sv () #5 0xb79fd0cc in __call_callback (sv=0x82dfdf0, flags=2) at SNMP.xs:1511 #6 0xb7a05f06 in _bulkwalk_finish (context=0x8312988, okay=<value optimized out>) at SNMP.xs:2454 #7 0xb7a093f0 in _bulkwalk_async_cb (op=1, ss=0x816bfc0, reqid=1062572725, pdu=0x8342f80, context_ptr=0x8312988) at SNMP.xs:1824 #8 0xb7baad5c in _sess_process_packet (sessp=0x83283a8, sp=0x816bfc0, isp=0x8304f88, transport=0x8312908, opaque=0x82f0920, olength=20, packetptr=0x832f3e0 "0\202\001\006\002\001\001\004\006public¢\201ø\002\004?U\222µ\002\001", length=266) at snmp_api.c:5273 #9 0xb7bad13e in _sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5779 #10 0xb7bae059 in snmp_sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5798 #11 0xb7bae0bc in snmp_read (fdset=0xbfb32fcc) at snmp_api.c:5412 #12 0xb79fd56b in XS_SNMP__main_loop (my_perl=0x814e008, cv=0x816ef0c) at SNMP.xs:4924 #13 0x080bdae1 in Perl_pp_entersub () #14 0x080bc3b9 in Perl_runops_standard () #15 0x08063bfd in perl_run () #16 0x0805ffd1 in main () (gdb) ---------------------------------------------------------------------- Comment By: Bill Fenner (fenner) Date: 2007-02-14 13:26 Message: Logged In: YES user_id=109593 Originator: NO I tried your bulkasync.pl on my FreeBSD 6.1 system with perl 5.8.8 and net-snmp 5.4; interestingly, it doesn't dump core, but it repeatably hangs after 1946 callbacks. ("hangs" is not quite accurate, since it sits around consuming a small amount of CPU (0.5%), but it does stop printing output.) ---------------------------------------------------------------------- Comment By: Peter Valdemar Mørch (pmorch) Date: 2006-12-05 07:08 Message: Logged In: YES user_id=740837 Originator: YES I have now noticed that this probably is a duplicate of this other bug: [ 1077186 ] perl bulkwalk (asynchronous) causes segfault That other bug was closed for no apparent reason other than inactivity on the original poster's part. I intend not to be inactive! :D Should I mark this as a dup of that other one or what? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 |
From: SourceForge.net <noreply@so...> - 2007-10-11 11:01:19
|
Bugs item #1606062, was opened at 2006-11-30 14:03 Message generated for change (Comment added) made by int32 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: perl Group: linux Status: Open Resolution: None Priority: 5 Private: No Submitted By: Peter Valdemar Mørch (pmorch) Assigned to: Nobody/Anonymous (nobody) Summary: perl bulkwalk (async) ends up core dumping prematurely Initial Comment: When using SNMP.pm's asynchronous interface for bulkwalk it returns values successfully 117 times, but on the 118th attempt it dumps core. The stack trace from the core file is placed last in this mail. I used net-snmp-5.4.tar.gz that I downloaded today from source, and did this: configure --prefix=/home/pvm/work/net-snmp-5.4/prefix --with-perl-modules=PREFIX=/home/pvm/work/net-snmp-5.4/prefix make make install and then ran: perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl bulkasync.pl is attached Using perl 5.8.8 on debian etch on a 2.6.18 linux kernel I've placed the following files in http://demo.capmon.dk/~pvm/bulkwalkasyncbug/ for more info: bulkasync.pl core debian-etch.txt dpkg-versions.txt perl-V.txt SNMPbug.txt ( == This bug report ) uname-a.txt Perhaps the follwing bugs are related. At least they all seem to be related to bulkwalk. I don't know: Bug # 1206613 : Munging Perl's stack: Use of freed vlaue in iteration Bug # 998598 : memleak in async perl interface Bug # 834859 : perl bulkwalk (asynchronous) causes cleanup to segfaultv Bug # 1533078 : bulkwalk does not work in SNMP::Session [PATCH] > gdb perl core GNU gdb 6.4.90-debian Copyright (C) 2006 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 "i486-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/tls/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libdl.so.2 Reading symbols from /lib/tls/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/tls/libpthread.so.0... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/tls/libcrypt.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libcrypt.so.1 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15 Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.8...done. Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.8 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so Reading symbols from /usr/lib/perl/5.8.8/auto/Data/Dumper/Dumper.so...done. Loaded symbols for /usr/lib/perl/5.8/auto/Data/Dumper/Dumper.so Reading symbols from /lib/tls/libnss_files.so.2...done. Loaded symbols for /lib/tls/libnss_files.so.2 Core was generated by `perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl'. Program terminated with signal 11, Segmentation fault. #0 0x080bc574 in Perl_pp_const () (gdb) bt #0 0x080bc574 in Perl_pp_const () #1 0x080bcb6e in Perl_pp_method_named () #2 0x080bc3b9 in Perl_runops_standard () #3 0x080626be in Perl_magicname () #4 0x0806318d in Perl_call_sv () #5 0xb79fd0cc in __call_callback (sv=0x82dfdf0, flags=2) at SNMP.xs:1511 #6 0xb7a05f06 in _bulkwalk_finish (context=0x8312988, okay=<value optimized out>) at SNMP.xs:2454 #7 0xb7a093f0 in _bulkwalk_async_cb (op=1, ss=0x816bfc0, reqid=1062572725, pdu=0x8342f80, context_ptr=0x8312988) at SNMP.xs:1824 #8 0xb7baad5c in _sess_process_packet (sessp=0x83283a8, sp=0x816bfc0, isp=0x8304f88, transport=0x8312908, opaque=0x82f0920, olength=20, packetptr=0x832f3e0 "0\202\001\006\002\001\001\004\006public¢\201ø\002\004?U\222µ\002\001", length=266) at snmp_api.c:5273 #9 0xb7bad13e in _sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5779 #10 0xb7bae059 in snmp_sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5798 #11 0xb7bae0bc in snmp_read (fdset=0xbfb32fcc) at snmp_api.c:5412 #12 0xb79fd56b in XS_SNMP__main_loop (my_perl=0x814e008, cv=0x816ef0c) at SNMP.xs:4924 #13 0x080bdae1 in Perl_pp_entersub () #14 0x080bc3b9 in Perl_runops_standard () #15 0x08063bfd in perl_run () #16 0x0805ffd1 in main () (gdb) ---------------------------------------------------------------------- Comment By: Dmitry Karasik (int32) Date: 2007-10-11 11:01 Message: Logged In: YES user_id=72076 Originator: NO I also didn't experience a coredump (also under FreeBSD), but altering bulkwalk.pl slightly so that the callback collects and print results of $sess->bulkwalk() did cause the coredump. I've run the script under valgrind, and got a very interesting output. Namely this one: = Invalid read of size 4 = at 0x3C61537E: _bulkwalk_finish (SNMP.xs:2283) = by 0x3C613E92: _bulkwalk_async_cb (SNMP.xs:1772) = by 0x3C3A65C6: _sess_process_packet (snmp_api.c:5269) = by 0x3C3A7BDB: _sess_read (snmp_api.c:5772) = Address 0x3C169668 is 4 bytes before a block of size 128 alloc'd = at 0x3C038183: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so) = by 0x80B07D2: Perl_safesysmalloc (util.c:78) = by 0x806493A: Perl_init_stacks (perl.c:4463) = by 0x805E881: perl_construct (perl.c:317) after I fixed the code, the coredump and the hang seem to go away. The change was: --- SNMP.xs 2007-06-19 00:28:09.000000000 +0200 +++ /home/dk/src/net-snmp-5.4.1/perl/SNMP/SNMP.xs 2007-10-11 12:50:43.000000000 +0200 @@ -2267,6 +2267,7 @@ static int _bulkwalk_finish(walk_context *context, int okay) { + dSP; int npushed = 0; int i; int async = 0; @@ -2277,9 +2278,23 @@ SV **err_str_svp = hv_fetch((HV*)SvRV(context->sess_ref), "ErrorStr", 8, 1); SV **err_num_svp = hv_fetch((HV*)SvRV(context->sess_ref), "ErrorNum", 8, 1); + + async = SvTRUE(context->perl_cb); + + /* XXX + _bulkwalk_finish() was originally intended to be called from XS code, and + would extend the caller's stack with result. Later it was changed into + an asynchronous version that calls perl code instead. These two branches + differ significantly in how they treat perl stack. Due to these differences, + often implicit (f.ex. dMARK calls POPMARK ), it would be a good idea + to write two different procedures, _bulkwalk_finish_sync and _bulkwalk_finish_async + for cleaner separation. */ + + if (async) PUSHMARK(sp); + + { #ifdef dITEMS - dSP; dMARK; dITEMS; #else @@ -2287,14 +2302,12 @@ /* older perl versions don't declare dITEMS though and the following declars it but also uses dAXMARK instead of dMARK which is the bad popping version */ - dSP; dMARK; /* err... This is essentially what the newer dITEMS does */ I32 items = sp - mark; #endif - async = SvTRUE(context->perl_cb); /* Successfully completed the bulkwalk. For synchronous calls, push each ** of the request value arrays onto the stack, and return the number of @@ -2404,7 +2417,7 @@ DBPRT(2,(DBOUT "Free() context 0x%p\n", context)); Safefree(context); return npushed; -} +}} /* End of bulkwalk support routines */ also, while at it, I've fixed a tiny warning from snmplib itself (memory read over the last 0 in a string, but harmless one): --- read_config.c 2007-07-06 23:22:28.000000000 +0200 +++ /home/dk/src/net-snmp-5.4.1/snmplib/read_config.c 2007-10-11 11:28:06.000000000 +0200 @@ -1050,7 +1050,7 @@ ctmp->fileHeader, envconfpath, perspath)); cptr1 = cptr2 = envconfpath; done = 0; - while ((*cptr2 != 0) && (!done)) { + while ((!done) && (*cptr2 != 0)) { while (*cptr1 != 0 && *cptr1 != ENV_SEPARATOR_CHAR) cptr1++; if (*cptr1 == 0) ---------------------------------------------------------------------- Comment By: Bill Fenner (fenner) Date: 2007-02-14 21:26 Message: Logged In: YES user_id=109593 Originator: NO I tried your bulkasync.pl on my FreeBSD 6.1 system with perl 5.8.8 and net-snmp 5.4; interestingly, it doesn't dump core, but it repeatably hangs after 1946 callbacks. ("hangs" is not quite accurate, since it sits around consuming a small amount of CPU (0.5%), but it does stop printing output.) ---------------------------------------------------------------------- Comment By: Peter Valdemar Mørch (pmorch) Date: 2006-12-05 15:08 Message: Logged In: YES user_id=740837 Originator: YES I have now noticed that this probably is a duplicate of this other bug: [ 1077186 ] perl bulkwalk (asynchronous) causes segfault That other bug was closed for no apparent reason other than inactivity on the original poster's part. I intend not to be inactive! :D Should I mark this as a dup of that other one or what? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 |
From: SourceForge.net <noreply@so...> - 2007-10-14 20:42:24
|
Bugs item #1606062, was opened at 2006-11-30 15:03 Message generated for change (Comment added) made by tanders You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: perl Group: linux >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Peter Valdemar Mørch (pmorch) >Assigned to: Thomas Anders (tanders) Summary: perl bulkwalk (async) ends up core dumping prematurely Initial Comment: When using SNMP.pm's asynchronous interface for bulkwalk it returns values successfully 117 times, but on the 118th attempt it dumps core. The stack trace from the core file is placed last in this mail. I used net-snmp-5.4.tar.gz that I downloaded today from source, and did this: configure --prefix=/home/pvm/work/net-snmp-5.4/prefix --with-perl-modules=PREFIX=/home/pvm/work/net-snmp-5.4/prefix make make install and then ran: perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl bulkasync.pl is attached Using perl 5.8.8 on debian etch on a 2.6.18 linux kernel I've placed the following files in http://demo.capmon.dk/~pvm/bulkwalkasyncbug/ for more info: bulkasync.pl core debian-etch.txt dpkg-versions.txt perl-V.txt SNMPbug.txt ( == This bug report ) uname-a.txt Perhaps the follwing bugs are related. At least they all seem to be related to bulkwalk. I don't know: Bug # 1206613 : Munging Perl's stack: Use of freed vlaue in iteration Bug # 998598 : memleak in async perl interface Bug # 834859 : perl bulkwalk (asynchronous) causes cleanup to segfaultv Bug # 1533078 : bulkwalk does not work in SNMP::Session [PATCH] > gdb perl core GNU gdb 6.4.90-debian Copyright (C) 2006 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 "i486-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/tls/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libdl.so.2 Reading symbols from /lib/tls/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/tls/libpthread.so.0... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/tls/libcrypt.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libcrypt.so.1 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/default_store/default_store.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/libnetsnmp.so.15 Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.8...done. Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.8 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/SNMP/SNMP.so Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so Reading symbols from /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so...done. Loaded symbols for /home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8/auto/NetSNMP/OID/OID.so Reading symbols from /usr/lib/perl/5.8.8/auto/Data/Dumper/Dumper.so...done. Loaded symbols for /usr/lib/perl/5.8/auto/Data/Dumper/Dumper.so Reading symbols from /lib/tls/libnss_files.so.2...done. Loaded symbols for /lib/tls/libnss_files.so.2 Core was generated by `perl -I/home/pvm/work/net-snmp-5.4/prefix/lib/perl/5.8.8 bulkasync.pl'. Program terminated with signal 11, Segmentation fault. #0 0x080bc574 in Perl_pp_const () (gdb) bt #0 0x080bc574 in Perl_pp_const () #1 0x080bcb6e in Perl_pp_method_named () #2 0x080bc3b9 in Perl_runops_standard () #3 0x080626be in Perl_magicname () #4 0x0806318d in Perl_call_sv () #5 0xb79fd0cc in __call_callback (sv=0x82dfdf0, flags=2) at SNMP.xs:1511 #6 0xb7a05f06 in _bulkwalk_finish (context=0x8312988, okay=<value optimized out>) at SNMP.xs:2454 #7 0xb7a093f0 in _bulkwalk_async_cb (op=1, ss=0x816bfc0, reqid=1062572725, pdu=0x8342f80, context_ptr=0x8312988) at SNMP.xs:1824 #8 0xb7baad5c in _sess_process_packet (sessp=0x83283a8, sp=0x816bfc0, isp=0x8304f88, transport=0x8312908, opaque=0x82f0920, olength=20, packetptr=0x832f3e0 "0\202\001\006\002\001\001\004\006public¢\201ø\002\004?U\222µ\002\001", length=266) at snmp_api.c:5273 #9 0xb7bad13e in _sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5779 #10 0xb7bae059 in snmp_sess_read (sessp=0x83283a8, fdset=0xbfb32fcc) at snmp_api.c:5798 #11 0xb7bae0bc in snmp_read (fdset=0xbfb32fcc) at snmp_api.c:5412 #12 0xb79fd56b in XS_SNMP__main_loop (my_perl=0x814e008, cv=0x816ef0c) at SNMP.xs:4924 #13 0x080bdae1 in Perl_pp_entersub () #14 0x080bc3b9 in Perl_runops_standard () #15 0x08063bfd in perl_run () #16 0x0805ffd1 in main () (gdb) ---------------------------------------------------------------------- >Comment By: Thomas Anders (tanders) Date: 2007-10-14 22:42 Message: Logged In: YES user_id=848638 Originator: NO Fixed by patch 1811463 applied as SVN Rev. 16722. ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2007-10-14 22:42 Message: Logged In: YES user_id=848638 Originator: NO Thanks for the bug report! We've fixed the problem in the 5.2.x, 5.3.x and 5.4.x code branches and the main development tree, so it should be fixed in future releases of the Net-SNMP package. ---------------------------------------------------------------------- Comment By: Dmitry Karasik (int32) Date: 2007-10-11 13:01 Message: Logged In: YES user_id=72076 Originator: NO I also didn't experience a coredump (also under FreeBSD), but altering bulkwalk.pl slightly so that the callback collects and print results of $sess->bulkwalk() did cause the coredump. I've run the script under valgrind, and got a very interesting output. Namely this one: = Invalid read of size 4 = at 0x3C61537E: _bulkwalk_finish (SNMP.xs:2283) = by 0x3C613E92: _bulkwalk_async_cb (SNMP.xs:1772) = by 0x3C3A65C6: _sess_process_packet (snmp_api.c:5269) = by 0x3C3A7BDB: _sess_read (snmp_api.c:5772) = Address 0x3C169668 is 4 bytes before a block of size 128 alloc'd = at 0x3C038183: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so) = by 0x80B07D2: Perl_safesysmalloc (util.c:78) = by 0x806493A: Perl_init_stacks (perl.c:4463) = by 0x805E881: perl_construct (perl.c:317) after I fixed the code, the coredump and the hang seem to go away. The change was: --- SNMP.xs 2007-06-19 00:28:09.000000000 +0200 +++ /home/dk/src/net-snmp-5.4.1/perl/SNMP/SNMP.xs 2007-10-11 12:50:43.000000000 +0200 @@ -2267,6 +2267,7 @@ static int _bulkwalk_finish(walk_context *context, int okay) { + dSP; int npushed = 0; int i; int async = 0; @@ -2277,9 +2278,23 @@ SV **err_str_svp = hv_fetch((HV*)SvRV(context->sess_ref), "ErrorStr", 8, 1); SV **err_num_svp = hv_fetch((HV*)SvRV(context->sess_ref), "ErrorNum", 8, 1); + + async = SvTRUE(context->perl_cb); + + /* XXX + _bulkwalk_finish() was originally intended to be called from XS code, and + would extend the caller's stack with result. Later it was changed into + an asynchronous version that calls perl code instead. These two branches + differ significantly in how they treat perl stack. Due to these differences, + often implicit (f.ex. dMARK calls POPMARK ), it would be a good idea + to write two different procedures, _bulkwalk_finish_sync and _bulkwalk_finish_async + for cleaner separation. */ + + if (async) PUSHMARK(sp); + + { #ifdef dITEMS - dSP; dMARK; dITEMS; #else @@ -2287,14 +2302,12 @@ /* older perl versions don't declare dITEMS though and the following declars it but also uses dAXMARK instead of dMARK which is the bad popping version */ - dSP; dMARK; /* err... This is essentially what the newer dITEMS does */ I32 items = sp - mark; #endif - async = SvTRUE(context->perl_cb); /* Successfully completed the bulkwalk. For synchronous calls, push each ** of the request value arrays onto the stack, and return the number of @@ -2404,7 +2417,7 @@ DBPRT(2,(DBOUT "Free() context 0x%p\n", context)); Safefree(context); return npushed; -} +}} /* End of bulkwalk support routines */ also, while at it, I've fixed a tiny warning from snmplib itself (memory read over the last 0 in a string, but harmless one): --- read_config.c 2007-07-06 23:22:28.000000000 +0200 +++ /home/dk/src/net-snmp-5.4.1/snmplib/read_config.c 2007-10-11 11:28:06.000000000 +0200 @@ -1050,7 +1050,7 @@ ctmp->fileHeader, envconfpath, perspath)); cptr1 = cptr2 = envconfpath; done = 0; - while ((*cptr2 != 0) && (!done)) { + while ((!done) && (*cptr2 != 0)) { while (*cptr1 != 0 && *cptr1 != ENV_SEPARATOR_CHAR) cptr1++; if (*cptr1 == 0) ---------------------------------------------------------------------- Comment By: Bill Fenner (fenner) Date: 2007-02-14 22:26 Message: Logged In: YES user_id=109593 Originator: NO I tried your bulkasync.pl on my FreeBSD 6.1 system with perl 5.8.8 and net-snmp 5.4; interestingly, it doesn't dump core, but it repeatably hangs after 1946 callbacks. ("hangs" is not quite accurate, since it sits around consuming a small amount of CPU (0.5%), but it does stop printing output.) ---------------------------------------------------------------------- Comment By: Peter Valdemar Mørch (pmorch) Date: 2006-12-05 16:08 Message: Logged In: YES user_id=740837 Originator: YES I have now noticed that this probably is a duplicate of this other bug: [ 1077186 ] perl bulkwalk (asynchronous) causes segfault That other bug was closed for no apparent reason other than inactivity on the original poster's part. I intend not to be inactive! :D Should I mark this as a dup of that other one or what? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1606062&group_id=12694 |