Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions tools/coredump/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,37 @@ currently support adding maps in an automated fashion. The best way to do this
is to look through existing code in this package and to see where existing code
refers to particular BPF maps.

## LuaJIT (Tarantool) coredumps

The `luajit-tarantool-*` cases exercise the LuaJIT unwinder against a
statically linked, GC64 Tarantool running a recursive Lua workload. They verify
host-executable detection, hidden-symbol offset extraction, Lua frame recovery,
and the native handback across a Tarantool fiber on amd64 and arm64.

A few details are intentional:

- The snapshots were captured with `jit.off(true, true)`, so the sampled thread
stays in the bytecode interpreter. Offline coredump replay is currently
single-pass and cannot perform the live `report_pid -> SynchronizeMappings`
cycle that associates an anonymous JIT-mcode mapping with `G`. The
interpreter path reads `L` from the saved VM frame and is deterministic. JIT
mcode is covered by live profiling and direct extractor tests.
- Tarantool statically links LuaJIT. These fixtures therefore depend on the
Tarantool host detection added by the parent PR rather than a separate
`libluajit-5.1.so` mapping.
- The single `?+0x0` frame at the native/Lua boundary is expected. The replay
symbolizer renders the synthetic LuaJIT interpreter-routing FileID this way;
live profiling resolves the corresponding location to `tarantool+offset`.
The Lua source frames themselves resolve normally.
- The arm64 golden ends with `native_stack_delta_invalid` at Tarantool's fiber
context-switch trampoline, which lacks usable CFI. The amd64 golden unwinds
through the native fiber entry.

The core and module bundles are stored outside Git. Upload them to the Parca
coredump artifact bucket before expecting these cases to pass in CI. Their raw
captures and regeneration notes are backed up on Shopify's
`dale/luajit-coredump-data` branch.

## Parca extension: fallback GCS bucket

Currently, we have a GCS bucket called `parca-coredump-artifacts` that we can fall back to
Expand Down
101 changes: 101 additions & 0 deletions tools/coredump/testdata/amd64/luajit-tarantool-amd64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"coredump-ref": "65ef424d129db489d5fe7133be988d94a7137718d45fc8cb550917404949f392",
"threads": [
{
"lwp": 1,
"frames": [
"?+0x0",
"fib+2 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+10 in @/workload/workload.lua:4",
"fib+10 in @/workload/workload.lua:4",
"fib+10 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+10 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+10 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+10 in @/workload/workload.lua:4",
"fib+10 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+10 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"fib+7 in @/workload/workload.lua:4",
"hot_loop+11 in @/workload/workload.lua:15",
"tarantool+0x2691ed",
"tarantool+0x2021a6",
"tarantool+0x1f5fc0",
"tarantool+0x1f7516",
"tarantool+0x5139f",
"tarantool+0x227c75",
"tarantool+0x49f029"
]
}
],
"modules": [
{
"ref": "ddbb3718b8bd9cbd780e5ab08b4503c30a6c4fa0706ebe5d074ed6b596c1714e",
"local-path": "/usr/lib/x86_64-linux-gnu/libicudata.so.74.2"
},
{
"ref": "1b87a1a50b496cfead2b0ad134c2ff536705c82608db240c7e8aa48d6c0e4217",
"local-path": "/usr/lib/x86_64-linux-gnu/libm.so.6"
},
{
"ref": "e6391daf670544d3a8f2b8a0cb8e27b4246fea109352abed50a29ec57f03153d",
"local-path": "/usr/lib/x86_64-linux-gnu/libcrypto.so.3"
},
{
"ref": "9b64150b28505a33d6bc3ecf709c279f6de97a1c184dbda65d06ee4537f6d286",
"local-path": "/usr/lib/x86_64-linux-gnu/libz.so.1.3"
},
{
"ref": "7560aadde38e5f4237a47a1ddd5891f9b36768a77a60faae30beee003ac01901",
"local-path": "/usr/lib/x86_64-linux-gnu/libicuuc.so.74.2"
},
{
"ref": "d8db8739a1633c972cec6a4fe0566bdcec6fd088f98723492ab0361f66238f75",
"local-path": "/usr/lib/x86_64-linux-gnu/libc.so.6"
},
{
"ref": "d93224d2b0dab4247598be683adca02f5cf00586f99c187579cd7e92058fb7cb",
"local-path": "/usr/lib/x86_64-linux-gnu/libgcc_s.so.1"
},
{
"ref": "0ca2c28b026f0084661fbb0e69079436680f3b6dd1f4aa3436395442456a6d4c",
"local-path": "/usr/lib/x86_64-linux-gnu/libssl.so.3"
},
{
"ref": "0a079f958147699f7bb5bf228406a5d878dc2387fe9cdc5cce6f3e35e20380fc",
"local-path": "/usr/lib/x86_64-linux-gnu/libreadline.so.8.2"
},
{
"ref": "d2b95b42f1183f9309f342b1f82a6ec2cf4ddb866b59294040db630203534ac6",
"local-path": "/usr/local/bin/tarantool"
},
{
"ref": "3550b194eb2cf2e6f798f033eb9ca279d498c21296b4a18790ce158d2023e47b",
"local-path": "/usr/lib/x86_64-linux-gnu/libicui18n.so.74.2"
},
{
"ref": "61f693cd7f8e55ad3ab518b20a00c01adb46ef829cf90773c97615a73f99e09b",
"local-path": "/usr/lib/x86_64-linux-gnu/libtinfo.so.6.4"
},
{
"ref": "1fd75fe70354a416d75aef22bcae68c47bd25d20e2d0568c30b1a9838cf62f11",
"local-path": "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33"
},
{
"ref": "1cd555ac46b7887edeaf3c42aac5408c8135e52f6b37870da2cf82d5fe14e829",
"local-path": "/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2"
},
{
"ref": "4cd12047e55a7b37f47293cca6dd2c2a317f0feaa3acfe7cfc4087942149f2fd",
"local-path": "/usr/lib/x86_64-linux-gnu/ossl-modules/legacy.so"
}
]
}
86 changes: 86 additions & 0 deletions tools/coredump/testdata/arm64/luajit-tarantool-arm64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"coredump-ref": "74fa2821d4dc0b6b99f6aa9495fc2983e1cf17fb940a9a94ea05f60935dc5bd6",
"threads": [
{
"lwp": 1,
"frames": [
"tarantool+0x24c96c",
"tarantool+0x24b3b7",
"?+0x0",
"churn+10 in @/workload/workload.lua:6",
"hot_loop+7 in @/workload/workload.lua:14",
"main+19 in @/workload/workload.lua:20",
"tarantool+0x24369f",
"tarantool+0x1e2067",
"tarantool+0x1d64f3",
"tarantool+0x1d79fb",
"tarantool+0x4ffd3",
"tarantool+0x205bef",
"tarantool+0x4460df",
"<unwinding aborted due to error native_stack_delta_invalid>"
]
}
],
"modules": [
{
"ref": "9d58137df08c36a03417445cc39576b0a95b538bdf0733f5455d2255deb9b799",
"local-path": "/usr/lib/aarch64-linux-gnu/libicuuc.so.74.2"
},
{
"ref": "7bd69f1141097e7d127cdf3436fa7448dc7925bf2e3da0fdf028e94ec2e69243",
"local-path": "/usr/lib/aarch64-linux-gnu/libicui18n.so.74.2"
},
{
"ref": "6b36396f4f159c682ce4b5998a40b1f393a5aa6dceca0392862db9b9f957e971",
"local-path": "/usr/local/bin/tarantool"
},
{
"ref": "d5b262e559d38769e4959f036a1cc2c4009fa60b4ec836a7a19ca8554aebf5a5",
"local-path": "/usr/lib/aarch64-linux-gnu/libm.so.6"
},
{
"ref": "c1d736453c7e02e765f562c0a67b3c4d250cca2be71a3c24023830bdb45d095f",
"local-path": "/usr/lib/aarch64-linux-gnu/libcrypto.so.3"
},
{
"ref": "170380b4e7ab28ec86eb090b48df90f84089392cb72fecd5067e5b7a4dc5239f",
"local-path": "/usr/lib/aarch64-linux-gnu/libz.so.1.3"
},
{
"ref": "393384096ffa869e1be20d2f91fdf08dfadb9f3e531dfe724085d8501d3f85d9",
"local-path": "/usr/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1"
},
{
"ref": "7bbaee1535d845b4baf8323e75f25cb58d3bcab18bd1bc5b231932a17bc029e8",
"local-path": "/usr/lib/aarch64-linux-gnu/libtinfo.so.6.4"
},
{
"ref": "96b1154b9ab94cfc908c0fe745edc128ee3f67e444c66e2d7a9cf06664df9255",
"local-path": "/usr/lib/aarch64-linux-gnu/libicudata.so.74.2"
},
{
"ref": "fe5966a43e068ad7cb389c3affa069f4ee6f296e07d7ccc0398a23cfde4f0b7e",
"local-path": "/usr/lib/aarch64-linux-gnu/libc.so.6"
},
{
"ref": "9304a29cab091c6c0172368c0ce223b4b192383f7c696cb94d61bdeb372d0bf7",
"local-path": "/usr/lib/aarch64-linux-gnu/libssl.so.3"
},
{
"ref": "8429685aebd68eeb1eb2fea0d28527f154437b83044f780067f33d6a2cbaa624",
"local-path": "/usr/lib/aarch64-linux-gnu/ossl-modules/legacy.so"
},
{
"ref": "f2d3ad2bf0b61f6bc944cc37d7b6ab7f88d2582b41ff989ca164803f56cc5f20",
"local-path": "/usr/lib/aarch64-linux-gnu/libgcc_s.so.1"
},
{
"ref": "6e3112d35cfc86db7ee85b27e1746f67408e2837ff8628b46386c3eabd5682a4",
"local-path": "/usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.33"
},
{
"ref": "926b1d5d4793773021fb3383d797241323a1b68fb2eb4863e67cdf006dddf603",
"local-path": "/usr/lib/aarch64-linux-gnu/libreadline.so.8.2"
}
]
}
Loading