SNMP Daemon crashed on sending SIGHUP signal by deleting trap2sink entry from configuration file.
"Guddenahalli Naganna, Jayaprakasha" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Net-snmp version 5.2.1
Platform details.
SNMP master agent is running on a switch which is having "MontaVista
6.0-8.0.7.0300532 2003-12-24" operating system.
Steps to reproduce the crash as follows,
1. Configurations file should contain the following entries, (order
should be same)
master agentx
agentxSocket localhost:705
agentaddress 161
trap2sink 192.168.33.2 public
2. Start master agent
3. Remove the trap2sink entry from configuration file.
Modified configuration file content looks like this,
master agentx
agentxSocket localhost:705
agentaddress 161
4. Send SIGHUP to master agent
Now snmp daemon will crash. Crash is consistent only with
the above procedure. Here is the gdb trace,
root@nexthop:/nh/bin# gdb -d .. master_agent
GNU gdb 6.0 (MontaVista 6.0-8.0.7.0300532 2003-12-24)
Copyright 2003 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 "powerpc-hardhat-linux"...at
(gdb) att 351
Attaching to program: /nh/bin/master_agent, process 351
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libelf.so.0...done.
Loaded symbols for /usr/lib/libelf.so.0
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
0x0fe02fac in select () from /lib/libc.so.6
(gdb) c
Continuing.
Program received signal SIGHUP, Hangup.
0x0fe02fac in select () from /lib/libc.so.6
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
snmp_sess_select_info (sessp=0x10083490, numfds=0x7ffffc40,
fdset=0x7ffffab8,
timeout=0x7ffffc38, block=0x7ffffc44)
at gated/src/snmp/libs/snmplib/snmp_api.c:5714
5714 if (slp->transport->sock == -1) {
(gdb)