Repository navigation
listen: a connection does not hold the listener's announcement - #1140
Merged
Merged
Conversation
authenticatedcommand forked the listener's fd table, so each
connection's process kept the announcement's ctl and listen files for as
long as it lasted. A listen killed and started again on the same address
was refused ("address in use") until every connection it had made ended,
and the address stayed announced with nothing taking its connections:
clients' mounts waited for ever. Found restarting a Raspberry Pi's
video service while a Jetson kept its mount.
The connection now starts with a table holding only 0, 1, 2 and its own
data and ctl files, made before the shell context is copied (the copy
opens its wait file there). tests/host/listen_announce_test.sh fails
without it as the Pi did.
…to the changelog PR # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each authenticated connection listen(1) made forked the listener's fd table, so it kept the announcement's ctl and listen files for as long as it lasted. A listen killed and started again on the same address was refused (
address in use) until every connection it had made ended. Meanwhile the address stayed announced with nothing taking its connections, so clients' mounts hung.Found while recording the vision demo: the Raspberry Pi 5's video service could not be restarted while the Jetson kept its mount of it.
appl/cmd/listen.b: the connection starts with a table holding only 0, 1, 2 and its own data and ctl files. The table is made before the shell context is copied, because the copy opens its wait file there.tests/host/listen_announce_test.sh(in CI's host list): with a connection open, listen is killed and started on the same address again. The new listen takes a connection and the old connection still works. Against the old listen it fails withfailed to announce ... Address already in use, as the Pi did.listen_rate_fairness_teststill passes.