Closed pboothe closed 4 years ago
If a client opens the dangling socket for reading, blocks, and a second uuid-annotator removes it, will the first client exit?
For regular files, the open fd is still valid if a file is removed after open. I'm not sure what would happen for sockets. If the first client does not exit, then that would be a harder to debug problem. Or, perhaps the client should timeout?
Discovered during oncall https://github.com/m-lab/dev-tracker/issues/580
There's a data race in
main()
where it is possible for the annotation socket to be created and then for everything else to crash. Subsequent runs will find that the annotation socket already exists and be unable to make it.We should either fix the race or make the daemon delete the specified socket filename if it already exists.