connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

BindingManager invalidates CASE sessions when it shouldn't

Open tcarmelveilleux opened this issue 2 years ago • 5 comments

Problem

In:

void BindingManager::FabricRemoved(CompressedFabricId compressedFabricId, FabricIndex fabricIndex)
{
    mPendingNotificationMap.RemoveAllEntriesForFabric(fabricIndex);
    mInitParams.mCASESessionManager->ReleaseSessionsForFabric(compressedFabricId);
}

This invalidates session from a place where this should not be done. The behavior of fabric removal in NOC cluster should suffice, and propagate the necessary session eviction.

Proposed Solution

  • Remove ReleaseSessionsForFabric from BindingManager

tcarmelveilleux avatar May 13 '22 17:05 tcarmelveilleux

We still need to to fix this for V1.0.

mrjerryjohns avatar Jun 23 '22 14:06 mrjerryjohns

V1 review: @mrjerryjohns and @tehampson to review and provide justification if this needs to be a v1.0 blocker.

andy31415 avatar Aug 24 '22 17:08 andy31415

Given the recent changes that @tehampson made to pivot OperationalSessionSetup to now just be relevant during CASE establishment only, this isn't a P0 anymore.

When a fabric is removed, two things happen:

  1. CleanupSessionsForFabric is called, which will expire all sessions in the SessionManager for that fabric.
  2. CASESession::OnFabricRemoved will get called, which will terminate any pending session establishment and as a result, terminate any open OperationalSessionSetup instances as well. Consequently, the call to ReleaseSessionsForFabric in BindingManager is just redundant.

mrjerryjohns avatar Aug 26 '22 18:08 mrjerryjohns

Decreased blocking status based on comment from @mrjerryjohns above (Jerry added the p1 flag oringally)

andy31415 avatar Aug 26 '22 18:08 andy31415

Taking off p1 label.

mrjerryjohns avatar Aug 26 '22 21:08 mrjerryjohns

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 25 '23 19:04 stale[bot]

This stale issue has been automatically closed. Thank you for your contributions.

stale[bot] avatar May 04 '23 02:05 stale[bot]