snmpd crashes with segmentation faults
Performing "snmpbulkwalk" against some of our OSX 10.10.3 nodes running on Xserve 3,1 reliably causes snmpd daemon to crash with...
Jul 7 01:17:45 distribution4 com.apple.xpc.launchd[1] (org.net-snmp.snmpd[33337]): Service exited due to signal: Segmentation fault: 11
Here is what a crash report looks like:
Process: snmpd [74548]
Path: /usr/libexec/snmpd
Identifier: snmpd
Version: 143
Code Type: X86-64 (Native)
Parent Process: launchd [1]
Responsible: snmpd [74548]
User ID: 0
Date/Time: 2015-07-07 19:22:40.309 -0700
OS Version: Mac OS X 10.10.3 (14D136)
Report Version: 11
Anonymous UUID: D123FD65-A125-2CF3-6EAF-8E4A442660B1
Time Awake Since Boot: 1000000 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 000000010b075000-000000010b079000 [ 16K] r-x/rwx SM=COW /usr/libexec/snmpd
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib 0x00007fff8823c210 strncpy + 112
1 libnetsnmpmibs.25.dylib 0x000000010b0dbe9d Get_Next_Device + 38
2 libnetsnmpmibs.25.dylib 0x000000010b0dbb30 header_hrdevice + 398
3 libnetsnmpmibs.25.dylib 0x000000010b0db455 var_hrdevice + 85
4 libnetsnmpagent.25.dylib 0x000000010b0a7c28 netsnmp_old_api_helper + 398
5 libnetsnmpagent.25.dylib 0x000000010b0810de netsnmp_call_handler + 303
6 libnetsnmpagent.25.dylib 0x000000010b0a3be2 netsnmp_bulk_to_next_helper + 404
7 libnetsnmpagent.25.dylib 0x000000010b0810de netsnmp_call_handler + 303
8 libnetsnmpagent.25.dylib 0x000000010b08da85 handle_var_requests + 95
9 libnetsnmpagent.25.dylib 0x000000010b08e6ba handle_pdu + 526
10 libnetsnmpagent.25.dylib 0x000000010b08c5b5 netsnmp_handle_request + 354
11 libnetsnmpagent.25.dylib 0x000000010b08a9db handle_snmp_packet + 290
12 libnetsnmp.25.dylib 0x000000010b1f61bd 0x10b1ce000 + 164285
13 libnetsnmp.25.dylib 0x000000010b1f48bb _sess_read + 2439
14 libnetsnmp.25.dylib 0x000000010b1f3eee snmp_read2 + 38
15 snmpd 0x000000010b07770f 0x10b075000 + 9999
16 libdyld.dylib 0x00007fff899f55c9 start + 1
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8fd8b232 kevent64 + 10
1 libdispatch.dylib 0x00007fff885d9a6a _dispatch_mgr_thread + 52
Thread 2:
0 libsystem_kernel.dylib 0x00007fff8fd8a94a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff861e340d start_wqthread + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fff8fd8a94a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff861e340d start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fa73e801790 rcx: 0x0000000000000002 rdx: 0x0000000000000028
rdi: 0x000000010b15dab0 rsi: 0x0000000000000000 rbp: 0x00007fff54b89bd0 rsp: 0x00007fff54b89708
r8: 0x000000010b15dab0 r9: 0x0000000000000000 r10: 0x00007fa73b31e6b0 r11: 0x00007fff77317f98
r12: 0x0000000000000002 r13: 0x00007fa73e8017a1 r14: 0x000000010b1520b8 r15: 0x0000000000000010
rip: 0x00007fff8823c210 rfl: 0x0000000000010213 cr2: 0x0000000000000000
Logical CPU: 1
Error Code: 0x00000004
Trap Number: 14
Binary Images:
(omitted)
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 1
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 358812
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=143.1M resident=41.7M(29%) swapped_out_or_unallocated=101.4M(71%)
Writable regions: Total=186.5M written=3788K(2%) resident=4980K(3%) swapped_out=0K(0%) unallocated=181.7M(97%)
REGION TYPE VIRTUAL
=========== =======
CoreServices 256K
Dispatch continuations 32.0M
Kernel Alloc Once 4K
MALLOC 144.3M
MALLOC (admin) 32K
STACK GUARD 56.0M
Stack 9304K
VM_ALLOCATE 336K
__DATA 6844K
__LINKEDIT 71.1M
__TEXT 71.9M
__UNICODE 552K
mapped file 25.5M
shared memory 4K
=========== =======
TOTAL 417.9M
Systems affected by this issue have been upgraded from older OSX Server versions (10.6 and/or 10.8). SNMP configuration has been stripped to a bare minimum (rocommunity, syscontact, syslocation strings). /usr/sbin/snmpd executable appears identical to unaffected nodes that had Yosemite freshly installed.
Questions...
- What could be causing this?
- Is there a simple fix?
- Is there a procedure on how to fully refresh SNMP configuration including executables, MIBs, etc., on Yosemite - short of a full OS reinstall?
Thanks!
Xserve 3,1-OTHER, OS X Yosemite (10.10.3), upgraded from 10.8 or 10.6