我有一台配有Intel(R)Xeon(R)CPU L5420 @ 2.50GHz的Dell 1U服务器,运行x86_64上运行Ubuntu Server Kernel Version 3.13.0-32-generic的8个内核。 它有双1000baseT网卡。 我把它设置为从eth0转发数据包到eth1。
我注意到,在我的kern.log文件中,它一直挂着然后rest。 这经常发生。 这种情况每隔几秒钟发生一次,也许几分钟后就可以回到每隔几秒钟。
这是日志文件转储:
[118943.768245] e1000e 0000:00:19.0 eth0: Detected Hardware Unit Hang: [118943.768245] TDH <45> [118943.768245] TDT <50> [118943.768245] next_to_use <50> [118943.768245] next_to_clean <43> [118943.768245] buffer_info[next_to_clean]: [118943.768245] time_stamp <101c48d04> [118943.768245] next_to_watch <45> [118943.768245] jiffies <101c4970f> [118943.768245] next_to_watch.status <0> [118943.768245] MAC Status <80283> [118943.768245] PHY Status <792d> [118943.768245] PHY 1000BASE-T Status <7800> [118943.768245] PHY Extended Status <3000> [118943.768245] PCI Status <10> [118944.780015] e1000e 0000:00:19.0 eth0: Reset adapter unexpectedly
这里是ethtool的信息:
设置:
Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: off (auto) Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000007 (7) drv probe link Link detected: yes
司机信息:
ethtool -i eth0 driver: e1000e version: 2.3.2-k firmware-version: 1.4-0 bus-info: 0000:00:19.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no
什么可能导致这个? 这只是一个软件错误或实际的硬件问题? 我见过很多其他类似的问题,但没有真正的解决scheme,这也让我相信它是一个软件问题?
也许有人可以为我阐明这一点?
那么昨天晚上发布这个问题后,我继续做一些研究,我遇到的唯一真正的解决scheme似乎已经解决了这个问题。
使用ethtool禁用TSO,GSO和GRO:
ethtool -K eth0 gso off gro off tso off
根据这里发现的post: http : //ehc.ac/p/e1000/bugs/378/
根据我的理解,这可能会导致性能下降。
我还注意到另一个解决scheme是禁用主动状态电源pipe理
pcie_aspm=off
根据这个post在serverfault: Linux e1000e(英特尔networking驱动程序)问题嘉豪,我从哪里开始?
我还没有尝试过这个解决scheme。 我会尝试一下,看看是否有所作为,并发回我的调查结果。
编辑:
好吧,我已经尝试closures活动状态电源pipe理,pcie_aspm =closures,这没有任何作用。 我继续注意到我的日志文件中有错误。
这可能对某些人仍然有效,因为某些Intel nics在启用电源pipe理时遇到不同内核入睡的问题。
在BIOS中禁用增强型C1(C1E)为我解决了这个问题。
不知道C1E的低功耗状态是否与驱动程序混淆,或者处理器处于这种状态时驱动程序中是否有哎呀。
无论如何,问题解决了。
尝试更新你的驱动。 不知道Ubuntu在哪里,或推荐什么版本,但对于CentOS或EL 6,它是:
我有这个问题(触发相同的内核错误和用户空间SSH错误,如“ Corrupted MAC on input
”)。
我的工作是禁用TCP校验和卸载:
# ethtool -K eth0 tx off rx off
这与debian-ish / etc / network / interfaces的清洁和长期整合:
#!/bin/bash # # Disables TCP offloading on all ifaces # # Inspired by: @Michelunik https://serverfault.com/a/422554/62953 RUN=true case "${IF_NO_TOE,,}" in no|off|false|disable|disabled) RUN=false ;; esac # Other offloading options that could be disabled (not TCP related): # sg tso ufo gso gro lro rxvlan txvlan rxhash # see man ethtool if [ "$MODE" = start -a "$RUN" = true ]; then TOE_OPTIONS="rx tx" for TOE_OPTION in $TOE_OPTIONS; do /sbin/ethtool --offload "$IFACE" "$TOE_OPTION" off &>/dev/null || true done fi
来源 , 灵感 。
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-V (rev 04)