On Mon, 19 Sep 2016, Luiz Gustavo dos S. Costa wrote: > I have an OpenBSD 6.0 Installation and am having trouble with snmpd, it > just dies after a time, see example below: > > # time snmpd -dv > snmpe_bind: binding to address X.X.X.X:161 > startup > traphandler exiting, pid 85031 > 1m06.67s real 0m00.01s user 0m00.00s system > > Anyone else with this problem?
Since no one else has reponded, apparently not. So you'll need to do some diagnostics and debugging yourself. Is there anything interesting in the logs? I believe snmpd logs to /var/log/daemon.log If this occurs quickly enough and reliably enough, you could use ktrace to trace the snmpd processes and see what leads up to the death of the processes. What's different about this host? Is there anything different about its config? Is it dying after receiving a particular query? Is it dying when it would send (or receive?) a trap? The snmpd traphandler process changes uid, so if it's dying from a signal you should be able to catch its coredump using the direction at the very bottom of the sysctl(1) manpage: To place core dumps from issetugid(2) programs (in this example bgpd(8)) into a safe place for debugging purposes: # mkdir -m 700 /var/crash/bgpd # sysctl kern.nosuidcoredump=3 I.e., you could do, as root: mkdir -m 700 /var/crash/snmpd sysctl kern.nosuidcoredump=3 ...and then if snmpd crashes it should leave a coredump in /var/crash/snmpd/ ...but you would probably want to compile an snmpd binary with debugging information so that gdb can provide useful backtrace information from that corefile. Philip Guenther