-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
srvd resilience can fail due to lack of file handles #1821
Comments
It is the spawned isolate which binds the ports and then sends the ports back to the main isolate. The resolution would be for each relay to first spawn its isolate, and only try to acquire the mutex when it has heard back from the spawned isolate. If it acquires the mutex, great, respond to the noports client and all is well. If it does not acquire the mutex then it should kill the isolate. |
@cconstab I've got a fix ready to go for this; the relay now spawns its isolate but has a timeout when awaiting the port pair info. If it doesn't hear back from the spawned isolate within one second, it logs an exception and returns without trying to grab the mutex. One second should be more than enough to avoid having false negatives where the isolate spawns successfully but the main isolate times out while waiting for the spawned to send the port pair info. |
@cconstab FYI in my testing it typically takes about 15ms to spawn the isolate, bind the two ports, send the info to the main isolate, and have the main isolate receive it. |
I believe this is fixed but will leave for @cconstab to verify and close |
Describe the bug
If an srvd cannot get a file handle for a new socket it still grabs the mutex.
Steps to reproduce
Expected behavior
get the socket first then the mutex (if possible) or some way to release the mutex (nasty)
Screenshots
Smartphones
Were you using an atApplication when the bug was found?
srvd
Additional context
No response
The text was updated successfully, but these errors were encountered: