You are not logged in.
Pages: 1
Hi
I have some trouble with snmp (v3).
It fails after a while.
Starting Simple Network Management Protocol (SNMP) Daemon...
snmpd.service: Can't open PID file /run/snmpd.pid (yet?) after start: Operation not permitted
Started Simple Network Management Protocol (SNMP) Daemon.
snmpd.service: Main process exited, code=dumped, status=6/ABRT
snmpd.service: Failed with result 'core-dump'.Maybe it has to do with the pid file. I have the same message about the pid file on other servers, but without problems. Another server has no problems at all accessing the pid file with the same permissions.
There are no other logs, as far as I know.
Anyone using snmp as well?
Thanks
Dan
Last edited by danSman (2020-05-06 23:43:11)
Offline
You should have a core dump: https://wiki.archlinux.org/index.php/Co … _core_dump
Offline
Hi V1del
Thanks for the hint.
It took me a while to get back to the problem..
I'm trying to solve it, but I've never done this before, so when I create the core file I get some errors and I don't know how to handle them.
I searched the WWW, but nothing led to a proper solution.
So I created the core file.
(gdb) generate-core-file
warning: target file /proc/42253/cmdline contained unexpected null characters
warning: Memory read failed for corefile section, 4096 bytes at 0xffffffffff600000.
Saved corefile core.42253
(gdb) quit
A debugging session is active.
Inferior 1 [process 42253] will be detached.
Quit anyway? (y or n) If snmpd stops, can I examine the core file to get more details about the problem?
Offline
I was linking you to the "examination" part rather than the creation part. Read more towards the bottom of the page
Offline
Right.
Every pid ...
Wed 2020-05-20 02:34:19 CEST 936523 0 0 6 present /usr/bin/snmpd
Wed 2020-05-20 08:34:50 CEST 14900 0 0 6 present /usr/bin/snmpd
Wed 2020-05-20 14:34:51 CEST 35172 0 0 6 present /usr/bin/snmpd
Wed 2020-05-20 20:34:50 CEST 55390 0 0 6 present /usr/bin/snmpd
Thu 2020-05-21 02:34:49 CEST 75666 0 0 6 present /usr/bin/snmpd
Thu 2020-05-21 08:34:48 CEST 96690 0 0 6 present /usr/bin/snmpd
Thu 2020-05-21 14:34:53 CEST 11584 0 0 6 present /usr/bin/snmpd
Thu 2020-05-21 20:34:52 CEST 31303 0 0 6 present /usr/bin/snmpdfailed:
Signal: 6 (ABRT)
...
Core was generated by `/usr/bin/snmpd -p /run/snmpd.pid'.
Program terminated with signal SIGABRT, Aborted.PID 31303
Reading symbols from /usr/bin/snmpd...
(No debugging symbols found in /usr/bin/snmpd)
[New LWP 31303]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/snmpd -p /run/snmpd.pid'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f804d9bece5 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007f804d9bece5 in raise () from /usr/lib/libc.so.6
#1 0x00007f804d9a8857 in abort () from /usr/lib/libc.so.6
#2 0x00007f804da022b0 in __libc_message () from /usr/lib/libc.so.6
#3 0x00007f804da0974a in malloc_printerr () from /usr/lib/libc.so.6
#4 0x00007f804da0b58d in _int_free () from /usr/lib/libc.so.6
#5 0x00007f804dbebe9b in usm_free_usmStateReference () from /usr/lib/libnetsnmp.so.35
#6 0x00007f804dbf1417 in usm_generate_out_msg () from /usr/lib/libnetsnmp.so.35
#7 0x00007f804dbf1cc6 in usm_secmod_generate_out_msg () from /usr/lib/libnetsnmp.so.35
#8 0x00007f804dba643f in snmpv3_packet_build () from /usr/lib/libnetsnmp.so.35
#9 0x00007f804dba8568 in snmp_build () from /usr/lib/libnetsnmp.so.35
#10 0x00007f804dba8ac4 in netsnmp_build_packet () from /usr/lib/libnetsnmp.so.35
#11 0x00007f804dba8d67 in _build_initial_pdu_packet () from /usr/lib/libnetsnmp.so.35
#12 0x00007f804dfadaab in netsnmp_wrap_up_request () from /usr/lib/libnetsnmpagent.so.35
#13 0x00007f804dfb0c8c in netsnmp_handle_request () from /usr/lib/libnetsnmpagent.so.35
#14 0x00007f804dfb0fbb in handle_snmp_packet () from /usr/lib/libnetsnmpagent.so.35
#15 0x00007f804dbb1022 in ?? () from /usr/lib/libnetsnmp.so.35
#16 0x00007f804dbb2101 in _sess_read () from /usr/lib/libnetsnmp.so.35
#17 0x00007f804dbb2cca in snmp_sess_read2 () from /usr/lib/libnetsnmp.so.35
#18 0x00007f804dbb2d1c in snmp_read2 () from /usr/lib/libnetsnmp.so.35
#19 0x000055beaec0b161 in ?? ()
#20 0x000055beaec0a4df in main ()Is there a good explanation for this? I don't get my head around that.
Last edited by danSman (2020-05-21 22:41:40)
Offline
Double free or free'ing bad memory, seems a longer standing issue: https://sourceforge.net/p/net-snmp/bugs/2923/
Offline
Pages: 1