Closed Bug 1580176 Opened 5 years ago Closed 4 years ago

Add MOZ_LOG to JSWindowActor messaging

Categories

(Core :: IPC, enhancement, P3)

enhancement

Tracking

()

RESOLVED WORKSFORME
Fission Milestone Future

People

(Reporter: freddy, Assigned: u608768)

Details

Attachments

(2 obsolete files)

Logging helps debugging, generally.

Nika, I think you suggested something about logging the process type but I don't exactly recall.
Can you point me in the right direction again?

Flags: needinfo?(nika)

You can get which side of the actor we're working with here: https://searchfox.org/mozilla-central/rev/588814f2edddf0e132d77d326ddae50911e8bad1/dom/ipc/WindowGlobalActor.h#40

And it might also be nice to include an isInProcess bit to tell if the actor corresponds to an in-process document.

Flags: needinfo?(nika)

I'm not sure I understand either of your recommendations, I must admit that my C++ is mostly read-only..

The logging I am implementing is in JSWindowActor, which does not have GetSide().
Do you want me to move this function to JSWindowActor and then have WIndowGlobalParent and WindowGlobalChild override it? Similar for isInProcess - it exists only in the parent.

Flags: needinfo?(nika)

It'd probably make sense to have a common virtual GetManager() method on JSWindowActor which returns a WindowGlobalActor*, which would let you get and call the GetSide() method.

For the IsInProcess bit, for child-side actors that would be equivalent to XRE_IsParentProcess(), (as the parent side always lives in the parent process, so if the child side is in the parent process, we know we're an in-process actor). It's probably OK to leave the isInProcess bits until later though.

Flags: needinfo?(nika)
Priority: -- → P3

I'm afraid I have to drop this from my queue.

Assignee: fbraun → nobody

Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:

0ee3c76a-bc79-4eb2-8d12-05dc0b68e732

Fission Milestone: --- → ?

Kashav, can you pick up this bug and finish Frederik's WIP patch?

Tracking for Fission dogfooding (M5) because JSWindowActor logging would be helpful for debugging.

Assignee: nobody → kmadan
Fission Milestone: ? → M5
Flags: needinfo?(kmadan)

Sure.

Status: NEW → ASSIGNED
Flags: needinfo?(kmadan)

Adds GetManager on JSWindowActor (returns the associated WindowGlobalActor),
and IsInProcess on WindowGlobalActor (returns whether the actor is in process
or not).

Attachment #9091729 - Attachment description: Bug 1580176 - add MOZ_LOG for JSWindowActor r=nika → Bug 1580176 - Part 2: Log incoming messages in JSWindowActor::ReceiveRawMessage, r=kmag
Attachment #9116194 - Attachment description: Bug 1580176 - Part 1: Make some common actor utility methods virtual, r=kmag → Bug 1580176 - Part 1: Make some common actor utility methods virtual, r=nika
Attachment #9091729 - Attachment description: Bug 1580176 - Part 2: Log incoming messages in JSWindowActor::ReceiveRawMessage, r=kmag → Bug 1580176 - Part 2: Log sent and received messages in JSWindowActor, r=nika
Pushed by dvarga@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/20f5bece309f
Part 1: Make some common actor utility methods virtual, r=nika

The failure isn't reproducing in my local try pushes, I think this was just bug 1541711 (should that be reopened?). I'll try to re-land this later today.

Flags: needinfo?(kmadan)
Pushed by kmadan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3109e6383895
Part 1: Make some common actor utility methods virtual, r=nika
https://hg.mozilla.org/integration/autoland/rev/3a68d8babd54
Part 2: Log sent and received messages in JSWindowActor, r=nika

Backed out 2 changesets (Bug 1580176) for hazard failure

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=linux%2Cx64%2Cdebug%2Chazard-linux64-haz%2Fdebug%2C%28h%29&fromchange=382b9d9cfb25725c2e82a3917a7294297eeb49a3&tochange=dcb31aec594ef644eec48f8a30f1e3947057828b&selectedJob=286015823

Backout link: https://hg.mozilla.org/integration/autoland/rev/dcb31aec594ef644eec48f8a30f1e3947057828b

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=286015823&repo=autoland&lineNumber=55241

[task 2020-01-22T21:05:27.872Z] 30:34.95 In file included from /builds/worker/checkouts/gecko/obj-analyzed/dist/include/mozilla/layers/WebRenderCommandBuilder.h:11,
[task 2020-01-22T21:05:27.872Z] 30:34.95 from /builds/worker/checkouts/gecko/obj-analyzed/dist/include/mozilla/layers/RenderRootStateManager.h:14,
[task 2020-01-22T21:05:27.872Z] 30:34.95 from /builds/worker/checkouts/gecko/obj-analyzed/dist/include/TextDrawTarget.h:11,
[task 2020-01-22T21:05:27.872Z] 30:34.95 from /builds/worker/checkouts/gecko/obj-analyzed/dist/include/gfxFont.h:39,
[task 2020-01-22T21:05:27.872Z] 30:34.95 from /builds/worker/checkouts/gecko/obj-analyzed/dist/include/nsDeviceContext.h:12,
[task 2020-01-22T21:05:27.872Z] 30:34.95 from /builds/worker/checkouts/gecko/obj-analyzed/dist/include/nsViewManager.h:14,
[task 2020-01-22T21:05:27.872Z] 30:34.95 from /builds/worker/checkouts/gecko/dom/base/nsFocusManager.cpp:27,
[task 2020-01-22T21:05:27.872Z] 30:34.95 from Unified_cpp_dom_base8.cpp:20:
[task 2020-01-22T21:05:27.872Z] 30:34.95 /builds/worker/checkouts/gecko/obj-analyzed/dist/include/mozilla/layers/ClipManager.h:52:7: note: 'class mozilla::layers::ClipManager' declared here
[task 2020-01-22T21:05:27.872Z] 30:34.95 class ClipManager {
[task 2020-01-22T21:05:27.872Z] 30:34.95 ^~~~~~~~~~~
[task 2020-01-22T21:05:27.872Z] 30:34.95 make[4]: Leaving directory '/builds/worker/checkouts/gecko/obj-analyzed/dom/base'
[task 2020-01-22T21:05:27.872Z] 30:34.95 /builds/worker/checkouts/gecko/config/recurse.mk:32: recipe for target 'compile' failed
[task 2020-01-22T21:05:27.872Z] 30:34.95 make[2]: *** [compile] Error 2
[task 2020-01-22T21:05:27.872Z] 30:34.95 /builds/worker/checkouts/gecko/config/rules.mk:394: recipe for target 'default' failed
[task 2020-01-22T21:05:27.872Z] 30:34.95 make[1]: *** [default] Error 2
[task 2020-01-22T21:05:27.872Z] 30:34.95 client.mk:125: recipe for target 'build' failed
[task 2020-01-22T21:05:27.872Z] 30:34.95 make: *** [build] Error 2
[task 2020-01-22T21:05:27.922Z] 30:35.00 402 compiler warnings present.
[task 2020-01-22T21:05:28.056Z] 30:35.13 Notification center failed: Install notify-send (usually part of the libnotify package) to get a notification when the build finishes.
[task 2020-01-22T21:05:28.092Z] Received connection.
[task 2020-01-22T21:05:28.092Z] Final transaction received, finishing...
[task 2020-01-22T21:05:34.580Z] Waiting for manager to finish (build status 2)...
[task 2020-01-22T21:05:34.580Z] Exiting with status 2

Flags: needinfo?(kmadan)

Spoke to :sfink about this. He was able to reproduce the failure without this patch and is working on a fix. We'll put this on hold until that's figured out.

Flags: needinfo?(kmadan)

Deferring to Fission Nightly (M6). We want these MOZ_LOGs soon to help debugging, but they don't strictly need to block Fission dogfooding.

Also, Kashav's patch is blocked waiting for some fixes to the hazard analyzer itself.

Fission Milestone: M5 → M6
Pushed by kmadan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6f33e6cec3c1
Part 1: Make some common actor utility methods virtual, r=nika
https://hg.mozilla.org/integration/autoland/rev/59f7472b2ad4
Part 2: Log sent and received messages in JSWindowActor, r=nika
Backout by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/728f6e14b18c
Backed out 2 changesets for causing hazard bustages CLOSED TREE
No longer blocks: 1563825

Changing the Fission milestone based on the latest triage instructions + comment #17 indicating that it doesn't directly block using Fission.

Fission Milestone: M6 → Future
Flags: needinfo?(kmadan)
Attachment #9116194 - Attachment is obsolete: true
Attachment #9091729 - Attachment is obsolete: true

We've added other ways of logging JSActors, so this is probably unnecessary now.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: