Removing a network leaks its DNS listener: next network on the same subnet fails with 'dns bind: Address in use'
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- linux, rust
- Domain
- backend, networking
Research direction
Start by tracing how kiri creates and removes networks and manages the DNS listener bound to the gateway address; the issue does not name source files or tests. Check the cleanup path after network removal and after a container start failure, then run the relevant network lifecycle tests. Done means both cases release the listener so another network can bind the same address.
Written by the indexing model from the issue text.
Description
Environment
- Kiri engine 0.2.0, Linux x86-64, kernel 7.3
- Docker Compose with a project that creates its own networks
What happens
After a user-created network has hosted a container and is then removed, kiri keeps the network's DNS listener bound on the gateway address (<subnet>.0.1:53/udp). A new network that gets the same subnet can no longer start any container:
docker: Error response from daemon: run <id>: dns: dns bind: Address in use (os error 98)
I also saw it on a Compose network that had a container fail to start once. After that, every start on that network failed with the same error.
Observed
ss -lun | grep ':53 'still shows172.24.0.1:53afterdocker network rmof the network that used that subnet.- A new network gets
172.21.0.0/16(the lowest free subnet), and every container on it fails withdns bind: Address in use. - Creating an empty placeholder network on the burned subnet makes later networks pick a different subnet, so it is a workaround.
Repro (as observed)
docker network create n1and note its subnet (for example172.24.0.0/16).docker run --rm --network n1 alpine true(works).docker network rm n1.ss -lun | grep '172.24.0.1:53'still shows a listener.docker network create n2. If it gets the same subnet,docker run --rm --network n2 alpine truefails withdns: dns bind: Address in use (os error 98).
I could only confirm step 5 for a subnet whose first container had failed to start; I did not retest it on a clean subnet.
Expected: removing a network releases its DNS listener, and a failed container start does not leave one behind.
- Dominant language
- Rust
- Stars
- 7.5k
- Forks
- 329
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 105
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libracoder/kiri
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
libracoder/kiri#364 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
libracoder/kiri#289 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 47/100
libracoder/kiri#365 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
libracoder/kiri#362 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 47/100
libracoder/kiri#359 ·
Maintainers usually reply within 1 day
Similar issues
-
benchmark-review
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
area:filesystem bug need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Captions panel does not offer to show an existing transcriptPossibly taken @thedavidweng claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CapSoftware/Cap#4276 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
matrix-org/matrix-rust-sdk#7495 ·
Maintainers usually reply within 1 day