Repository navigation
Conversation
Deleting the new NetworkManager profile removes iwd's network file while autoconnect is loading it, so the next passphrase stays in "connecting" until reboot. Forget that known network before the delete, then disconnect a station still stuck connecting.
Confidence Score: 4/5
[Medium impact] The change affects failed Wi-Fi connection attempts handled by the shared Wi-Fi helper. The PR should not merge until query timeouts can no longer skip deletion of failed profiles. FindingsSummaryAdds iwd cleanup when a failed Wi-Fi attempt deletes a newly created profile.
Reviews (4) · Last reviewed commit: "Limit iwd cleanup to a failed join on an..." · Reviewed by Greptile |
|
GPT-6.2 Sol High in Codex, Opus 5.5 High, and muse-wonder via pi (high) reviewed iwd 3.12 reports |
Disconnect only that adapter, including when iwd 3.12 reports autoconnect_quick as disconnected. Forget the known network only when no other saved profile still maps to it. Co-authored-by: Lucas Goossen <ludagoo@users.noreply.github.com>
|
GPT-6.2 Sol High in Codex, Opus 5.5 High and muse-wonder via pi, thinking high reviewed Please limit the cleanup to the failed activation on an iwd-managed adapter, bound the profile lookup, and skip |
Skip Forget and Disconnect when NetworkManager is using wpa_supplicant, when iwd is not already running, or when the saved-profile check does not finish. Do not call Station.Disconnect while another network can still autoconnect. A PSK failure before connection up only rolls back the profile. Co-authored-by: Lucas Goossen <ludagoo@users.noreply.github.com>
| except _IwdLookupError: | ||
| blocks_forget, blocks_disconnect = True, True |
There was a problem hiding this comment.
Timeout leaves failed profiles saved
If either saved-profile query takes longer than three seconds, run_cmd raises RuntimeError, but this handler catches only _IwdLookupError. The error reaches the outer except Exception before connection delete runs, leaving the failed profile saved for later attempts to reuse. Catch query exceptions here too, skip the iwd calls, and still delete the failed profile.
|
GPT-6.2 Sol High in Codex, Opus 5.5 High and muse-wonder via pi, thinking high reviewed Please keep profile deletion independent of the optional iwd lookup, bound the total rollback time, and cover a lookup timeout. The worker isolation check blocked runtime tests. A live wrong-then-correct passphrase run on |
|
your three commits are in #21016, including the two follow-ups recorded as Cursor Agent. iwd cleanup stays limited to a failed join on the adapter and network that failed. the ethernet hero and public IP changes are on the panel beside it. @dhh @omarchybot if 21016 lands, this can close as superseded. |
|
GPT-6.2 Sol High in Codex compared with #21016. All three iwd patches match, and the Wi-Fi helper is identical, so the bundle also skips profile deletion when the saved-profile lookup times out. Opus 5.5 High and muse-wonder via pi, thinking high agreed after reading the diffs and may have seen the initial review. Opus also pointed out that the retry fixture clears the simulated hang on |
| if not started: | ||
| if added: | ||
| _delete_unactivated_profile(con_uuid) |
There was a problem hiding this comment.
If SIGTERM arrives after NetworkManager saves the new profile but before run_cmd(add_cmd, check=True) returns, added stays false. This branch then skips deletion, leaving an unfinished profile that later attempts may reuse. The enterprise and open-network paths have the same gap.
Attempt deletion by the already-generated UUID when creation is interrupted, without calling iwd.
|
Recommend: Hold — please restore cleanup when Wi-Fi profile creation is cancelled. In GPT-6.2 Sol High in Codex checked the base and PR source. Opus 5.5 High and muse-wonder via pi, thinking high agreed and may have seen the initial review. GitHub CI passed. The worker isolation check blocked live testing. |
What changes
A wrong Wi-Fi passphrase, then the correct one, never connects until reboot when NetworkManager is using iwd.
omarchy-network-wificreates a profile for the attempt. On failure,cleanup_cancelled_connectiondeletes that profile. NetworkManager then removes/var/lib/iwd/<ssid>.<type>while iwd has already started autoconnect. iwd logsError loadingfor the file and stays inautoconnect_quick, which it reports as Station Stateconnecting. The next connect never gets an authentication result. The helper's 28 second wait aborts it, the new profile is deleted too, and iwd is back in the same state. A reboot lets autoconnect finish with nothing to join, and the same passphrase connects.Before that delete, the helper now calls iwd
KnownNetwork.Forgetfor the SSID this attempt created. Forget drops the in-memory network and disconnects stations that were using it. A station that is stillconnectingafterwards is disconnected. A connected or roaming station is left alone, and a reused saved profile is not forgotten. If iwd is not the Wi-Fi backend,busctlfails and the existing rollback still runs.This does not change
wifi.iwd.autoconnect. That switch is a separate device match, and turning it off for every chip would change autoconnect for machines that are not hitting this bug.Verification
bash test/shell.d/network-test.shfailed on quattro before the helper change. The new case deleted the profile and did not callKnownNetwork.Forget. The same file passed after the change, including the existing PSK, enterprise, and SIGTERM rollback cases.Not checked by joining a real network. Reproducing the hang means failing a connect on a live iwd station. The test stubs
nmcliandbusctland checks the call order: Forget, thenconnection delete, then Disconnect on the station whose State isconnecting, and no Disconnect on a station whose State isconnected.Screenshots
No visible change: the network panel still connects through
omarchy-network-wifi. A wrong passphrase no longer leaves iwd stuck for the next attempt.Filed by Grok 4.7 via Grok Build.