Bug 207403 - Object freed twice in cleanup_net in net/core/net_namespace.c
Summary: Object freed twice in cleanup_net in net/core/net_namespace.c
Status: NEW
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-22 12:47 UTC by Javier Marcet
Modified: 2020-04-22 12:49 UTC (History)
1 user (show)

See Also:
Kernel Version: At least between 4.14 and 5.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg from qemu instance running openwrt (59.20 KB, text/plain)
2020-04-22 12:47 UTC, Javier Marcet
Details
logread from qemu instance running openwrt (108.57 KB, text/plain)
2020-04-22 12:49 UTC, Javier Marcet
Details

Description Javier Marcet 2020-04-22 12:47:34 UTC
Created attachment 288659 [details]
dmesg from qemu instance running openwrt

There is an issue regarding network namespaces on OpenWRT.

There is some locking wrong in kernel's netns subsystem. Starting docker with a bunch of containers is a game of luck, they can start cleanly, but there are good chances the bug is hit, often crashing the entire system. I attach a dmesg grabbed from a qemu instance which shows it clearly.

I have built OpenWRT with a vanilla kernel, and the issue still happens. It might have to do with the special user space tools not used in any other environment. It has been happening for at least between 4.14 and 5.4, and the issue is in the kernel.


I hit it with docker. Using docker-compose, with some image building, after some time I get the oops in the attached dmesg.


I have verified it happens on x86-64 both bare metal and under qemu, with and without preemption, with 1 or several CPUs.

Since I have not seen it in any other environment and you might want to play first hands with it, I am sharing a OpenWRT image ready to use, a little more packed than the official ones, with docker-compose, kgdb, ftrace,... It is for x86-64 efi systems and runs fine under qemu.
https://openwrt.marcet.info/latest/targets/x86/64/

If there is any more info I can provide, please ask.
Comment 1 Javier Marcet 2020-04-22 12:49:07 UTC
Created attachment 288661 [details]
logread from qemu instance running openwrt

Note You need to log in before you can comment on or make changes to this bug.