Skip to content

Commit 60144ef

Browse files
authored
Report correct PID from LuaJIT unwinder (#229)
1 parent 83f637e commit 60144ef

3 files changed

Lines changed: 2 additions & 1 deletion

File tree

support/ebpf/luajit_tracer.ebpf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,8 @@ find_context(struct pt_regs *ctx, PerCPURecord *record, const LuaJITProcInfo *in
509509
// Once the HA fills in text_section_bias with G we'll stop sending these report_pids.
510510
if (state->text_section_bias == 0) {
511511
DEBUG_PRINT("lj: unwinding unmapped JIT frame");
512-
report_pid(ctx, record->trace.pid, RATELIMIT_ACTION_DEFAULT);
512+
u64 pid_tgid = (u64)record->trace.pid << 32 | record->trace.tid;
513+
report_pid(ctx, pid_tgid, RATELIMIT_ACTION_DEFAULT);
513514

514515
// If top frame isn't luajit we can't rely on the register still holding the DISPATCH table,
515516
// but once we propagate G to the HA text_section_bias will be set to the G pointer and we can

support/ebpf/tracer.ebpf.amd64

320 Bytes
Binary file not shown.

support/ebpf/tracer.ebpf.arm64

320 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)