Skip to content

Fix issue #26776: missing /zmq_swss directory causes orchagent crash - #26844

Merged
baxia-lan merged 1 commit into
sonic-net:masterfrom
Allen-John-ML:zmq_swss
Apr 30, 2026
Merged

baxia-lan merged 1 commit into
sonic-net:masterfrom
Allen-John-ML:zmq_swss

Conversation

@Allen-John-ML

@Allen-John-ML Allen-John-ML commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Issue: missing /zmq_swss directory causes orchagent crash

Why I did it

After sonic-net/sonic-swss#4243 was merged (around 2026-04-01), orchagent uses ZMQ with IPC sockets for P4 orchestration. These sockets are bound to paths like ipc:///zmq_swss/p4orch_zmq_swss_ep.
On real SONiC systems: The /zmq_swss directory is bind-mounted into the swss container from the host filesystem via the docker run configuration in rules/docker-orchagent.mk.
On docker-sonic-vs: The container runs standalone (e.g., via containerlab) without a host bind mount, so the /zmq_swss directory doesn't exist. When orchagent tries to bind to the ZMQ IPC endpoint, zmq_bind() fails with errno 2 (No such file or directory), causing orchagent to abort.

How I did it

I've added a directory creation step in the docker-sonic-vs Dockerfile:
File: platform/vs/docker-sonic-vs/Dockerfile.j2
Change: Added lines 171-173 to create the /zmq_swss directory:

How to verify it

The workaround mentioned in the issue (manually creating the directory and restarting) confirms this fix will work:
docker exec mkdir -p /zmq_swss
docker exec supervisorctl
restart start.sh

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
    Reason for backporting: docker-sonic-vs crashes on startup due to missing /zmq_swss directory. This bug affects
    stable releases as well, so backporting ensures docker-sonic-vs runs correctly on those branches.

Tested branch (Please provide the tested image version)

  • 20200712

Description for the changelog

PR#26776 under sonic-net repo. Added lines 171-173 to create the /zmq_swss directory to ensure that the directory exists inside the container filesystem, allowing orchagent to successfully bind to its ZMQ IPC endpoints and start properly.

Link to config_db schema for YANG module changes

N/A

A picture of a cute animal (not mandatory but encouraged)

╱|、
(˚ˎ 。7
|、˜〵
じしˍ,)ノ

@Allen-John-ML
Allen-John-ML requested a review from lguohan as a code owner April 16, 2026 20:42
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@linux-foundation-easycla

linux-foundation-easycla Bot commented Apr 16, 2026

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Allen-John-ML / name: Allen John (763fe95)

@azure-pipelines

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

@Allen-John-ML

Copy link
Copy Markdown
Contributor Author

/azpw run

@mssonicbld

Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1090818:

✅Stage Test:

  • Job impacted-area-kvmtest-multi-asic-t1 by Elastictest: retried.
  • Job impacted-area-kvmtest-t2 by Elastictest: retried.
  • Job impacted-area-kvmtest-t1-lag by Elastictest: retried.

@Allen-John-ML

Copy link
Copy Markdown
Contributor Author

/azpw retry

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1090818:

✅Stage Test:

  • Job impacted-area-kvmtest-t2 by Elastictest: retried.
  • Job impacted-area-kvmtest-multi-asic-t1 by Elastictest: retried.

@sreeiyer-1

Copy link
Copy Markdown
Contributor

@Allen-John-ML - for DCO, please use "--signoff" with git commit

…nt crash

Signed-off-by: Allen John <Allen.John@xoriant.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

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

@Allen-John-ML

Copy link
Copy Markdown
Contributor Author

/azpw retry

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1096283:

✅Stage Test:

  • Job impacted-area-kvmtest-t0 by Elastictest: retried.

@sreeiyer-1

Copy link
Copy Markdown
Contributor

@arlakshm - for review and approval.

@sreeiyer-1

Copy link
Copy Markdown
Contributor

@arlakshm - can you please review or suggest someone can review.

@Allen-John-ML

Copy link
Copy Markdown
Contributor Author

@lguohan Hi. Could you please review this PR?

@baxia-lan
baxia-lan merged commit 83a1333 into sonic-net:master Apr 30, 2026
27 checks passed
@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request for branches: 202305,202311,202405,202411,202505,202511.
Adding label(s) for branch(es) 202305,202311,202405,202411,202505,202511.

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

The change is not in 202305 yet. @Allen-John-ML, please manually create the cherry pick PR for branch 202305.
You can ping the release branch owner(github account: ) to approve your cherry pick PR.
If this change is already in 202305, please comment "already in 202305". Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

The change is not in 202311 yet. @Allen-John-ML, please manually create the cherry pick PR for branch 202311.
You can ping the release branch owner(github account: ) to approve your cherry pick PR.
If this change is already in 202311, please comment "already in 202311". Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

The change is not in 202405 yet. @Allen-John-ML, please manually create the cherry pick PR for branch 202405.
You can ping the release branch owner(github account: bingwang-ms) to approve your cherry pick PR.
If this change is already in 202405, please comment "already in 202405". Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

The change is not in 202411 yet. @Allen-John-ML, please manually create the cherry pick PR for branch 202411.
You can ping the release branch owner(github account: kperumalbfn) to approve your cherry pick PR.
If this change is already in 202411, please comment "already in 202411". Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

The change is not in 202505 yet. @Allen-John-ML, please manually create the cherry pick PR for branch 202505.
You can ping the release branch owner(github account: yejianquan) to approve your cherry pick PR.
If this change is already in 202505, please comment "already in 202505". Thanks!

---Powered by SONiC BuildBot

mhchann pushed a commit to mhchann/sonic-buildimage that referenced this pull request May 7, 2026
…nt crash (sonic-net#26844)

Signed-off-by: Allen John <Allen.John@xoriant.com>
Signed-off-by: mhchann <mhchann082@gmail.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #27900

roger530-ho pushed a commit to roger530-ho/sonic-buildimage that referenced this pull request Jun 23, 2026
…nt crash (sonic-net#26844)

Signed-off-by: Allen John <Allen.John@xoriant.com>
xdqi pushed a commit to canonical/sonic-buildimage that referenced this pull request Jul 6, 2026
…nt crash (sonic-net#26844)

Signed-off-by: Allen John <Allen.John@xoriant.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

Cherry-pick PR to msft-202512: Azure/sonic-buildimage-msft#2804

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request label(s) for branch(es): 202305,202311,202405,202411,202505,202511,msft-202512, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202305: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

@Allen-John-ML cherry pick PR didn't pass PR checker after retry. Please help check! Thanks.
Azure/sonic-buildimage-msft#2804

---Powered by SONiC BuildBot

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