Skip to content

Fix orchagent crash when destroying MuxAclHandler after AclOrch - #4909

Closed
harjotsinghpawra wants to merge 1 commit into
sonic-net:masterfrom
harjotsinghpawra:mux_acl_handler_bad_destructor
Closed

harjotsinghpawra wants to merge 1 commit into
sonic-net:masterfrom
harjotsinghpawra:mux_acl_handler_bad_destructor

Conversation

@harjotsinghpawra

Copy link
Copy Markdown

Description of PR

Fixes an orchagent crash during shutdown when MuxAclHandler objects are
destroyed after AclOrch.

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation update
  • Test improvement

Approach

What is the motivation for this PR?

MuxAclHandler attempted to access the global AclOrch instance after
AclOrch had already been destroyed. It could also throw when the expected
MUX ACL rule was unavailable during teardown.

How did you do it?

  • Clear gAclOrch from AclOrch destructor.
  • Skip ACL unbinding when AclOrch is already destroyed.
  • Log and skip unbinding when the ACL rule is missing instead of throwing.
  • Add a regression test for Mux teardown after ACL orchestrator destruction.

How did you verify/test it?

30c6ea5ff0e0:/sonic/src/sonic-swss/tests/mock_tests$ ./tests --gtest_filter='MuxRollbackTest.MuxTeardownAfterAclOrchDestructionIsSafe'
Running main() from ./googletest/src/gtest_main.cc
Note: Google Test filter = MuxRollbackTest.MuxTeardownAfterAclOrchDestructionIsSafe
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from MuxRollbackTest
[ RUN ] MuxRollbackTest.MuxTeardownAfterAclOrchDestructionIsSafe
[ OK ] MuxRollbackTest.MuxTeardownAfterAclOrchDestructionIsSafe (161 ms)
[----------] 1 test from MuxRollbackTest (161 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (161 ms total)
[ PASSED ] 1 test.

Any platform specific information?

N/A

Documentation

Signed-off-by: Harjot Singh <harjotpawrawork@gmail.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@Ndancejic

Copy link
Copy Markdown
Contributor

Hi @harjotsinghpawra, there is a PR that addresses this already. Please help review/test to confirm this fix works for you. #4830

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

@prsunny

prsunny commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Closing this in favor of #4830

@prsunny prsunny closed this Sep 22, 2026
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.

4 participants