linux - unregister_netdevice : waiting for eth1 to become free?

标签 linux networking

我用vconfig创建了两个vlan,phy0.1和phy0.2 并更改他们的名字,

ip link set dev phy0.1 name eth0  (for Router lan)
ip link set dev phy0.2 name eth1. (for Router wan).

现在,出于某种目的,我必须 rem phy0.1
但是,当我通过以下命令删除 eth1 时,

ifconfig eth1 down
vconfig rem eth1.

它不能很好地工作,并得到下面的消息,

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

现在如何找出正在使用 eth1 的进程。
或者,是否有任何其他方法可以移除 eth1

最佳答案

这看起来像 When the blue whale sinks 在“Bernardo Donadio ”中描述的内容,并报告initially in 2014 in a docker context

This issue isn’t present in the Docker code itself, but rather in the Linux kernel code instead.
It affects not only Docker, but any kind of software that uses the Linux network stack to create devices and namespaces frequently like LXC, OpenStack, Rkt, Proxmox, etc…

If you’ve already had some experience with multi-thread programming, you can instantly diagnose this as a race condition

Once the bug is triggered, the situation now is the following: you’re unable to create, delete or change any network device in the whole system.
There’s absolutely no fix to the bug so far, except a few mitigations and the Windows-style workaround: reboot your computer. Seriously.

Worse even is the fact that reproducing this issue is far from straightforward.
The Red Hat kernel (including CentOS) seems to be specially more prone to suffer from this problem, but all other distributions have reports of also being affected.

As of the time of this publication (July 2017), a fix has already been released (kernel 4.8) to the issue being encountered by hitting the bug in the IPv6 stack, but people are still get the annoying message and frozen behaviour, suggesting that the bug has multiple causes, spread all over the network subsystem of the kernel.

关于linux - unregister_netdevice : waiting for eth1 to become free?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30114255/

相关文章:

c - APUE 对 linux 线程的描述有误吗?

c++ - P2P 连接的 NAT 穿越实现

windows - windows 下的tipc协议(protocol)

networking - Docker 将 LXC 与直接主机网络结合使用

linux - 如何确定纯系统文件系统?

linux - 有效的 shell 脚本输入日期格式

c++ - 如何在通过 Wine(同一台计算机)运行的 linux 程序和 windows 程序之间共享内存?

linux - 在 Slackware 上通过 shellscript 更改 IP 地址

docker - 无法从 docker 容器连接到另一个。连接被拒绝

ios - iOS上的对讲机