Open Bug 1623942 Opened 5 years ago Updated 2 years ago

Update LUL and EHABIStackWalk tables when libraries get loaded and unloaded. Stack unwinding doesn't work on libraries that were loaded after profiler initialization (e.g. libfreebl3.so, libsoftokn3.so)

Categories

(Core :: Gecko Profiler, defect, P2)

ARM
Android
defect

Tracking

()

People

(Reporter: mstange, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

Profile: https://perfht.ml/2UlOfWZ

I don't see stacks in libfreebl3.so and libsoftokn3.so on Android/arm.

Are we simply not setting the right build flags to include the necessary information for EHABI stack unwinding?

Flags: needinfo?(jld)
Attached file libfreebl3.so (deleted) —
Attached file libsoftokn3.so (deleted) —

They do have exidx/extab sections. But I think the reason this happens for only those libraries, and not the rest of NSS/NSPR, is because they're dynamically loaded after the unwinder is initialized. The unwinder has its own mapping from executable code addresses to exception tables, which is read-only after it's initialized and therefore safe to use from async signal context. In principle it would be possible to implement something more complicated to allow for atomic updates of that information, but it was never a problem on B2G as far as I can recall.

Flags: needinfo?(jld)

Interesting!

This will also become a problem for libxul.so itself once we merge the Base Profiler and the regular profiler, because profiler initialization will happen before libxul is loaded.

Blocks: 1557566
Summary: Android stack unwinding doesn't work on libfreebl3.so and libsoftokn3.so → Android/arm stack unwinding doesn't work on libraries that were loaded after profiler initialization (e.g. libfreebl3.so, libsoftokn3.so)

LUL has the same problem, and will also need to be fixed for the unified base profiler.

Summary: Android/arm stack unwinding doesn't work on libraries that were loaded after profiler initialization (e.g. libfreebl3.so, libsoftokn3.so) → Update LUL and EHABIStackWalk tables when libraries get loaded and unloaded. Stack unwinding doesn't work on libraries that were loaded after profiler initialization (e.g. libfreebl3.so, libsoftokn3.so)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: