In RemotingTerminator, avoid racy FSM log init.#7967
Conversation
RemotingTerminator is initialized during Provider Start. FSM constructor initializes the _log with `context.GetLogger()` which eventually leads into `LogSource.FromActorRef()`. This method attempts to access `Provider.DefaultAddress`, which is being initialized. If Provider `Init()` loses the race, either its `RemoteInternals` is not set, causing NRE, or if `Remoting.Start()` is not completed, the `_defaultAddress` is not set and returns null. This commit removes the FSM from `RemotingTerminator` and manually implements it using `Become()` API.
|
I don't see this fixing anything, it's just replacing |
|
Looks like AI slop to me |
It's 100% human labor. AI doesn't give a heck about caught exceptions. I do since I need to configure the debugger to ignore this same error every time I create a new project. This has been my pet peeve for years, and finally decided to do something about it. If you are worried I'm trying to make a name for myself or something silly, please do edit the author field as needed.
As it says, it removes the use of As mentioned in the issue: "RemotingTerminator inherits from |
|
@gunjambi my apologies - it just looked like a drive-by PR with an AI-generated branch name to me. |
|
Let me do a review here and see what I can see |
|
@gunjambi this looks good - truly, my sincere apologies for being too quick to judge earlier |
…et#7967) RemotingTerminator is initialized during Provider Start. FSM constructor initializes the _log with `context.GetLogger()` which eventually leads into `LogSource.FromActorRef()`. This method attempts to access `Provider.DefaultAddress`, which is being initialized. If Provider `Init()` loses the race, either its `RemoteInternals` is not set, causing NRE, or if `Remoting.Start()` is not completed, the `_defaultAddress` is not set and returns null. This commit removes the FSM from `RemotingTerminator` and manually implements it using `Become()` API. Co-authored-by: Aaron Stannard <aaron@petabridge.com>
RemotingTerminator is initialized during Provider Start. FSM constructor initializes the _log with `context.GetLogger()` which eventually leads into `LogSource.FromActorRef()`. This method attempts to access `Provider.DefaultAddress`, which is being initialized. If Provider `Init()` loses the race, either its `RemoteInternals` is not set, causing NRE, or if `Remoting.Start()` is not completed, the `_defaultAddress` is not set and returns null. This commit removes the FSM from `RemotingTerminator` and manually implements it using `Become()` API. Co-authored-by: Aaron Stannard <aaron@petabridge.com>
Fixes #7966
Changes
This PR removes the use of FSM from
RemotingTerminatorand manually implements it usingBecome()API.