Give IPC_FAIL_NO_REASON a reason and check it well
Categories
(Core :: Storage: IndexedDB, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox100 | --- | fixed |
People
(Reporter: jstutte, Assigned: jstutte)
References
Details
Attachments
(27 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
IPC_FAIL_NO_REASON should not be used and transformed into IPC_FAIL with reason.
In doing so, we should also verify if the reason really merits an IPC_FAIL given the possible fatal consequences for the calling actor.
| Assignee | ||
Comment 1•3 years ago
|
||
All HandleResponse variants never return false and some Recv__delete__ already ignored their return values. Let's harmonize this (should not change anything during runtime).
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
IPC_FAIL only when we see serious permission problems. Ignore dispatch failures as those already indicate dead actors.
Depends on D136131
| Assignee | ||
Comment 3•3 years ago
|
||
Depends on D136132
| Assignee | ||
Comment 4•3 years ago
|
||
If SendContinue(rv) fails, our channel is already dead so there is no need for another IPC_FAIL.
Depends on D136133
| Assignee | ||
Comment 5•3 years ago
|
||
Depends on D136134
| Assignee | ||
Comment 6•3 years ago
|
||
Depends on D136135
| Assignee | ||
Comment 7•3 years ago
|
||
Depends on D136136
| Assignee | ||
Comment 8•3 years ago
|
||
Depends on D136137
| Assignee | ||
Comment 9•3 years ago
|
||
This allows us to not IPC_FAIL at all when fuzzing.
Depends on D136139
| Assignee | ||
Comment 10•3 years ago
|
||
Depends on D136140
| Assignee | ||
Comment 11•3 years ago
|
||
Depends on D136141
| Assignee | ||
Comment 12•3 years ago
|
||
Depends on D136142
| Assignee | ||
Comment 13•3 years ago
|
||
Depends on D136143
| Assignee | ||
Comment 14•3 years ago
|
||
Before I continue to apply the same patterns everywhere, a short feedback if I am heading to the right direction would be good.
Comment 15•3 years ago
|
||
Yeah, this needs to be discussed first. Can you provide a brief description of the new approach ?
| Assignee | ||
Comment 16•3 years ago
|
||
Well, I wanted to get concrete with some examples before discussing.
The basic patterns encountered so far are:
- Do not
IPC_FAILon a failing dispatch, as this already indicates a dead channel/actor, just ignore to avoid actor delete ping-pong. Note that dropped messages will be reported already by the IPC sub-system, so no need to even warn. - Do not
IPC_FAILif we have aMOZ_CRASH_UNLESS_FUZZINGin case we are fuzzing. - Add reasons to the rest.
The few remaining cases are real changes like D136136 in the sense of "if we can recover without harm, just ignore".
Comment 17•3 years ago
|
||
Well, I think we need to create a guide for this, maybe something already exists.
Like, when IPC_FAIL or MOZ_CRASH_UNLESS_FUZZING should be used what they actually do, what to do when we failed to send a message, etc.
| Assignee | ||
Comment 18•3 years ago
|
||
Some context is in bug 1748852 and bug 1748920. I assume, doing this will let us discover the patterns worth documenting best.
| Assignee | ||
Comment 19•3 years ago
•
|
||
I asked over there in bug 1748920 if pattern 1. is reasonable. The MOZ_CRASH_UNLESS_FUZZING case seems a bit specific to our code here and I assume that those have been added time ago for some specific diagnostics.
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 20•3 years ago
|
||
Depends on D136144
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 21•3 years ago
|
||
Depends on D136161
| Assignee | ||
Comment 22•3 years ago
|
||
Depends on D136580
| Assignee | ||
Comment 23•3 years ago
|
||
Depends on D136581
| Assignee | ||
Comment 24•3 years ago
|
||
Depends on D136582
| Assignee | ||
Comment 25•3 years ago
|
||
Depends on D136583
| Assignee | ||
Comment 26•3 years ago
|
||
Depends on D136584
| Assignee | ||
Comment 27•3 years ago
|
||
Depends on D136585
| Assignee | ||
Comment 28•3 years ago
|
||
Depends on D136586
| Assignee | ||
Comment 29•3 years ago
|
||
Depends on D136587
| Assignee | ||
Comment 30•3 years ago
|
||
Depends on D136588
| Assignee | ||
Comment 31•3 years ago
|
||
Depends on D136589
| Assignee | ||
Comment 32•3 years ago
|
||
Depends on D136590
| Assignee | ||
Comment 33•3 years ago
|
||
Depends on D136591
| Assignee | ||
Comment 34•3 years ago
•
|
||
These should be all patches here. I followed in most of the cases the following rules:
- ignore dispatch failures when sending
__delete__messages - remove
MOZ_CRASH_UNLESS_FUZZINGwhere we already return IPC_FAIL (given that this triggers already aMOZ_ASSERT_UNLESS_FUZZING) - give the remaining IPC_FAIL a reason
In some cases there still might be more IPC_FAIL cases than strictly necessary, but if they do not bite us, that's probably ok and we do not need to spend too much time reasoning about them.
The remaining MOZ_CRASH_UNLESS_FUZZING should be handled in bug 1751371 as they are not directly IPC_FAIL related.
FWIW, here comes a try run on the entire patch stack.
| Assignee | ||
Updated•3 years ago
|
Comment 35•3 years ago
|
||
Comment 36•3 years ago
|
||
| bugherder | ||
Comment 37•3 years ago
|
||
Comment 38•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1422c1f67405
https://hg.mozilla.org/mozilla-central/rev/1ebb8078cd98
https://hg.mozilla.org/mozilla-central/rev/2614f6c4daa9
https://hg.mozilla.org/mozilla-central/rev/613811d0b6e4
https://hg.mozilla.org/mozilla-central/rev/8a28e73dc5b9
https://hg.mozilla.org/mozilla-central/rev/61e2b1ced451
https://hg.mozilla.org/mozilla-central/rev/e6accb230bba
https://hg.mozilla.org/mozilla-central/rev/301c326b9c49
https://hg.mozilla.org/mozilla-central/rev/95a706512282
https://hg.mozilla.org/mozilla-central/rev/64a134d3e149
https://hg.mozilla.org/mozilla-central/rev/b6e7cf39f49c
https://hg.mozilla.org/mozilla-central/rev/fac86a1fa16b
https://hg.mozilla.org/mozilla-central/rev/c1c687fa4812
https://hg.mozilla.org/mozilla-central/rev/201cc80c4c92
https://hg.mozilla.org/mozilla-central/rev/b693a14d69d1
https://hg.mozilla.org/mozilla-central/rev/6f5a3f68f847
https://hg.mozilla.org/mozilla-central/rev/161fdc257c31
https://hg.mozilla.org/mozilla-central/rev/fc7eaa6e55b4
https://hg.mozilla.org/mozilla-central/rev/f9b134c67bdf
https://hg.mozilla.org/mozilla-central/rev/32ca87f4e55f
https://hg.mozilla.org/mozilla-central/rev/4abc5fce18de
https://hg.mozilla.org/mozilla-central/rev/5298cb5a77eb
https://hg.mozilla.org/mozilla-central/rev/9aaa4aab943c
https://hg.mozilla.org/mozilla-central/rev/c3175e8089b8
https://hg.mozilla.org/mozilla-central/rev/86207cdb9c4b
https://hg.mozilla.org/mozilla-central/rev/abb14f60d11a
Comment 39•3 years ago
|
||
It looks like all the patches landed. Can this be closed?
| Assignee | ||
Comment 40•3 years ago
|
||
Yes, thanks for reminding.
Updated•3 years ago
|
Updated•3 years ago
|
Description
•