Stack traces on macOS/x86-64 seem to only use stack-scanning
Categories
(Toolkit :: Crash Reporting, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: gsvelto, Assigned: Gankra)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
I stumbled upon this issue while looking at bug 1690753. The stack trace is fully within libxul and as such should be entirely obtained using CFI, instead the stack walker is falling back to stack scanning.
I opened the symbol files for a few builds and noticed that the CFI information appears to be very limited. A macOS/AArch64 build of libxul yields ~400K CFI directives in the .sym file, similarly a Windows/x86-64 one has ~360K; macOS/x86-64 builds have only ~80K CFI directives which suggests that a significant portion of them is missing.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Additional note: running objdump on the .dSYM
files similarly only yield 7k lines of CIE info while my local builds have 80k lines. I'm assuming these dSYM files are the source the .sym
files are built from, and that we're probably missing a compiler flag telling clang to generate that info (perhaps -funwind-tables is needed?).
Assignee | ||
Comment 2•4 years ago
|
||
Additional notes:
The .dSYM files are generates by llvm-dsymutil
in the main build task (right before they're passed to dump_syms
to generate the .sym files). e.g.
/builds/worker/workspace/obj-build/_virtualenvs/init_py3/bin/python -m mozbuild.action.dumpsymbols /builds/worker/workspace/obj-build/toolkit/library/build/XUL /builds/worker/workspace/obj-build/toolkit/library/build/XUL_syms.track --count-ctors
Running: /builds/worker/workspace/obj-build/_virtualenvs/init_py3/bin/python /builds/worker/checkouts/gecko/toolkit/crashreporter/tools/symbolstore.py -c -a x86_64 --vcs-info --install-manifest=/builds/worker/workspace/obj-build/_build_manifests/install/dist_include,/builds/worker/workspace/obj-build/dist/include -s /builds/worker/checkouts/gecko /builds/worker/fetches/dump_syms/dump_syms /builds/worker/workspace/obj-build/dist/crashreporter-symbols /builds/worker/workspace/obj-build/toolkit/library/build/XUL --count-ctors
Starting Mac pre-processing on file: /builds/worker/workspace/obj-build/toolkit/library/build/XUL
Running Mac pre-processing on file: /builds/worker/workspace/obj-build/toolkit/library/build/XUL
/builds/worker/checkouts/gecko/build/macosx/llvm-dsymutil --arch=x86_64 /builds/worker/workspace/obj-build/toolkit/library/build/XUL
Finished processing /builds/worker/workspace/obj-build/toolkit/library/build/XUL in 155.46s
Beginning work for file: /builds/worker/workspace/obj-build/toolkit/library/build/XUL
Processing file: /builds/worker/workspace/obj-build/toolkit/library/build/XUL
/builds/worker/fetches/dump_syms/dump_syms -a x86_64 --type macho -j 2 /builds/worker/workspace/obj-build/toolkit/library/build/XUL.dSYM /builds/worker/workspace/obj-build/toolkit/library/build/XUL
PERFHERDER_DATA: {"framework": {"name": "build_metrics"}, "suites": [{"name": "compiler_metrics", "subtests": [{"name": "num_static_constructors", "value": 101, "alertChangeType": "absolute", "alertThreshold": 3}]}]}
Finished processing /builds/worker/workspace/obj-build/toolkit/library/build/XUL in 35.82s
The -funwind-tables flag seems to be passed quite liberally throughout the build, need to further investigate why llvm-dsymutil
isn't generating all the info we need (e.g. inspecting the files it takes as input, how they're generated, etc.)
Comment 3•3 years ago
|
||
The Breakpad dump_syms source elaborates on this:
https://chromium.googlesource.com/breakpad/breakpad/+/c484031f1f199ee53567241426efffee49008f82/src/tools/mac/dump_syms/dump_syms_tool.cc#113
Are you using your Rust dump_syms rewrite? If so you might need to ensure that you have the same logic.
Assignee | ||
Comment 4•3 years ago
|
||
Oh wow, I bet that's exactly it! Gonna work on this right away.
Assignee | ||
Comment 5•3 years ago
|
||
current work on this being tracked at https://github.com/getsentry/symbolic/issues/368
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Comment 7•3 years ago
|
||
Assignee | ||
Comment 8•3 years ago
|
||
Got myself mixed up, actual try push: https://treeherder.mozilla.org/jobs?repo=try&revision=e9f54329acae152300ffda7a27291063f4b4535a
Assignee | ||
Comment 9•3 years ago
|
||
Needed to bump the rustc versions on the dump_syms builds: https://treeherder.mozilla.org/jobs?repo=try&revision=87691a877bf15ffece7786770f86d929f81522f8
Assignee | ||
Comment 10•3 years ago
|
||
Nice:
XUL has about 150k-180k CFI directives now (we still expect significantly less CFI lines because compact unwind info doesn't bother giving special directions in prologues/epilogues).
Reporter | ||
Comment 11•3 years ago
|
||
\o/
Comment 12•3 years ago
|
||
Reporter | ||
Updated•3 years ago
|
Comment 13•3 years ago
|
||
bugherder |
Description
•