Closed
Bug 1301022
Opened 8 years ago
Closed 8 years ago
Add an API to annotate pending IPC when push IPC message to pending queue OOM
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla52
People
(Reporter: ting, Assigned: ting)
References
Details
Attachments
(2 files)
58 bytes,
text/x-review-board-request
|
ted
:
review+
gchang
:
approval-mozilla-aurora+
|
Details |
6.24 KB,
patch
|
gchang
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
In bug 1287044 I used CrashReporter::AnnotateCrashReport() to add annotations to crash report when OOM, however it doesn't work when OOM is not happend on the main thread, because CrashReporterHelperRunnable won't have a chance to run.
So I need to add a new API (similar to AnnotateOOMAllocationSize())in nsExceptionHandler to make sure the annotations will be added to the crash report.
Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8788824 [details]
Bug 1301022 - Add an API for annotating pending IPC messages.
https://reviewboard.mozilla.org/r/77174/#review77330
::: toolkit/crashreporter/nsExceptionHandler.cpp:577
(Diff revision 1)
> gTexturesSize = size;
> }
>
> +static size_t gNumOfPendingIPC = 0;
> +static uint32_t gTopPendingIPCCount = 0;
> +static const char* gTopPendingIPCName = nullptr;
This doesn't inspire me with confidence in C++, but I guess this is always a compile-time constant string in practice? (Looking at the callers of `IPC::Message::set_name`: https://dxr.mozilla.org/mozilla-central/search?q=%2Bcallers%3A%22IPC%3A%3AMessage%3A%3Aset_name%28const+char+%2Aconst%29%22 )
Sure makes me wish this was Rust code and you could use `&'static str`!
Attachment #8788824 -
Flags: review?(ted) → review+
Comment hidden (obsolete) |
Assignee | ||
Comment 4•8 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #2)
> > +static const char* gTopPendingIPCName = nullptr;
>
> This doesn't inspire me with confidence in C++, but I guess this is always a
> compile-time constant string in practice? (Looking at the callers of
Please ignore my incorrect comment 3. So yes, and in case if it hasn't been initialized, it will be "???", see
https://dxr.mozilla.org/mozilla-central/rev/fd0564234eca242b7fb753a110312679020f8059/ipc/chromium/src/chrome/common/ipc_message.h#319, and
https://dxr.mozilla.org/mozilla-central/rev/fd0564234eca242b7fb753a110312679020f8059/ipc/chromium/src/chrome/common/ipc_message.h#59-61
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•8 years ago
|
||
Try: https://hg.mozilla.org/try/rev/883813acc51e9067122765c1a24f4adb750904f9
There's a change that I replaced msgid_t with uint32_t to get rid of the dependency on ipc_message.h.
Pushed by tchou@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3719ffa5eb4b
Add an API for annotating pending IPC messages. r=ted
Comment 8•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Assignee | ||
Comment 9•8 years ago
|
||
Comment on attachment 8788824 [details]
Bug 1301022 - Add an API for annotating pending IPC messages.
Approval Request Comment
[Feature/regressing bug #]: bug 1287044
[User impact if declined]: none
[Describe test coverage new/current, TreeHerder]: current tests
[Risks and why]: low, because it just fixes crash annotations when OOM in pushing IPC message to the queue (bug 1266517)
[String/UUID change made/needed]: none
Attachment #8788824 -
Flags: approval-mozilla-aurora?
Comment 10•8 years ago
|
||
Comment on attachment 8788824 [details]
Bug 1301022 - Add an API for annotating pending IPC messages.
This patch fixes crash annotations when OOM in pushing IPC message to the queue. Take it in 51 aurora.
Attachment #8788824 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•8 years ago
|
Assignee: nobody → janus926
Comment 11•8 years ago
|
||
bugherder uplift |
Assignee | ||
Comment 12•8 years ago
|
||
Even with the patch, bp-9b712aed-dd03-4b99-b181-a82a32160923 still doesn't have the annotations.
It seems the annotations also need to be added in PrepareChildExceptionTimeAnnotations() to make it work when OOM occurs in the child process.
Flags: needinfo?(ted)
Assignee | ||
Comment 13•8 years ago
|
||
Pressed enter accidentally, I haven't finished comment 12.
I tested locally with PrepareChildExceptionTimeAnnotations() fixed, and made sure the annotations were present on crash-stats. But I still want to double confirm with you if I am doing correct.
Assignee | ||
Comment 14•8 years ago
|
||
If my understanding is correct, I'll backout the patch from aurora/central, fix it, and land again.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 15•8 years ago
|
||
Backout from Aurora at first.
Approval Request Comment
[Feature/regressing bug #]: no regression
[User impact if declined]: none, but the crash annotations won't work if it's crashed in child process
[Describe test coverage new/current, TreeHerder]: none
[Risks and why]: none
[String/UUID change made/needed]: none
Attachment #8797017 -
Flags: approval-mozilla-aurora?
Comment hidden (mozreview-request) |
Assignee | ||
Comment 17•8 years ago
|
||
Comment on attachment 8788824 [details]
Bug 1301022 - Add an API for annotating pending IPC messages.
Added annotations to PrepareChildExceptionTimeAnnotations(), asked for review again to make sure I don't miss anything else.
Flags: needinfo?(ted)
Attachment #8788824 -
Flags: review+ → review?(ted)
Updated•8 years ago
|
Comment 18•8 years ago
|
||
Comment on attachment 8797017 [details] [diff] [review]
backout
Back out patch as it doesn't work when OOM in child process. Take it in 51 aurora.
Attachment #8797017 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 19•8 years ago
|
||
bugherder uplift |
Comment 20•8 years ago
|
||
Pushed by tchou@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/841027862f31
Back out crash annotations which doesn't work in child process. r=me
Comment 21•8 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 22•8 years ago
|
||
Forgot to set leave-open.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 23•8 years ago
|
||
mozreview-review |
Comment on attachment 8788824 [details]
Bug 1301022 - Add an API for annotating pending IPC messages.
https://reviewboard.mozilla.org/r/77174/#review85242
Looks good, thanks!
Attachment #8788824 -
Flags: review?(ted) → review+
Assignee | ||
Comment 24•8 years ago
|
||
Comment 25•8 years ago
|
||
Pushed by tchou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/373457d82832
Add an API for annotating pending IPC messages. r=ted
Comment 26•8 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 27•8 years ago
|
||
Gerry, bp-b4853361-f3cf-4609-b155-d20b82161021 shows that the fix does work now, so I'd like to ask for uplifting again. But the flag approval‑mozilla‑aurora can't be reset, how should I proceed?
Flags: needinfo?(gchang)
Updated•8 years ago
|
Flags: needinfo?(gchang)
Attachment #8788824 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 28•8 years ago
|
||
Comment on attachment 8788824 [details]
Bug 1301022 - Add an API for annotating pending IPC messages.
Approval Request Comment
[Feature/regressing bug #]: bug 1287044
[User impact if declined]: none
[Describe test coverage new/current, TreeHerder]: current tests
[Risks and why]: low, because it just fixes crash annotations when OOM in pushing IPC message to the queue (bug 1266517)
[String/UUID change made/needed]: none
Attachment #8788824 -
Flags: approval-mozilla-aurora?
Comment 29•8 years ago
|
||
Comment on attachment 8788824 [details]
Bug 1301022 - Add an API for annotating pending IPC messages.
Help dev debug in crash reports. Take it in 51 aurora.
Attachment #8788824 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 30•8 years ago
|
||
bugherder uplift |
You need to log in
before you can comment on or make changes to this bug.
Description
•