Skip to content

Hub startup BuildupAction fails with HubDisposingException when parent teardown races initialization — hub marked FAILED for an expected shutdown race #5592

Description

@systemorph-com

What is failing

During startup of the mkleiner/_Install/SocialMedia plugin hub, the DataExtensions.StartDataSourcesAndOpenGate BuildupAction faulted because the SynchronizationStream constructor refused to bind: the host hub was already shutting down (HubDisposingException: Hub ... is shutting down — cannot create 'MeshNode'). The hub was consequently put in FAILED state and logged at fail level, even though the underlying condition is an expected teardown/init race on a hub that was going away anyway.

Probable cause (medium confidence)

This is the constructor refusal path added by the stream-liveness work (Stream Liveness and the Hub Reference, #3321 step 3): when the hub is already past accepting RegisterForDisposal registrants, it disposes the release hook inline and the SynchronizationStream constructor re-checks and refuses with HubDisposingException (src/MeshWeaver.Data/Serialization/SynchronizationStream.cs, ctor / ReleaseHub() branch). Here the parent (portal circuit or recycle) tore down the hub while its data-source initialization was still in flight — DataContext.InitializeDataSources() → SynchronizationStream ctor hit the refusal. The exception is deliberately classified transient (ErrorType.ShuttingDown, “the address may reactivate; retry”), but HandleInitialize treats any BuildupAction fault as a hard initialization failure and marks the hub FAILED. So the defect is arguably in the error handling: a disposal-in-progress refusal during init should not be surfaced as a hub-initialization failure.

Impact

One occurrence on one pod (memex-portal-deployment-…-mvzb5), one timestamp. The hub was being disposed regardless, and the exception itself tells callers to retry. No data loss, no user-visible path affected — this is noise-shaped but a real classification gap worth a cheap fix.

Where to look

src/MeshWeaver.Data/Serialization/SynchronizationStream.cs (constructor refusal / ReleaseHub()), reached from DataContext.InitializeDataSources() via DataExtensions.StartDataSourcesAndOpenGate (see Initialization Gates and Hub Initialization Failure). Consider catching/absorbing HubDisposingException in the BuildupAction path when the hub is already disposing, instead of failing initialization.

No existing issue or incident covers this exact shape; the closest related work is the stream-liveness program (#3321/#3380/#3386), all closed.


Evidence

Fingerprint 6f9895a929bc8b1b
Category MeshWeaver.Messaging.MessageHub
Severity Error
Exception MeshWeaver.Messaging.HubDisposingException
Top frame MeshWeaver.Data.Serialization.SynchronizationStream1..ctor(StreamIdentity StreamIdentity, IMessageHub Host, Object Reference, ReduceManager1 ReduceManager, Func2 configuration)`
Namespace memex-cloud
Pods memex-portal-deployment-7d7f4d84f9-mvzb5
Occurrences 1
First seen 2026-09-23 17:50:06Z
Last seen 2026-09-23 17:50:06Z
Routing not determined — no configured route matches the category MeshWeaver.Messaging.MessageHub. This repository is the configured fallback, not a finding about who owns the fault; the category names the LOGGER, which may not be the subject.
Recent log lines
2026-09-23 17:50:06Z memex-portal-deployment-7d7f4d84f9-mvzb5 fail: MeshWeaver.Messaging.MessageHub[0]
      Hub mkleiner/_Install/SocialMedia initialization failed — BuildupAction 1 of 2 (DataExtensions.StartDataSourcesAndOpenGate) faulted (HubDisposingException: Hub mkleiner/_Install/SocialMedia is shutting down — cannot create "MeshNode". The address may reactivate (recycle / restart); retry to get the authoritative answer.
      Object name: 'mkleiner/_Install/SocialMedia'.). Hub is now in FAILED state.
      MeshWeaver.Messaging.HubDisposingException: Hub mkleiner/_Install/SocialMedia is shutting down — cannot create "MeshNode". The address may reactivate (recycle / restart); retry to get the authoritative answer.
      Object name: 'mkleiner/_Install/SocialMedia'.
         at MeshWeaver.Data.Serialization.SynchronizationStream`1..ctor(StreamIdentity StreamIdentity, IMessageHub Host, Object Reference, ReduceManager`1 ReduceManager, Func`2 configuration) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Data/Serialization/SynchronizationStream.cs:line 1383
         at MeshWeaver.Data.DataContext.InitializeDataSources() in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Data/DataContext.cs:line 365
         at MeshWeaver.Data.DataExtensions.<>c__DisplayClass5_0.<StartDataSourcesAndOpenGate>b__0() in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Data/DataExtensions.cs:line 130
         at System.Reactive.Linq.ObservableImpl.Defer`1._.Run()

Opened automatically from Admin/_LogIncident/6f9895a929bc8b1b. Recurrences are folded into this issue rather than opening new ones.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsev:LLow - cosmetic, rare edge case, or developer-only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions