Skip to content

VisionIpc: fix exception if server is killed while client is getting streams#638

Merged
sshane merged 3 commits intomasterfrom
sshane-patch-1
Dec 17, 2024
Merged

VisionIpc: fix exception if server is killed while client is getting streams#638
sshane merged 3 commits intomasterfrom
sshane-patch-1

Conversation

@sshane
Copy link
Copy Markdown
Contributor

@sshane sshane commented Dec 17, 2024

Fixes a ui crash in openpilot when ignition is rapidly cycled from off to on to off. The first assertion always passes (due to timing?), but the second can sometimes return -1.

This return code comes from this line where the errno is always 104 (ECONNRESET):

int r = recvmsg(fd, &msg, 0);
if (r < 0) return r;

@sshane sshane requested a review from adeebshihadeh December 17, 2024 07:07
@sshane
Copy link
Copy Markdown
Contributor Author

sshane commented Dec 17, 2024

This fixes the two assertions when cycling ignition quickly, which is a subset of: #624

TODO: try to repro the other issues

@sshane sshane closed this Dec 17, 2024
@sshane sshane deleted the sshane-patch-1 branch December 17, 2024 07:09
@sshane sshane restored the sshane-patch-1 branch December 17, 2024 21:08
@sshane sshane reopened this Dec 17, 2024
@sshane sshane merged commit 5bb86f8 into master Dec 17, 2024
@sshane sshane deleted the sshane-patch-1 branch December 17, 2024 21:11
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.

1 participant