Commit 6063823
committed
Enable stack trace symbolization for OSS builds
Historically, HHVM statically linked the system libbfd to power
stack trace symbolization in its crash reports and in perf map files.
This was disabled for OSS in D2137703[1] because of the wildly differing libbfd ABI across
target systems. D3742004[2] and D3855027[3] then brought in
folly::Symbolizer for both use cases, but this remained gated behind a
Meta-only define.
folly::Symbolizer has been stable in upstream folly for a while now, so
let's enable it unconditionally and deshim the experimental/ header.
This also allows removing the dead libbfd integration.
For this to work, the folly build must be built with and able to find libunwind,
which isn't a given when building against libc++ and LLVM libunwind
on Ubuntu as it installs includes into a subdirectory, so provide an
additional hint for this case.
This allows us to finally have a proper stacktrace rather than raw
memory addresses in crash reports, such as:
```
Core dumped: Segmentation fault
Stack trace in /tmp/stacktrace.902095.log
Host: hhvm-jammy-vm
ProcessID: 902095
ThreadID: 281473658339392
ThreadPID: 902095
Name: /usr/local/bin/hhvm
CmdLine: hhvm ../hhvm/hphp/test/quick/dv.php
Type: Segmentation fault
Runtime: hhvm
Version: heads/7.70.0-slack-0-g7be53eff8d22faa0383a128696fae83b224aedd5
DebuggerCount: 0
Arguments: ../hhvm/hphp/test/quick/dv.php
ThreadType: CLI
-------------------------------Treadmill Information----------------------------
Now: 235093382994348
OldestStartTime: 235093373066177
InflightRequestsSize: 1
Active Requests:
281473658339392 1 235093373066177 (age 9ms) (timeout 0s) CLISession OLDEST
------------------------------------------------------------------------------
CPP Stacktrace:
# 0 HPHP::jit::FixupMap::processFixupForVMFrame(HPHP::jit::VMFrame)
# 1 HPHP::jit::FixupMap::fixupWork(HPHP::ActRec*, bool)
# 2 HPHP::jit::detail::syncVMRegsWork(bool)
# 3 HPHP::createBacktrace(HPHP::BacktraceArgs const&)
# 4 HPHP::f_debug_backtrace(long, long)
# 5 HPHP::throwable_init(HPHP::ObjectData*)
# 6 HPHP::ObjectData* HPHP::ObjectData::newInstance<false>(HPHP::Class*)
# 7 HPHP::SystemLib::AllocRuntimeExceptionObject(HPHP::Variant const&)
# 8 HPHP::SystemLib::throwRuntimeExceptionObject(HPHP::Variant const&)
# 9 HPHP::throwMissingArgument(HPHP::Func const*, int)
PHP Stacktrace:
#0 main() called at [/home/mszabo/hhvm/hphp/test/quick/dv.php:28]
#1 main_entry()
```
[1] a66dd13
[2] c11ad4e
[3] 0e082c41 parent dd50fcc commit 6063823
File tree
8 files changed
+13
-504
lines changed- CMake
- build/fbcode_builder/CMake
- hphp
- runtime/vm/debug
- util
- third-party/folly
- patches
8 files changed
+13
-504
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| |||
427 | 428 | | |
428 | 429 | | |
429 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
430 | 435 | | |
431 | 436 | | |
432 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 28 | + | |
37 | 29 | | |
38 | 30 | | |
39 | 31 | | |
| |||
115 | 107 | | |
116 | 108 | | |
117 | 109 | | |
118 | | - | |
119 | | - | |
120 | 110 | | |
121 | 111 | | |
122 | 112 | | |
| |||
141 | 131 | | |
142 | 132 | | |
143 | 133 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | 134 | | |
190 | 135 | | |
191 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | 192 | | |
200 | 193 | | |
201 | 194 | | |
| |||
0 commit comments