snmpd crash when started with udp, dltsudp, tlstcp

Larry Hayes <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <CAG3KfNYFbOHHA+V7XN+J55vhov1eDZfdWkihtqeyUgLm=4zqGA@mail.gmail.com>
I am running net-snmp 5.8 r0.

I can get snmpd, snmptrapd and snmpget working with dtlsudp and tlstcp.
Except for some corner cases:

If I have a trap session defined in the snmpd.conf file, but the snmptrapd
is not running.
snmpd gets a SIGSEGV at startup time. (If I start snmptrapd first, then
everything works)

snmpd.local.conf:

trapsess -v 3 -T their_identity=manager.crt  tlstcp:10.20.19.57:10162
certSecName 1 04:BF:CF:1A:9C:5D:7A:9D:87:7E:1D:D8:A3:77:1A:DD:D7:76:77:0B
--sn "AdminUser"

snmpd start up:
/usr/sbin/snmpd -f
-Dsnmpd/select,snmp_store,snmp_alarm,snmp_agent,verbose:asp -Losd udp:
0.0.0.0:161 dtlsudp:10161 tlstcp:10161

Anybody seen this or got a work around????

registered debug token snmpd/select, 1
registered debug token snmp_store, 1
registered debug token snmp_alarm, 1
registered debug token snmp_agent, 1
registered debug token verbose:asp, 1
Log handling defined - disabling stderr
snmp_alarm: registered alarm 1, t = 10.000, flags=0x01
snmp_alarm: registered alarm 2, t = 3.000, flags=0x01
snmp_alarm: registered alarm 3, t = 5.000, flags=0x01
Turning on AgentX master support.
tlstcp: failed to connect to 10.20.19.57:10162
---- OpenSSL Related Errors: ----
 error: #151584876 (file ../openssl-1.1.1d/crypto/pem/pem_lib.c, line 745)
  Textual Error: Expecting: ANY PRIVATE KEY
 error: #33562735 (file ../openssl-1.1.1d/crypto/bio/b_sock2.c, line 110)
 error: #537436263 (file ../openssl-1.1.1d/crypto/bio/b_sock2.c, line 111)
 error: #33562735 (file ../openssl-1.1.1d/crypto/bio/bss_conn.c, line 173)
  Textual Error: hostname=10.20.19.57 service=10162
 error: #537342055 (file ../openssl-1.1.1d/crypto/bio/bss_conn.c, line 177)
---- End of OpenSSL Errors ----
snmp_alarm: no alarms found to schedule
snmp_agent: final port spec: "udp:0.0.0.0:161,dtlsudp:10161,tlstcp:10161"
snmp_agent: installing master agent on port udp:0.0.0.0:161
snmp_agent: init_master_agent; "udp:0.0.0.0:161" registered as an agent NSAP
snmp_agent: installing master agent on port dtlsudp:10161
A SNMP version other than 3 was requested with (D)TLS; using 3 anyways
snmp_agent: init_master_agent; "dtlsudp:10161" registered as an agent NSAP
snmp_agent: installing master agent on port tlstcp:10161
snmp_agent: init_master_agent; "tlstcp:10161" registered as an agent NSAP
snmp_store: storing stuff...
NET-SNMP version 5.8
snmpd/select: select( numfds=10, ..., tvp=0xffffd4f0)
snmpd/select: returned, count = 1
snmpd/select: select( numfds=10, ..., tvp=0xffffd4f0)
snmpd/select: returned, count = 1
snmpd/select: select( numfds=10, ..., tvp=0xffffd4f0)
snmpd/select: returned, count = 0

Program received signal SIGSEGV, Segmentation fault.
0xf7d38dfa in snmp_sess_timeout (sessp=0x809c7d8) at snmp_api.c:6789
6789    snmp_api.c: No such file or directory.
(gdb) bt
#0  0xf7d38dfa in snmp_sess_timeout (sessp=0x809c7d8) at snmp_api.c:6789
#1  0xf7d38fa9 in snmp_timeout () at snmp_api.c:6660
#2  0x0804b50f in receive () at snmpd.c:1347
#3  0x0804ab52 in main (argc=7, argv=0xffffd7b4) at snmpd.c:1125
(gdb) print sptr
$1 = <optimized out>
(gdb) print rp
$2 = (netsnmp_request_list *) 0x80d13d8
(gdb) print now
$3 = {tv_sec = 83215, tv_usec = 331554}
(gdb) print rp->pdu->securityModel
Cannot access memory at address 0x28
(gdb) print rp->expireM
$4 = {tv_sec = 0, tv_usec = 0}
(gdb) print rp->pdu
$5 = (netsnmp_pdu *) 0x0
(gdb)

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.