# gdb --args /usr/sbin/snmpd -LS4d -f -Lf /var/log/snmpd.log -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf -I -smux GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... (gdb) run Starting program: /usr/sbin/snmpd -LS4d -f -Lf /var/log/snmpd.log -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf -I -smux [Thread debugging using libthread_db enabled] [New Thread 0x7f3b188476f0 (LWP 24475)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f3b188476f0 (LWP 24475)] 0x00007f3b17ee448c in var_extensible_old (vp=0x7fff60aef9f0, name=0x238dbc0, length=, exact=, var_len=0x7fff60af0210, write_method=0x7fff60af0218) at agent/extend.c:1362 1362 agent/extend.c: No such file or directory. in agent/extend.c (gdb) bt full #0 0x00007f3b17ee448c in var_extensible_old (vp=0x7fff60aef9f0, name=0x238dbc0, length=, exact=, var_len=0x7fff60af0210, write_method=0x7fff60af0218) at agent/extend.c:1362 exten = (netsnmp_old_extend *) 0x223b968 long_ret = 0 #1 0x00007f3b181e3202 in netsnmp_old_api_helper (handler=, reginfo=0x223d9f0, reqinfo=0x2326650, requests=0x234af60) at old_api.c:281 save = {1, 3, 6, 1, 4, 1, 2021, 8, 1, 101, 1, 35, 10448170, 140734815469200, 140734815469624, 139891761544616, 0, 0, 139891791152336, 139891786654675, 139891761570776, 139891786634344, 4294967296, 4294967923, 36991584, 139891791222808, 140734815469680, 140734815469624, 668682915, 140734815469600, 0, 139891789046574, 0, 0, 139891379798017, 0, 1, 140734815469392, 140734815469816, 139891761544616, 0, 4704214287, 0, 139891791222808, 140734815469728, 139891791221952, 139891786654675, 139891789045984, 139891761544012, 139891379798034, 4123233, 140734815469504, 140734815469928, 139891761544616, 0, 0, 139891791152336, 139891786646137, 139891761570776, 139891786632808, 4294967296, 4294968236, 1052161670, 139891791222808, 64, 140734815469679, 139891761559664, 139891791152336, 1, 4294967295, 0, 2377296, 140734815469888, 35906096, 0, 1, 139891786620928, 139891789063946, 4294967297, 139891761828960, 140734815469728, 10, 104919279427333, 37035200, 37280368, 139891789092226, 0, 1187158373339886592, 10, 37035200, 37280368, 140734815469888, 35906096, 0, 1, 139891786788655, 0, 10, 140734815470160, 37034800, 37034834, 139891789063946, 139891379798016, 0, 139891761567176, 139891791152336, 7885080995474597640, 1187158373339886592, 432, 140734815470080, 1, 12, 1, 1, 140734815470080, 139891786789393, 35243216, 139891761898057, 12, 35905840, 35905840, 37156960, 1, 37280656, 0, 139891786704209, 37280368, 35906096} savelen = 11 compat_var = {magic = 101 'e', type = 4 '\004', acl = 1, findVar = 0x7f3b17ee4350 , namelen = 10 '\n', name = {1, 3, 6, 1, 4, 1, 2021, 8, 1, 101, 11479958814929715200, 140734815469174, 0, 0, 4294967296, 140734815469176, 11479958608771284992, 139891762081930, 140734815468272, 140734815469235, 140734815469391, 139891770462256, 35221776, 3834591005672210432, 0, 206158430232, 140734815468752, 140734815468544, 18, 2936815672, 139891789045984, 139891766796336, 56, 45887744, 140734815468336, 140734815468760, 139891766803304, 0, 139891791141240, 139891791157648, 139891778860841, 139891766854160, 139891778858512, 4294967296, 4294967674, 44244106, 139891791161392, 140734815468816, 1187158373339886592, 37213697, 139891761787925, 140734815468464, 15, 140734815468759, 48, 139891762056747, 140734815469992, 140734815468864, 139891761789878, 139891770382848, 0, 140734815469992, 139891770382848, 1152, 139891767290097, 140734815469935, 139891770382960, 140734815469919, 48, 1184, 140734815468687, 140734815468704, 1187158373339886592, 37213712, 139891761787925, 140734815404032, 0, 37213710, 140734815468744, 37279232, 140734815469992, 140734815468864, 139891761782408, 8589934591, 139891767323394, 140734815469904, 37279216, 88, 37279264, 11, 139891761610953, 0, 37156672, 37279240, 140734815469992, 37279216, 139891761714093, 140734815469992, 140734815468912, 140734815469896, 140734815468864, 140734815469904, 37213712, 1, 3, 6, 1, 4, 1, 2021, 8, 1, 101, 1, 139891782453814, 86, 139891778881717, 36853792, 140734815469476, 140734815469348, 140734815469616, 140734815469744, 140734815469344, 36853792, 0, 36991584, 35221520, 139891766825792}} exact = 0 status = 35905520 vp = (struct variable *) 0x223da50 write_method = (WriteMethod *) 0 len = 8 access = (u_char *) 0x223dff0 "\200�#\002" oldasp = __FUNCTION__ = "netsnmp_old_api_helper" #2 0x00007f3b18416847 in netsnmp_call_handlers (reginfo=0x223d9f0, reqinfo=0x2326650, requests=0x234af60) at agent_handler.c:435 request = status = __FUNCTION__ = "netsnmp_call_handlers" #3 0x00007f3b18407611 in handle_var_requests (asp=0x236f860) at snmp_agent.c:2528 i = 0 retstatus = status = 5 final_status = 0 #4 0x00007f3b1840919b in handle_pdu (asp=0x236f860) at snmp_agent.c:3324 status = 0 ---Type to continue, or q to quit--- inclusives = 0 v = __FUNCTION__ = "handle_pdu" #5 0x00007f3b1840b768 in netsnmp_handle_request (asp=0x236f860, status=) at snmp_agent.c:3120 __FUNCTION__ = "netsnmp_handle_request" #6 0x00007f3b1840c2b2 in handle_snmp_packet (op=, session=, reqid=, pdu=, magic=) at snmp_agent.c:1852 asp = (netsnmp_agent_session *) 0x236f860 status = 0 access_ret = 0 rc = __FUNCTION__ = "handle_snmp_packet" #7 0x00007f3b16c46869 in _sess_process_packet (sessp=0x2327030, sp=0x23213f0, isp=0x2346960, transport=, opaque=, olength=, packetptr=0x237d5e0 "0.\002\001", length=48) at snmp_api.c:5356 pdu = (netsnmp_pdu *) 0x236f740 rp = orp = sptr = ret = 0 handled = 1 __FUNCTION__ = "_sess_process_packet" #8 0x00007f3b16c48a4d in _sess_read (sessp=0x2327030, fdset=0x7fff60af0550) at snmp_api.c:5772 sp = (netsnmp_session *) 0x23213f0 isp = (struct snmp_internal_session *) 0x2346960 transport = (netsnmp_transport *) 0x23471e0 pdulen = rxbuf = length = 0 olength = 20 rc = opaque = (void *) 0x2347260 __FUNCTION__ = "_sess_read" #9 0x00007f3b16c48ff9 in snmp_sess_read (sessp=0x238dc10, fdset=0x7fff60aef548) at snmp_api.c:5791 pss = rc = 404508072 #10 0x00007f3b16c4904b in snmp_read (fdset=0x7fff60af0550) at snmp_api.c:5408 slp = (struct session_list *) 0x2327030 #11 0x0000000000404f43 in main (argc=, argv=) at snmpd.c:1198 options = "aAc:CdD::fhHI:l:L:m:M:n:p:P:qrsS:UvV-:Y:g:u:x:X", '\0' arg = i = ret = dont_fork = 1 do_help = uid = gid = 0 agent_mode = -1 ---Type to continue, or q to quit--- cptr = argvptr = pid_file = 0x7fff60af19eb "/var/run/snmpd.pid" option_compatability = "-Le" fd = PID = __FUNCTION__ = "main" (gdb) info registers rax 0x0 0 rbx 0x223b968 35895656 rcx 0x2 2 rdx 0x7f3b181c4da8 139891784306088 rsi 0x7fff60aef548 140734815466824 rdi 0x238dc10 37280784 rbp 0x238dbc0 0x238dbc0 rsp 0x7fff60aef970 0x7fff60aef970 r8 0x65 101 r9 0x7fff60af0218 140734815470104 r10 0x7fff60aef2a0 140734815466144 r11 0x7f3b17192990 139891767323024 r12 0x7fff60af0210 140734815470096 r13 0x7fff60aef9f0 140734815468016 r14 0x7fff60af0218 140734815470104 r15 0x223da50 35904080 rip 0x7f3b17ee448c 0x7f3b17ee448c eflags 0x10297 [ CF PF AF SF IF RF ] cs 0x33 51 ss 0x2b 43 ds 0x0 0 es 0x0 0 fs 0x0 0 gs 0x0 0 fctrl 0x37f 895 fstat 0x0 0 ftag 0xffff 65535 fiseg 0x0 0 fioff 0x0 0 foseg 0x0 0 fooff 0x0 0 fop 0x0 0 mxcsr 0x1f80 [ IM DM ZM OM UM PM ] (gdb) x/16i $pc 0x7f3b17ee448c : mov 0x60(%rax),%rdi 0x7f3b17ee4490 : callq 0x7f3b17ec39b0 0x7f3b17ee4495 : mov 0x8(%rbx),%rdx 0x7f3b17ee4499 : cmpl $0x1,0x48(%rdx) 0x7f3b17ee449d : jle 0x7f3b17ee4532 0x7f3b17ee44a3 : mov $0xffffffffffffffff,%rax 0x7f3b17ee44aa : sub 0x40(%rdx),%rax 0x7f3b17ee44ae : mov 0x50(%rdx),%rdx 0x7f3b17ee44b2 : add 0x8(%rdx),%rax 0x7f3b17ee44b6 : mov %rax,(%r12) 0x7f3b17ee44ba : mov 0x8(%rbx),%rax 0x7f3b17ee44be : mov 0x40(%rax),%rax 0x7f3b17ee44c2 : jmpq 0x7f3b17ee4393 0x7f3b17ee44c7 : mov 0x2c90b2(%rip),%rax # 0x7f3b181ad580 <_fini+2343288> 0x7f3b17ee44ce : mov %rax,(%r14) 0x7f3b17ee44d1 : mov 0x2c9480(%rip),%rax # 0x7f3b181ad958 <_fini+2344272> (gdb) thread apply all backtrace Thread 1 (Thread 0x7f3b188476f0 (LWP 24475)): #0 0x00007f3b17ee448c in var_extensible_old (vp=0x7fff60aef9f0, name=0x238dbc0, length=, exact=, var_len=0x7fff60af0210, write_method=0x7fff60af0218) at agent/extend.c:1362 #1 0x00007f3b181e3202 in netsnmp_old_api_helper (handler=, reginfo=0x223d9f0, reqinfo=0x2326650, requests=0x234af60) at old_api.c:281 #2 0x00007f3b18416847 in netsnmp_call_handlers (reginfo=0x223d9f0, reqinfo=0x2326650, requests=0x234af60) at agent_handler.c:435 #3 0x00007f3b18407611 in handle_var_requests (asp=0x236f860) at snmp_agent.c:2528 #4 0x00007f3b1840919b in handle_pdu (asp=0x236f860) at snmp_agent.c:3324 #5 0x00007f3b1840b768 in netsnmp_handle_request (asp=0x236f860, status=) at snmp_agent.c:3120 #6 0x00007f3b1840c2b2 in handle_snmp_packet (op=, session=, reqid=, pdu=, magic=) at snmp_agent.c:1852 #7 0x00007f3b16c46869 in _sess_process_packet (sessp=0x2327030, sp=0x23213f0, isp=0x2346960, transport=, opaque=, olength=, packetptr=0x237d5e0 "0.\002\001", length=48) at snmp_api.c:5356 #8 0x00007f3b16c48a4d in _sess_read (sessp=0x2327030, fdset=0x7fff60af0550) at snmp_api.c:5772 #9 0x00007f3b16c48ff9 in snmp_sess_read (sessp=0x238dc10, fdset=0x7fff60aef548) at snmp_api.c:5791 #10 0x00007f3b16c4904b in snmp_read (fdset=0x7fff60af0550) at snmp_api.c:5408 #11 0x0000000000404f43 in main (argc=, argv=) at snmpd.c:1198 (gdb) q