-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implementation leaks still there (2.0.0) #51
Comments
@Zinggi could you create a test repo that can easily reproduce this issue? |
Yeah, that's the least I can do. |
@oohnoitz Sample log output:
Hope it helps. I might still be able to reply while on vacation, but I won't be able to do any coding |
Had some time to do a bit more digging. It's definitely a timeout issue, with a few other things. Timeous are definitely awkward with the way GenServer works and still a bit confusing for me. Even though we have a timeout specified for https://hexdocs.pm/elixir/GenServer.html#call/3-timeouts has some details about the caller doing this. Though, we don't really want to have developers handle the discarding of that message in their code. Would need to mess with some other timeout values and combinations to be sure. I have this working branch: 20f3c47 which does seem to solve the issue? But would need some more testing to make sure this is a good solution. |
Thanks for looking into it. However, maybe we also need a timeout on the JS side, since without it our next calls to the same worker would be blocked without canceling the previous call. This could be done with |
Hey there |
Oh no, I made it worse 😱
It looks like my PR that was supposed to get rid of implementation leaks introduced some new ones.
I should have tested my changes thoroughly with our production code...
It looks like my
GenServer
that callsNodeJS.call(..)
is sometimes getting back the messages sent by Port:Also, I'm still getting the timeout messages in my mailbox:
I suspect some race condition with timeouts...
Also, we might need to add a wrapper GenServer that catches all these messages such that the caller is truly isolated from the worker process.
Unfortunately I wont have much time to investigate exactly when and how it happens, as I'm soon leaving for vacations.
Otherwise I would solve it myself and contribute the solution.
I feel obliged to fix it, but I won't have the time (earliest after ca. 4 weeks).
I'm terribly sorry about that.
The text was updated successfully, but these errors were encountered: