Skip to content

Fix netlink buffer overflow for concurrent TCMU#399

Merged
liulanzheng merged 1 commit intocontainerd:mainfrom
robertlandlord:concurrent-tcmu-netlink-buffer
Apr 15, 2026
Merged

Fix netlink buffer overflow for concurrent TCMU#399
liulanzheng merged 1 commit intocontainerd:mainfrom
robertlandlord:concurrent-tcmu-netlink-buffer

Conversation

@robertlandlord
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

With default libnl3 buffer size (32kb) and NETLINK_S_CONGESTED flag, creating >50 TCMU devices in parallel causes kernel hangs and devices to never be set up. This is because the genlmsg_multicast_allns() notifications are silently dropped from a full buffer. This fix increases the buffer size and also prevents a single buffer-full event from poisoning subsequent deliveries into the buffer.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #398

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

With default libnl3 buffer size (32kb) and NETLINK_S_CONGESTED flag,
creating >50 TCMU devices in parallel causes kernel hangs and devices
to never be set up. This is because the genlmsg_multicast_allns()
notifications are silently dropped from a full buffer. This fix
increases the buffer size and also prevents a single buffer-full
event from poisoning subsequent deliveries into the buffer.

See: containerd#398 for details

Signed-off-by: Robert Landlord <robertlandlord1@gmail.com>
@liulanzheng liulanzheng merged commit 9417de0 into containerd:main Apr 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

overlaybd-tcmu hangs permanently when creating 50+ devices concurrently due to netlink multicast drops

2 participants