[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANaxB-xvAYaeb90HsO45vC3yQoGHaXnqQO_6SkRiRfo45R9y0A@mail.gmail.com>
Date: Fri, 23 Jun 2017 14:49:58 -0700
From: Andrei Vagin <avagin@...il.com>
To: Linux Kernel Network Developers <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux Containers <containers@...ts.linux-foundation.org>
Subject: unregister_netdevice: waiting for lo to become free. Usage count = 1
Hello Everyone,
Today I've met a problem, when any attempts to create a new network
namespace hang up.
I see that one of previous namespaces can't be destroyed, because a
usage count for one
of its devices isn't zero. To reproduce the problem, you need to
executed an attached program
in a separate network namespace:
[root@...4 net]# cat run.sh
ip link set up dev lo
./tcp-bug
[root@...4 net]# unshare -n sh run.sh
[root@...4 net]# echo $?
0
[root@...4 ~]# cat /proc/40/stack
[<ffffffffa211989e>] msleep+0x3e/0x50
[<ffffffffa2786eea>] netdev_run_todo+0x12a/0x320
[<ffffffffa279542e>] rtnl_unlock+0xe/0x10
[<ffffffffa277d56a>] default_device_exit_batch+0x14a/0x170
[<ffffffffa2772d12>] ops_exit_list.isra.6+0x52/0x60
[<ffffffffa277402e>] cleanup_net+0x1ee/0x2f0
[<ffffffffa20ac9f5>] process_one_work+0x205/0x620
[<ffffffffa20ace5e>] worker_thread+0x4e/0x3b0
[<ffffffffa20b4344>] kthread+0x114/0x150
[<ffffffffa29619fa>] ret_from_fork+0x2a/0x40
[<ffffffffffffffff>] 0xffffffffffffffff
[root@...4 ~]# dmesg | tail
[ 97.071533] unregister_netdevice: waiting for lo to become free.
Usage count = 1
[ 97.079561] systemd-journald[180]: Sent WATCHDOG=1 notification.
[ 107.319260] unregister_netdevice: waiting for lo to become free.
Usage count = 1
[ 117.567180] unregister_netdevice: waiting for lo to become free.
Usage count = 1
[ 127.807401] unregister_netdevice: waiting for lo to become free.
Usage count = 1
[ 138.055324] unregister_netdevice: waiting for lo to become free.
Usage count = 1
[ 148.303308] unregister_netdevice: waiting for lo to become free.
Usage count = 1
[ 158.559118] unregister_netdevice: waiting for lo to become free.
Usage count = 1
[ 168.807423] unregister_netdevice: waiting for lo to become free.
Usage count = 1
[ 179.055590] unregister_netdevice: waiting for lo to become free.
Usage count = 1
This program creates a server tcp socket, then it creates a pair of
connected tcp sockets
and then it does actions which trigger this problem. It calls
connect() with AF_UNSPEC
for one of connected sockets and then call connect() with the address
of the server socket.
Thanks,
Andrei
View attachment "tcp-bug.c" of type "text/x-csrc" (4384 bytes)
Powered by blists - more mailing lists