Description of problem: glibc free protection message appears when snmp_shutdown is called Version-Release number of selected component (if applicable): net-snmp-5.1.2-11.EL4.6 (Master Agent in AgentX mode) How reproducible: Always Steps to Reproduce: 1. Call snmp_shutdown Actual results: *** glibc detected *** double free or corruption (!prev)" Expected results: No message Additional info: Pb found in net-snmp mailing list http://www.mail-archive.com/net-snmp-users@lists.sourceforge.net/msg04481.html Seems to be related to bug 1084653 Bhttp://sourceforge.net/tracker/? group_id=12694&atid=112694&func=detail&aid=1084653
Oups, I thought this issue is already gone and fixed in net-snmp-5.1.2-11.EL.3. See bug #157539 and clear_callbacks and free_session patches. Do you reproduce the error with the same steps as in the bug you refer to? I've just tried on my RHEL4 box a sample tt.c code and it seems to work fine.
yes. # rpm -qa | grep snmp net-snmp-utils-5.1.2-11.EL4.6 net-snmp-devel-5.1.2-11.EL4.6 net-snmp-perl-5.1.2-11.EL4.6 net-snmp-libs-5.1.2-11 php-snmp-4.3.9-3.8 net-snmp-5.1.2-11 # cat /etc/redhat-release Red Hat Enterprise Linux ES release 4 (Nahant Update 2) # gcc -I/usr/local/include -g `net-snmp-config --agent-libs` tt.c # ./a.out *** glibc detected *** double free or corruption (!prev): 0x0997a498 *** Aborted (gdb) bt #0 0x0075b7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x007c47d5 in raise () from /lib/tls/libc.so.6 #2 0x007c6149 in abort () from /lib/tls/libc.so.6 #3 0x007f840a in __libc_message () from /lib/tls/libc.so.6 #4 0x007feb3f in _int_free () from /lib/tls/libc.so.6 #5 0x007feeba in free () from /lib/tls/libc.so.6 #6 0x00db2b86 in clear_callback () from /usr/lib/libnetsnmp.so.5 #7 0x00d9416f in snmp_shutdown () from /usr/lib/libnetsnmp.so.5 #8 0x0804864a in main (argc=1, argv=0xbff0f9d4) at tt.c:20 here is the snmpd.conf file master agentx rwcommunity public trap2sink pro8 ~
I apologize for long silence from Red Hat. I am new maintainer on net-snmp and I am cleaning old bugs. The patch you are referring to is already fixed in net-snmp-5.1.2-11.EL4.3, so it seems you have found different bug. Could you please try to reproduce the bug with latest RHEL 4.5 update? If it is still reproducible, could you please attach the magic tt.c, which reproduces the bug? Thanks in advance.
Closing due to reporter inactivity. Feel free to reopen the bug if you are able to reproduce it and provide the required information.