-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workerd: macOS symbolication does not work #1335
Comments
It looks like fs_usage will trace file open events. Crude approach, in terminal session 1 run: # addr.txt is generated from a workerd crash (just a list of addresses, one per line, each starting 0x...).
workerd % (sleep 60; cat addr.txt ) | $(brew --prefix llvm@15)/bin/llvm-symbolizer --obj=./bazel-bin/src/workerd/server/workerd --verbose Whilst that command is sleeping, use another terminal session to run orion@LY4QWFNYJH:workerd % ps -eaf | grep llvm
502 96657 88050 0 4:26pm ttys001 0:00.00 grep llvm
502 96630 88092 0 4:26pm ttys003 0:00.01 /opt/homebrew/opt/llvm@15/bin/llvm-symbolizer --obj=./bazel-bin/src/workerd/server/workerd --verbose
orion@LY4QWFNYJH:workerd % sudo fs_usage -f pathname 96630
16:27:16.547638 open F=3 (R__________X) /private/var/tmp/_bazel_orion/0126d6c634aca3f3b55777a59ff39b0e/execroot/workerd/bazel-out/darwin_arm64-dbg/bin/src/workerd/server/workerd 0.000149 llvm-symbolizer.5446225
16:27:16.568909 close F=3 0.000018 llvm-symbolizer.5446225
16:27:16.569000 open [ 2] (R__________X) /private/var/tmp/_bazel_orion/0126d6c634aca3f3b55777a59ff39b0e/execroot/workerd/bazel-out/darwin_arm64-dbg/bin/src/workerd/server/workerd.dSYM>>>>>>>>>> 0.000023 llvm-symbolizer.5446225
There is |
This might be as simple as running BTW, interesting background on dSYM in https://wiki.dwarfstd.org/Apple%27s_%22Lazy%22_DWARF_Scheme.md. Useful to read before https://lldb.llvm.org/use/symbols.html#symbols-on-macos. Update: definitely looks as simple as running
|
Symbolication with
llvm-symbolizer
was enabled for the workerd github runners intest.yml
in #1247.Shortly after, it was suspended for macOS in commit ad20f5e in PR #1283 when additional build configurations were added because it leads to test timeouts. The symbol search process appears to be slow / misconfigured and the CPU and storage capabilities of the free-tier github runners are limited.
We've had issues with macOS, symbols for LLVM, and bazel build. workerd explicitly sets a source-map for debugging. The problem in this ticket is likely related.
I've spent a day or two looking into this, but have not cracked it. This ticket is just to track that we have a problem here. The next step is to collect fs activity from
llvm-symbolizer
, macOS is very different from Linux / Windows; procmon on windows is king :-). For macOS, it looks like it needs System Integrity Protection turning off and then finding a dtrace based tool for the fs activity (opensnoop or some-such).It would also be good to fix this as a reasonable proportion of workerd users have macOS machines and they have no chance of reporting stack traces even if they want to.
A couple of related observations:
macOS has it's own
backtrace_symbols
function. This might be more expedient to use since it should give meaningful stacks without needing to run an additional tool.llvm-symbolizer
has a--filter-markup
option that consumes symbolizer markup. This probably post-dates the code used in workerd (capnproto) and might make things marginally cleaner.The text was updated successfully, but these errors were encountered: