#2367 snmpd crashes on query hrDeviceDescr

linux
closed
agent (1105)
5
2014-08-15
2012-06-05
No

# /opt/net-snmp-5.4/sbin/snmpd -v
NET-SNMP version: 5.4.4

# uname -a
Linux a-test 3.5.0-rc1 #1 SMP Sun Jun 3 16:54:10 MSK 2012 x86_64 GNU/Linux

Operating system distribution: debian squeeze(6.0) with modern kernel

Sample output demonstrating the bug:
# snmpwalk -c secret -v2c 127.0.0.1 hrDeviceDescr
HOST-RESOURCES-MIB::hrDeviceDescr.768 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
HOST-RESOURCES-MIB::hrDeviceDescr.769 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
HOST-RESOURCES-MIB::hrDeviceDescr.770 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
HOST-RESOURCES-MIB::hrDeviceDescr.771 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
HOST-RESOURCES-MIB::hrDeviceDescr.772 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
HOST-RESOURCES-MIB::hrDeviceDescr.773 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
HOST-RESOURCES-MIB::hrDeviceDescr.774 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
HOST-RESOURCES-MIB::hrDeviceDescr.775 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
HOST-RESOURCES-MIB::hrDeviceDescr.1025 = STRING: network interface lo
HOST-RESOURCES-MIB::hrDeviceDescr.1026 = STRING: network interface eth0
HOST-RESOURCES-MIB::hrDeviceDescr.1027 = STRING: network interface eth1
HOST-RESOURCES-MIB::hrDeviceDescr.1028 = STRING: network interface eth0.667
HOST-RESOURCES-MIB::hrDeviceDescr.1029 = STRING: network interface eth1.2
Timeout: No Response from 127.0.0.1

# tail -n 1 /var/log/kern/log
Jun 5 13:21:56 a-test kernel: [153872.673720] snmpd[30700]: segfault at 800003e80 ip 0000000800003e80 sp 00007fff04c2f948 error 14 in libz.so.1.2.3.4[7fedaa541000+17000]

Detailed steps on how to reproduce the problem including exact commands used:
sysctl net.ipv6.conf.default.autoconf=0
sysctl net.ipv6.conf.default.disable_ipv6=1
sysctl net.ipv6.conf.all.autoconf=0
sysctl net.ipv6.conf.all.disable_ipv6=1

ifconfig eth0 up
ifconfig eth1 up
vconfig add eth0 667
vconfig add eth1 2
vconfig add eth1 3
vconfig add eth1 4
vconfig add eth1 5
ifconfig eth0 1.1.1.1 up
ifconfig eth0.667 2.2.2.2 up
ifconfig eth1.2 up
ifconfig eth1.3 up
ifconfig eth1.4 up
ifconfig eth1.5 up
/opt/net-snmp-5.4/sbin/snmpd
snmpwalk -c secret -v2c 127.0.0.1 hrDeviceDescr

Libraries version: openssl 0.9.8o-4squeeze13, zlib1g 1.2.3.4.dfsg-3

stack trace:

(gdb) where
#0 0x0000000800003e80 in ?? ()
#1 0x00007fedabdddef1 in header_hrdevice (vp=0x7fff04c2fe60, name=<value optimized="" out="">, length=0x7fff04c30a88, exact=<value optimized="" out="">,
var_len=<value optimized="" out="">, write_method=<value optimized="" out="">) at host/hr_device.c:155
#2 0x00007fedabdde3a4 in var_hrdevice (vp=0x7fff04c2fe60, name=0x7fff04c30280, length=0x7fff04c30a88, exact=0, var_len=0x7fff04c30a90,
write_method=<value optimized="" out="">) at host/hr_device.c:230
#3 0x00007fedac0b660f in netsnmp_old_api_helper (handler=<value optimized="" out="">, reginfo=<value optimized="" out="">, reqinfo=0x9b6d60, requests=0x9b0cf0)
at old_api.c:286
#4 0x00007fedac2e9c4f in netsnmp_call_handler (reginfo=0x8b9c10, reqinfo=0x9b6d60, requests=0x9b0cf0) at agent_handler.c:435
#5 netsnmp_call_handlers (reginfo=0x8b9c10, reqinfo=0x9b6d60, requests=0x9b0cf0) at agent_handler.c:516
#6 0x00007fedac2db161 in handle_var_requests (asp=0x99a260) at snmp_agent.c:2550
#7 0x00007fedac2dcd66 in handle_pdu (asp=0x99a260) at snmp_agent.c:3346
#8 0x00007fedac2def20 in netsnmp_handle_request (asp=0x99a260, status=<value optimized="" out="">) at snmp_agent.c:3142
#9 0x00007fedac2dfa0a in handle_snmp_packet (op=<value optimized="" out="">, session=<value optimized="" out="">, reqid=<value optimized="" out="">,
pdu=<value optimized="" out="">, magic=<value optimized="" out="">) at snmp_agent.c:1872
#10 0x00007fedabae1318 in _sess_process_packet (sessp=<value optimized="" out="">, sp=0x99a400, isp=0x97dbb0, transport=<value optimized="" out="">, opaque=0x9b0c10,
olength=<value optimized="" out="">, packetptr=0x99f440 "0-\002\001\001\004\006secret\241 \002\004HE\225f\002\001", length=47) at snmp_api.c:5384
#11 0x00007fedabae2085 in _sess_read (sessp=0x97d1d0, fdset=<value optimized="" out="">) at snmp_api.c:5800
#12 0x00007fedabae2959 in snmp_sess_read (sessp=0x7fff04c2fe78, fdset=0x7fedac0a7190) at snmp_api.c:5819
#13 0x00007fedabae29ab in snmp_read (fdset=0x7fff04c30de0) at snmp_api.c:5436
#14 0x0000000000404b29 in receive (argc=<value optimized="" out="">, argv=<value optimized="" out="">) at snmpd.c:1234
#15 main (argc=<value optimized="" out="">, argv=<value optimized="" out="">) at snmpd.c:1038
(gdb) list
410 *
411 * Also successfully EXITs with zero for some options.
412 */
413 int
414 #ifdef WIN32SERVICE
415 SnmpDaemonMain(int argc, TCHAR * argv[])
416 #else
417 main(int argc, char *argv[])
418 #endif
419 {

Discussion

  • Sergey V. Lobanov

    The same problem in 5.7.2.pre1

     
  • Niels Baggesen

    Niels Baggesen - 2012-06-07

    Could you try running it with -Dhost ?

     
  • Sergey V. Lobanov

    root@a-test:~# /opt/net-snmp-5.7.2-pre1/sbin/snmpd -Dhost -Le
    registered debug token host, 1
    Log handling defined - disabling stderr
    Turning on AgentX master support.
    root@a-test:~# NET-SNMP version 5.7.2.pre1

    root@a-test:~#
    root@a-test:~# host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.768
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.768 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.769
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.769 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.770
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.770 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.771
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.771 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.772
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.772 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    (index 773 ....HOST-RESOURCES-MIB::hrDeviceDescr.773
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.773
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.773 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    (index 773 ....HOST-RESOURCES-MIB::hrDeviceDescr.773
    (index 774 ....HOST-RESOURCES-MIB::hrDeviceDescr.774
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.774
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.774 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    (index 773 ....HOST-RESOURCES-MIB::hrDeviceDescr.773
    (index 774 ....HOST-RESOURCES-MIB::hrDeviceDescr.774
    (index 775 ....HOST-RESOURCES-MIB::hrDeviceDescr.775
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.775
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.775 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    (index 773 ....HOST-RESOURCES-MIB::hrDeviceDescr.773
    (index 774 ....HOST-RESOURCES-MIB::hrDeviceDescr.774
    (index 775 ....HOST-RESOURCES-MIB::hrDeviceDescr.775
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1025
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1025 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1026
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1026 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    (index 1027 ....HOST-RESOURCES-MIB::hrDeviceDescr.1027
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1027
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1027 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    (index 1027 ....HOST-RESOURCES-MIB::hrDeviceDescr.1027
    (index 1028 ....HOST-RESOURCES-MIB::hrDeviceDescr.1028
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1028
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1028 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    (index 1027 ....HOST-RESOURCES-MIB::hrDeviceDescr.1027
    (index 1028 ....HOST-RESOURCES-MIB::hrDeviceDescr.1028
    (index 1029 ....HOST-RESOURCES-MIB::hrDeviceDescr.1029
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1029
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1029 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    (index 1027 ....HOST-RESOURCES-MIB::hrDeviceDescr.1027
    (index 1028 ....HOST-RESOURCES-MIB::hrDeviceDescr.1028
    (index 1029 ....HOST-RESOURCES-MIB::hrDeviceDescr.1029
    (index -26639 ....HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524977
    (index -26638 ....HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524978
    (index -26637 ....HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524979
    host/hr_disk: Init_Disk
    host/hr_disk: Next_Disk type 0 of 4
    host/hr_disk: Next_Disk max 12 of type 0
    host/hr_disk: Get_Next_HR_Disk: /dev/hda (0/0)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hda
    host/hr_disk: Get_Next_HR_Disk: /dev/hdb (0/1)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdb
    host/hr_disk: Get_Next_HR_Disk: /dev/hdc (0/2)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdc
    host/hr_disk: Get_Next_HR_Disk: /dev/hdd (0/3)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdd
    host/hr_disk: Get_Next_HR_Disk: /dev/hde (0/4)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hde
    host/hr_disk: Get_Next_HR_Disk: /dev/hdf (0/5)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdf
    host/hr_disk: Get_Next_HR_Disk: /dev/hdg (0/6)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdg
    host/hr_disk: Get_Next_HR_Disk: /dev/hdh (0/7)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdh
    host/hr_disk: Get_Next_HR_Disk: /dev/hdi (0/8)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdi
    host/hr_disk: Get_Next_HR_Disk: /dev/hdj (0/9)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdj
    host/hr_disk: Get_Next_HR_Disk: /dev/hdk (0/10)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdk
    host/hr_disk: Get_Next_HR_Disk: /dev/hdl (0/11)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdl
    host/hr_disk: Next_Disk max 16 of type 1
    host/hr_disk: Get_Next_HR_Disk: /dev/sda (1/0)
    (index 1552 ....host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524977
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524977 0

    root@a-test:~#
    root@a-test:~# tail -n 1 /var/log/kern.log
    Jun 7 19:10:43 a-test kernel: [347097.048779] snmpd[18118]: segfault at 1741540 ip 0000000001741540 sp 00007fff39071eb8 error 15

     
  • Niels Baggesen

    Niels Baggesen - 2012-06-12

    I have a basty feeling ...

    Could you try it once more, with -Dhost,mibII/interfaces, and preferably with the 5.7.2.pre version?
    And I would also like to see the contents of /proc/net/dev, please

     
  • Sergey V. Lobanov

    root@a-test:/var/log# /opt/net-snmp-5.7.2-pre1/sbin/snmpd -Dhost,mibII/interfaces -Le
    registered debug token host, 1
    registered debug token mibII/interfaces, 1
    Log handling defined - disabling stderr
    mibII/interfaces: ETHTOOL_GSET on eth1.4 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.5 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth0 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth0.667 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.2 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.3 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.4 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.5 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth0 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth0.667 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.2 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.3 speed = 0x3e8 -> 1000
    Turning on AgentX master support.
    root@a-test:/var/log# NET-SNMP version 5.7.2.pre1
    /opt/net-snmp-5.7.2-prdmesgmibII/interfaces: ETHTOOL_GSET on eth1.4 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.5 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth0 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth0.667 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.2 speed = 0x3e8 -> 1000
    mibII/interfaces: ETHTOOL_GSET on eth1.3 speed = 0x3e8 -> 1000
    snmpwalk -c secret -v2c 127.0.0.1 hrDeviceDescr
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.768
    HOST-RESOURCES-MIB::hrDeviceDescr.768 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.768 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.769
    HOST-RESOURCES-MIB::hrDeviceDescr.769 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.769 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.770
    HOST-RESOURCES-MIB::hrDeviceDescr.770 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.770 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.771
    HOST-RESOURCES-MIB::hrDeviceDescr.771 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.771 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.772
    HOST-RESOURCES-MIB::hrDeviceDescr.772 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.772 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    (index 773 ....HOST-RESOURCES-MIB::hrDeviceDescr.773
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.773
    HOST-RESOURCES-MIB::hrDeviceDescr.773 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.773 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    (index 773 ....HOST-RESOURCES-MIB::hrDeviceDescr.773
    (index 774 ....HOST-RESOURCES-MIB::hrDeviceDescr.774
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.774
    HOST-RESOURCES-MIB::hrDeviceDescr.774 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.774 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    (index 773 ....HOST-RESOURCES-MIB::hrDeviceDescr.773
    (index 774 ....HOST-RESOURCES-MIB::hrDeviceDescr.774
    (index 775 ....HOST-RESOURCES-MIB::hrDeviceDescr.775
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.775
    HOST-RESOURCES-MIB::hrDeviceDescr.775 = STRING: GenuineIntel: Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.775 0
    (index 768 ....HOST-RESOURCES-MIB::hrDeviceDescr.768
    (index 769 ....HOST-RESOURCES-MIB::hrDeviceDescr.769
    (index 770 ....HOST-RESOURCES-MIB::hrDeviceDescr.770
    (index 771 ....HOST-RESOURCES-MIB::hrDeviceDescr.771
    (index 772 ....HOST-RESOURCES-MIB::hrDeviceDescr.772
    (index 773 ....HOST-RESOURCES-MIB::hrDeviceDescr.773
    (index 774 ....HOST-RESOURCES-MIB::hrDeviceDescr.774
    (index 775 ....HOST-RESOURCES-MIB::hrDeviceDescr.775
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1025
    HOST-RESOURCES-MIB::hrDeviceDescr.1025 = STRING: network interface lo
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1025 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1026
    HOST-RESOURCES-MIB::hrDeviceDescr.1026 = STRING: network interface eth0
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1026 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    (index 1027 ....HOST-RESOURCES-MIB::hrDeviceDescr.1027
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1027
    HOST-RESOURCES-MIB::hrDeviceDescr.1027 = STRING: network interface eth1
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1027 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    (index 1027 ....HOST-RESOURCES-MIB::hrDeviceDescr.1027
    (index 1028 ....HOST-RESOURCES-MIB::hrDeviceDescr.1028
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1028
    HOST-RESOURCES-MIB::hrDeviceDescr.1028 = STRING: network interface eth0.667
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1028 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    (index 1027 ....HOST-RESOURCES-MIB::hrDeviceDescr.1027
    (index 1028 ....HOST-RESOURCES-MIB::hrDeviceDescr.1028
    (index 1029 ....HOST-RESOURCES-MIB::hrDeviceDescr.1029
    host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.1029
    HOST-RESOURCES-MIB::hrDeviceDescr.1029 = STRING: network interface eth1.2
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.1029 0
    (index 1025 ....HOST-RESOURCES-MIB::hrDeviceDescr.1025
    (index 1026 ....HOST-RESOURCES-MIB::hrDeviceDescr.1026
    (index 1027 ....HOST-RESOURCES-MIB::hrDeviceDescr.1027
    (index 1028 ....HOST-RESOURCES-MIB::hrDeviceDescr.1028
    (index 1029 ....HOST-RESOURCES-MIB::hrDeviceDescr.1029
    (index -26639 ....HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524977
    (index -26638 ....HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524978
    (index -26637 ....HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524979
    host/hr_disk: Init_Disk
    host/hr_disk: Next_Disk type 0 of 4
    host/hr_disk: Next_Disk max 12 of type 0
    host/hr_disk: Get_Next_HR_Disk: /dev/hda (0/0)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hda
    host/hr_disk: Get_Next_HR_Disk: /dev/hdb (0/1)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdb
    host/hr_disk: Get_Next_HR_Disk: /dev/hdc (0/2)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdc
    host/hr_disk: Get_Next_HR_Disk: /dev/hdd (0/3)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdd
    host/hr_disk: Get_Next_HR_Disk: /dev/hde (0/4)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hde
    host/hr_disk: Get_Next_HR_Disk: /dev/hdf (0/5)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdf
    host/hr_disk: Get_Next_HR_Disk: /dev/hdg (0/6)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdg
    host/hr_disk: Get_Next_HR_Disk: /dev/hdh (0/7)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdh
    host/hr_disk: Get_Next_HR_Disk: /dev/hdi (0/8)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdi
    host/hr_disk: Get_Next_HR_Disk: /dev/hdj (0/9)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdj
    host/hr_disk: Get_Next_HR_Disk: /dev/hdk (0/10)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdk
    host/hr_disk: Get_Next_HR_Disk: /dev/hdl (0/11)
    host/hr_disk: Get_Next_HR_Disk: can't open /dev/hdl
    host/hr_disk: Next_Disk max 16 of type 1
    host/hr_disk: Get_Next_HR_Disk: /dev/sda (1/0)
    (index 1552 ....host/hr_device: ... get device stats HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524977
    host/hr_device: var_hrdevice: HOST-RESOURCES-MIB::hrDeviceDescr.18446744073709524977 0
    Timeout: No Response from 127.0.0.1

    root@a-test:/var/log# tail -n 1 /var/log/kern.log
    Jun 12 17:30:17 a-test kernel: [771967.103299] snmpd[29527]: segfault at 1b8e570 ip 0000000001b8e570 sp 00007fff0e2c25d8 error 15

    root@a-test:/var/log# cat /proc/net/dev
    Inter-| Receive | Transmit
    face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
    eth1.4: 147033872 3189586 0 0 0 0 0 0 125644517 3406810 0 0 0 0 0 0
    eth1.5: 147018646 3189255 0 0 0 0 0 0 125644397 3406762 0 0 0 0 0 0
    eth0: 237509663 1396293 0 601 0 0 0 0 259784903 1308198 0 0 0 0 0 0
    eth1: 971595042 14833882 0 0 0 0 0 0 713629270 15724761 0 0 0 0 0 0
    lo: 319152468 2684076 0 0 0 0 0 0 319152468 2684076 0 0 0 0 0 0
    eth0.667: 189181923 1112560 0 0 0 0 0 0 248038205 1288785 0 0 0 0 0 0
    eth1.2: 246310566 5217855 0 0 0 0 0 0 210890789 5504184 0 0 0 0 0 0
    eth1.3: 147043532 3189796 0 0 0 0 0 0 125651479 3407005 0 0 0 0 0 0

     
  • Niels Baggesen

    Niels Baggesen - 2012-06-12

    As I cannot readilyreproduce your problem, I cannot be certain, but could you try this patch?

    diff --git a/agent/mibgroup/mibII/interfaces.c b/agent/mibgroup/mibII/interfaces
    index 6804895..2f4fe47 100644
    --- a/agent/mibgroup/mibII/interfaces.c
    +++ b/agent/mibgroup/mibII/interfaces.c
    @@ -1459,7 +1459,7 @@ unsigned int getIfSpeed(int fd, struct ifreq ifr, unsigned
    {
    #ifdef linux
    /** temporary expose internal until this module can be re-written */
    - extern unsigned int
    + extern unsigned long long
    netsnmp_linux_interface_get_if_speed(int fd, const char *name,
    unsigned long long defaultspeed);

     
  • Sergey V. Lobanov

    Unfortunately, after applying this patch, the problem is not solved. I can give you remote access to the server(please let me know your email address)

     
  • Niels Baggesen

    Niels Baggesen - 2012-06-12

    No,I just realised that could not be a fix for it. If you dare let me in, my mail is niels(at)baggesen.net

     
  • Sergey V. Lobanov

    I sent email from sergey -at- lobanov .dot. in, please check your mailbox

     
  • Niels Baggesen

    Niels Baggesen - 2012-06-12

    Thanks for the access! This is a really nasty bug, and I do not immediately know how to fix it.
    It seems that you have been through a lot of experiments creting and deleting network interfaces, and that has made the kernels ifindex grow way beyond what the current snmpd omplementation can handle. It will require some thought to change that implementation.
    Please don't reboot the server in the near future!

     
  • Sergey V. Lobanov

    Please don't reboot the server in the near future!

    ok

     
  • Niels Baggesen

    Niels Baggesen - 2012-06-26

    The current nightly of 5.7-patches, heading for 5.7.2, currently survives on your machine (and the recently released 5,5 and 5,6 rc versions should also).
    How did you end with this setup? have reconfigured its network ingterfaces 33000 times just as an exercise, or are you doing regular work that involves recreating network setup all the time?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks