开发者社区> 问答> 正文

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

鲁二哥 2016-03-23 23:33:32 25390

用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
Linux Go API 网络安全 开发工具 git Docker 容器
分享到
取消 提交回答
全部回答(4)
  • think_time
    2019-07-17 18:35:32

    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.

    0 0
  • 分生
    2019-07-17 18:35:32

    求解决....

    0 0
  • mengz
    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 控制打开,报这个错

    0 0
  • 小易1246
    2019-07-17 18:35:32

    其他服务器也有这种情况吗

    0 0
添加回答

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题
推荐课程