Open Bug 1924681 Opened 5 months ago Updated 4 months ago

Investigate why we fail to capture some innerWindowIDs in the pages array

Categories

(Core :: Gecko Profiler, defect, P3)

defect

Tracking

()

Tracking Status
firefox133 --- affected

People

(Reporter: canova, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [fxp])

Currently we capture the page information in profile.pages array. JS frames and some markers can include the innerWindowID that the page they belong to. innerWindowID is a unique ID that matches directly to a page in the pages array.

Ideally we should always register every new innerWindowIDs and keep track and serialize them in the end. We use profiler_register_page to register them. But sometimes we might miss some cases like Bug 1505818. In the frontend I recently added checks and put console.warn if the innerWindowIDs are failed to find in the pages array (1,2), thinking that it wouldn't be too frequent. But it seems like pretty much every profile I capture currently prints these warnings.

Here's an example profile with these warnings: https://share.firefox.dev/3ZZvNa1

Note that I will remove these warnings from the frontend so it won't be annoying. But I'm adding them here for prosperity and future investigation:

Failed to find the tabID of innerWindowID 18446744073709552000
Failed to find the tabID of innerWindowID 6442450947
Failed to find the tabID of innerWindowID 36
Failed to find the tabID of innerWindowID 6106245440

Some of them looks too large and maybe there is a conversion problem between the number types and creating different values? But there are also some more realistic IDs that are not found, so there can be multiple issues. That's why I'm adding this in addition to Bug 1505818. Let's investigate this.

Added some more information to the console.warn before removing them completely and this is what I got:

I added funcName and fileName to the samples and marker name to the markers:

Failed to find the tabID of innerWindowID 18446744073709552000 sample: funcName: js::RunScript fileName: null
Failed to find the tabID of innerWindowID 18446744073709552000 sample: funcName: fileName: resource://gre/modules/PageThumbs.worker.js
Failed to find the tabID of innerWindowID 18446744073709552000 sample: funcName: require fileName: resource://gre/modules/workers/require.js
Failed to find the tabID of innerWindowID 18446744073709552000 sample: funcName: anonymous fileName: resource://gre/modules/workers/require.js line 153 > Function
Failed to find the tabID of innerWindowID 18446744073709552000 sample: funcName: (root scope) fileName: resource://gre/modules/workers/require.js line 153 > Function line 3 > eval resource://gre/modules/workers/require.js line 153 > Function line 3 > eval
Failed to find the tabID of innerWindowID 18446744073709552000 sample: funcName: WorkerGlobalScope.importScripts fileName: null
Failed to find the tabID of innerWindowID 6442450947 marker: name: "Largest contentful paint after 0ms"
Failed to find the tabID of innerWindowID 36 marker: name: "Largest contentful paint after 0ms"
Failed to find the tabID of innerWindowID 6106245440 sample: funcName: Yc fileName: https://registry.api.cnn.io/bundles/fave/googlePal-37f8cc7b/googlePal

It looks like there are various issues:

  1. Some of the samples are coming from workers. We probably don't register their pages properly. We should do that, to be filed.
  2. Markers are LCP markers with zero ms. Probably they are coming from about:blank or something. But we might want to just ignore them.
  3. One of them is coming from a function that belongs to a cnn page (maybe an iframe?)

The severity field is not set for this bug.
:canova, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(canaltinova)
Severity: N/A → S3
Flags: needinfo?(canaltinova)
You need to log in before you can comment on or make changes to this bug.