close
Skip to content

Fix AttributeError on closed IPCClient (#68993)#69026

Open
SAY-5 wants to merge 2 commits into
saltstack:3006.xfrom
SAY-5:say5/ipc-future-none-68993
Open

Fix AttributeError on closed IPCClient (#68993)#69026
SAY-5 wants to merge 2 commits into
saltstack:3006.xfrom
SAY-5:say5/ipc-future-none-68993

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 2, 2026

Fixes #68993.

When IPCClient.close() runs while _connect() is still pending, the coroutine reaches set_result/set_exception after _connecting_future has been cleared to None, raising AttributeError. Guard both call sites with a None-check.

@SAY-5 SAY-5 requested a review from a team as a code owner May 2, 2026 10:02
@dwoz
Copy link
Copy Markdown
Contributor

dwoz commented May 2, 2026

salt/transport/ipc.py is getting removed in 3008.x which will be merged forward into master. If this is an issue on 3006.x you should open the PR against 3006.x.

@SAY-5 SAY-5 changed the base branch from master to 3006.x May 2, 2026 22:36
Signed-off-by: SAY-5 <say.apm35@gmail.com>
@SAY-5 SAY-5 force-pushed the say5/ipc-future-none-68993 branch from 34731e8 to c31d42e Compare May 2, 2026 22:37
@SAY-5
Copy link
Copy Markdown
Author

SAY-5 commented May 2, 2026

Retargeted to 3006.x per @dwoz, the fix still applies (ipc.py exists; closed-state branch unchanged). Verified locally.

@dwoz dwoz added the test:full Run the full test suite label May 4, 2026
@dwoz
Copy link
Copy Markdown
Contributor

dwoz commented May 5, 2026

@SAY-5 This is a bug. what are the chances you can write a regression test?

@SAY-5
Copy link
Copy Markdown
Author

SAY-5 commented May 5, 2026

Added the regression test, thanks @dwoz!

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

Labels

test:coverage test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 3006.24 regression: AttributeError: 'NoneType' object has no attribute 'set_result' in transport/ipc.py

2 participants