Unix Socket SigInt fails resource cleanup
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 2.5k
- Forks
- 636
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 7
Description
Most Recent version.
https://gist.github.com/ChristopherDavenport/2c7eb99d454335b156b5db6f5f4d0fc2
Summary: When calling a unix socket and the application is terminated via a SigInt, I would expect resource finalizers to work. Instead it appears that the jvm may somehow already have killed the socket and when the resource finalizers run that the unix socket is already dead.
On the Server side of this example, when a SigInt is sent, you will see only hello is received, but no goodbye.
For context on why this is important. I discovered this when working with external side-effects. I was making a resource out of starting and stopping a docker container. But since the finalizer isn't called, the docker container is not being turned off.
Contributor guide
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.
Research direction
Start with the linked gist and reproduce the Unix socket example, focusing on the server behavior when a SigInt is sent. Trace whether the resource finalizer runs and whether the socket remains available long enough to send the goodbye message; done means cleanup occurs reliably during termination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100