Closed Bug 1742855 Opened 2 years ago Closed 2 years ago

Improve error handling in symbolication worker

Categories

(DevTools :: Performance Tools (Profiler/Timeline), task)

task

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: mstange, Assigned: mstange)

Details

Attachments

(2 files)

The profiler-get-symbols wasm code currently has a case where it panics when it tries to obtain symbols for system libraries on macOS 12. This code is only run on macOS Beta versions, because for macOS release versions we have symbols on the symbol server.

When this panic occurs, the following happens:

  • The promise which symbolication-worker.js awaits is not rejected; the error isn't caught.
  • The worker stays around forever, and holds on to the bytes it read from files, forever.
  • The symbolication status overlay in the Firefox profiler never disappears.

I'm going to address this hanging-forever in two pieces on this bug:

  1. I'm going to add an unhandledrejection handler which reports the error.
  2. I've fixed the cause of the panic in profiler-get-symbols and will update the wasm blob.

With these changes, we still won't be able to obtain system library symbols on macOS 12 Beta versions, but at least we won't hang indefinitely any more. The macOS 12 issue is tracked in https://github.com/mstange/profiler-get-symbols/issues/22 .

This version aligns the FileHandle API with the new IOUtils SyncReadFile API, which saves a few lines of code.
It also fixes a panic which could occur if symbolication tried to do a large out-of-bounds file read.
This bad read range was computed due to incorrect parsing of the macOS 12 dyld shared cache format.

Depends on D132076

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/14f5e60f8bcc
Report errors from the symbolication worker even if they don't propagate to the main await call. r=canaltinova
https://hg.mozilla.org/integration/autoland/rev/b41bce1fbd32
WIP: Bug 1742855 - Update profiler-get-symbols wasm to d1500c1e935db352eeb97170459d16a20bcddf08. r=canaltinova
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: