开发者社区> 问答> 正文

kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1

用ssh登录阿里云centos7主机,过一会儿会自动出现以下信息:

[root@i1234567890 ~]# 
Message from syslogd@i1234567890 at Mar 23 22:45:52 ...
 kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1

在这个信息中,我这里按ctrl+c可以退回到[root@i1234567890 ~]# 提示符。想问问这个信息是什么意思?

百度了一下,好像遇到此问题的人挺多:
http://serverfault.com/questions/650377/linux-kernel-bug-w-netns-and-or-xen-guest-unregister-netdevice-waiting-for
https://github.com/docker/docker/issues/5618
但从两个帖子中没看到解决办法,只说这是bug?

操作系统信息如下:

发行版本:

[root@i1234567890 ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:    CentOS
Description:    CentOS Linux release 7.2.1511 (Core) 
Release:    7.2.1511
Codename:    Core

内核版本:

[root@i1234567890 ~]# uname -a
Linux i1234567890 4.4.5-1.el7.elrepo.x86_64 #1 SMP Thu Mar 10 11:45:51 EST 2016 x86_64 x86_64 x86_64 GNU/Linux

好像跟Docker有关,Docker版本:

[root@i1234567890 ~]# docker version  
Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:39:25 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:39:25 2016
 OS/Arch:      linux/amd64

展开
收起
鲁二哥 2016-03-23 23:33:32 42103 0
4 条回答
写回答
取消 提交回答
  • kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1
    SOLUTION VERIFIED - Updated July 6 2017 at 10:42 AM - English
    Environment
    Red Hat Enterprise Linux 7.4 or earlier
    TCP connection over loopback interface lo
    Issue
    kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1
    Above message is logged constantly on console or in dmesg or /var/log/messages file or in systemd journal
    Resolution
    Update to RHEL 7.5 when available.

    Root Cause
    A bug resulted in the loopback device having a reference count which was increased but never decreased.

    This was resolved by upstream patch tcp: reset sk_rx_dst in tcp_disconnect() in Linux Kernel v4.12 and backported to RHEL 7.5 on Red Hat Private Bug 1467770.

    Diagnostic Steps
    Use the reproducer described at unregister_netdevice: waiting for lo to become free. Usage count = 1

    Run it in a netns once and delete the netns:

    Raw
    make tcp-bug
    ip netns add test1
    ip netns exec test1 ip link set dev lo up
    ip netns exec test1 ./tcp-bug
    ip netns del test1
    In the error condition kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1 is printed on console and in dmesg.

    In the working condition, no error is printed and the netns is successfully deleted.

    2019-07-17 18:35:32
    赞同 展开评论 打赏
  • 求解决....

    2019-07-17 18:35:32
    赞同 展开评论 打赏
  • 我也遇到一样的问题,

    $ cat /etc/os-release 
    NAME="Ubuntu"
    VERSION="14.04.5 LTS, Trusty Tahr"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 14.04.5 LTS"
    VERSION_ID="14.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    
    $ uname -a
    Linux yt-imd-03 4.4.0-46-generic #67~14.04.1-Ubuntu SMP Fri Oct 21 16:04:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    
    $ docker --version
    Docker version 1.12.2, build bb80604

    内存很快被撑满,然后无法ssh上去,系统就挂住了,使用web 控制打开,报这个错

    2019-07-17 18:35:32
    赞同 展开评论 打赏
  • 其他服务器也有这种情况吗

    2019-07-17 18:35:32
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
KR^X- Comprehensive- Kernel-Protection-Against-Just-In-Time-Code-Reuse 立即下载
WHY"FREE" AND"TRIAL" ARE THE N 立即下载
SPEED MATTERS:HOW TO PROCESS B 立即下载