-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Prevent the constellation from panicking if there is a deserialization error #15618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent the constellation from panicking if there is a deserialization error #15618
Conversation
Let's not merge this now, I don't want any more bitrot on my serde bump, and the Error type changed. |
r=me |
☔ The latest upstream changes (presumably #15588) made this pull request unmergeable. Please resolve the merge conflicts. |
I'm a little confused here. Since the de-serialisation in Either way, it does seem a valid concern, since I/O errors at least can happen due to circumstances out of our control. (Such as the sender process dying in the middle of a large transfer; or possibly some kind of operating system resource exhaustion...) As such, I'd say this should be addressed in The downside is that switching between MPSC channels and IPC channels becomes less transparent this way -- but then again, when routing is needed, it's not really transparent anyway... |
It is indeed a bug in rust-url that causes the deserialisation error, but the constellation really should never panic ever, so ipc-channel must provide a way to not panic even when there is such a bug somewhere. |
Indeed, this can only happen if there are errors in the deserializer, this is bullet-proofing the constellation against such errors. Or at least trying to, it's hard to protect against double-panicking if the deserializer for panic messages panics. We could add this function to ipc-channel at some point, I'd rather not hold up this PR though. |
Well, this didn't sound like an urgent issue... But it's your call of course :-) |
d53da10
to
aee1291
Compare
Rebased now that #15588 has landed. @bors-servo r=Manishearth |
📌 Commit aee1291 has been approved by |
…ishearth Prevent the constellation from panicking if there is a deserialization error <!-- Please describe your changes on the following line: --> At the moment, the constellation panics if there is a deserialization error on an ipc channel. This happens in `/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html` due to the URL deserialization errors caused by servo/rust-url#278. This PR stops the constellation from panicking, so we can get a crash report for deserialization errors. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because we don't test panic recovery <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15618) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev |
At the moment, the constellation panics if there is a deserialization error on an ipc channel. This happens in
/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html
due to the URL deserialization errors caused by servo/rust-url#278.This PR stops the constellation from panicking, so we can get a crash report for deserialization errors.
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is