Commit d6daa582 authored by sevenuz's avatar sevenuz
Browse files

client: register the provider-0 variant of every RPC at engine setup

thallium's rpc.on(endpoint) forwards with provider id 0. Margo registers
that provider variant lazily inside the first forward
(margo_provider_iforward_internal: HG_Registered, then register) without
a lock. Concurrent first forwards from several FUSE threads register it
twice ('Overwriting RPC callback/data'), and a handle of another thread
then fails with 'HG_Forward() Could not get proc info' / HG_FAULT. This
is the cause of MN5 bug 4 (short reads / EOF prematurely, EBUSY writes),
and every additional RPC engine opens the window once more per tag.

add_rpc_engine now registers the provider-0 variant of every
pre-defined tag with the procs of the base registration, while the
client is still single-threaded.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VotrDxGfCTADQU5bfhXBjD
parent 12ed1aa1
Loading
Loading
Loading
Loading