From sunkusa at amazon.com Sun Oct 5 22:50:20 2025 From: sunkusa at amazon.com (Sunku, Sai) Date: Mon, 6 Oct 2025 02:50:20 +0000 Subject: Call stack context for user space trace points Message-ID: <870C2018-7321-4478-9609-9A75F99468A7@amazon.com> Hello, I have a complex, multithreaded benchmark that emits LTTng trace points at various stages. I am trying to trace all malloc calls made by this benchmark. I'm specifically trying to get malloc trace points also through LTTng so that I can identify when the malloc call was made relative to other trace points from the benchmark. I also want to see the stack trace for each malloc call so that I can identify where in the benchmark the malloc call is coming from. If I preload the lttng libc wrapper with `LD_PRELOAD=liblttng-ust-libc-wrapper.so`, I'm able to see the trace points from malloc calls. But when I try to add the callstack-user context with this command `lttng add-context --userspace --channel 1 --type callstack-user`, I get an error saying "Error: callstack-user: UST invalid context" I've successfully added user space stack traces for kernel trace points with a similar command `lttng add-context --kernel --type callstack-user` Is the callstack-user context only available for kernel trace points? Is there another way to get the call stack for malloc calls? Thank you, Sai Sunku -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.desnoyers at efficios.com Mon Oct 6 11:50:55 2025 From: mathieu.desnoyers at efficios.com (Mathieu Desnoyers) Date: Mon, 6 Oct 2025 11:50:55 -0400 Subject: [RELEASE] LTTng-modules 2.13.21 and 2.14.2 (Linux kernel tracer) Message-ID: <3ca8430a-d2c1-4fc4-8fa7-bc3fa53ee82e@efficios.com> Hi, Those LTTng-modules stable releases mainly fix an missing preemption off issue with system call instrumentation when using LTTng-modules against a Linux kernel v6.13 or more recent, with preemptible kernels (PREEMPT or PREEMPT_LAZY configurations). Users of LTTng-modules with those configurations should upgrade. This issue is the result of an upstream kernel change (introduction of faultable syscall tracepoints), without the introduction of the corresponding changes in LTTng-modules. One effect of this bug is corruption of per-cpu linked-lists under load. It also possible that the ring buffer corrupts itself because of unexpected producer migration. The other change in those releases is the introduction of a wrapper for `get_pfnblock_migatetype` to build against v6.17 kernels. * New in this release: 2025-10-06 LTTng modules 2.14.2 * Fix: Add wrapper for `get_pfnblock_migatetype` * Fix: Protect syscall probes with preemption disable 2025-10-06 LTTng modules 2.13.21 * Fix: Add wrapper for `get_pfnblock_migatetype` * Fix: Protect syscall probes with preemption disable Thanks, Mathieu Project website: https://lttng.org Documentation: https://lttng.org/docs Download link: https://lttng.org/download -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com From bedard.christophe at gmail.com Mon Oct 6 13:22:34 2025 From: bedard.christophe at gmail.com (=?UTF-8?Q?Christophe_B=C3=A9dard?=) Date: Mon, 6 Oct 2025 10:22:34 -0700 Subject: Call stack context for user space trace points In-Reply-To: <870C2018-7321-4478-9609-9A75F99468A7@amazon.com> References: <870C2018-7321-4478-9609-9A75F99468A7@amazon.com> Message-ID: Hi, The userspace callstack context is only available for the kernel domain. There are potential workarounds and solutions; take a look at the discussion in this mailing list thread from last year (hit "Next message"): https://lists.lttng.org/pipermail/lttng-dev/2024-December/030881.html Regards, Christophe On Mon, Oct 6, 2025 at 5:37?AM Sunku, Sai via lttng-dev < lttng-dev at lists.lttng.org> wrote: > Hello, > > > > I have a complex, multithreaded benchmark that emits LTTng trace points at > various stages. I am trying to trace all malloc calls made by this > benchmark. I'm specifically trying to get malloc trace points also through > LTTng so that I can identify when the malloc call was made relative to > other trace points from the benchmark. I also want to see the stack trace > for each malloc call so that I can identify where in the benchmark the > malloc call is coming from. > > > > If I preload the lttng libc wrapper with > `LD_PRELOAD=liblttng-ust-libc-wrapper.so`, I'm able to see the trace points > from malloc calls. > > > > But when I try to add the callstack-user context with this command `lttng > add-context --userspace --channel 1 --type callstack-user`, I get an error > saying "Error: callstack-user: UST invalid context" > > > > I've successfully added user space stack traces for kernel trace points > with a similar command `lttng add-context --kernel --type callstack-user` > > > > Is the callstack-user context only available for kernel trace points? Is > there another way to get the call stack for malloc calls? > > > > Thank you, > > Sai Sunku > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: