Skip to content

Conversation

@bcherry
Copy link
Contributor

@bcherry bcherry commented Feb 4, 2025

if your handler returned very quickly it was possible to send the invocation response back over FFI before the waiter was stored, resulting in error sending rpc method invocation response: No caller found on the handler side and a Response timeout on the caller side.

easy fix, and verified by running a test script in python with 100 calls to immediate-return handlers. in main i saw a failure rate of 11% and no errors at all with this branch. it didn't seem to matter whether the handlers were marked sync or not on the python side.

@ilo-nanpa
Copy link
Contributor

ilo-nanpa bot commented Feb 4, 2025

it seems like you haven't added any nanpa changeset files to this PR.

if this pull request includes changes to code, make sure to add a changeset, by writing a file to .nanpa/<unique-name>.kdl:

minor type="added" "Introduce frobnication algorithm"

refer to the manpage for more information.

@bcherry bcherry merged commit 7da4bc7 into main Feb 4, 2025
5 checks passed
@bcherry bcherry deleted the bcherry/rpc-invoke-race branch February 4, 2025 21:57
rileyseaburg pushed a commit to Evolving-Software/livekit-rust-sdks that referenced this pull request Feb 19, 2025
* Fix race condition in rpc invocation

* nanpa

* fix

* nanpa

* cgo

* sm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants