From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C93963894C05; Sun, 27 Sep 2020 18:48:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C93963894C05 From: "barrdetwix at gmail dot com" To: systemtap@sourceware.org Subject: [Bug translator/26670] New: In "end" probe, symbol lookup for user stacks is broken (print_usyms/print_ustack functions) Date: Sun, 27 Sep 2020 18:48:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: barrdetwix at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2020 18:48:21 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26670 Bug ID: 26670 Summary: In "end" probe, symbol lookup for user stacks is broken (print_usyms/print_ustack functions) Product: systemtap Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: barrdetwix at gmail dot com Target Milestone: --- I have a script that saves backtraces and tries defers resolving symbols un= til the end, to reduce the overhead. But it seems that resolving user symbols only works in regular probes, not = in the "end" probe. There is no error, the symbols just fail to resolve. Note that there is no such problem for kernel stacks. Version info: Systemtap translator/driver (version 4.4/0.181, commit release-4.3-75-g747902edd81a) Linux 5.8.0-2-amd64 #1 SMP Debian 5.8.10-1 (2020-09-19) x86_64 Please see the following reproducer script (and the output I get below): // stap_end_userstack.stp global ustack; probe vfs.read { ustack =3D ubacktrace(); println("--- In vfs probe"); print_usyms(ustack); exit(); } probe end { println("--- In end probe"); print_usyms(ustack); } $ sudo stap -d /bin/ntfs-3g -d /lib/x86_64-linux-gnu/libpthread-2.31.so -v stap_end_userstack.stp Pass 1: parsed user script and 476 library scripts using 93152virt/78928res/9964shr/69012data kb, in 140usr/30sys/170real ms. Pass 2: analyzed script: 2 probes, 6 functions, 6 embeds, 1 global using 253976virt/241524res/11684shr/229836data kb, in 1500usr/130sys/1642real ms. Pass 3: translated to C into "/tmp/stapri4GCL/stap_7a0d3cf3937b410061615c1e75142f3c_4334_src.c" using 253976virt/241720res/11880shr/229836data kb, in 330usr/20sys/343real ms. Pass 4: compiled C into "stap_7a0d3cf3937b410061615c1e75142f3c_4334.ko" in 8990usr/570sys/6673real ms. Pass 5: starting run. WARNING: Missing unwind data for a module, rerun with 'stap -d /lib/x86_64-linux-gnu/libc-2.31.so' --- In vfs probe 0x7f65a1cb504e : __read+0xe/0xa0 [/lib/x86_64-linux-gnu/libpthread-2.31.so] 0x55b8595b3012 : 0x55b8595b3012 [/bin/ntfs-3g+0x1a012/0x23000] 0x55b8595ad26d : 0x55b8595ad26d [/bin/ntfs-3g+0x1426d/0x23000] 0x55b85959f35f : 0x55b85959f35f [/bin/ntfs-3g+0x635f/0x23000] 0x7f65a1aafcca : 0x7f65a1aafcca [/lib/x86_64-linux-gnu/libc-2.31.so+0x26cca/0x1c1000] --- In end probe 0x7f65a1cb504e : 0x7f65a1cb504e 0x55b8595b3012 : 0x55b8595b3012 0x55b8595ad26d : 0x55b8595ad26d 0x55b85959f35f : 0x55b85959f35f 0x7f65a1aafcca : 0x7f65a1aafcca Pass 5: run completed in 10usr/70sys/677real ms. As you can see, the user stack resolves correctly in a regular probe, but n= ot in the end probe. --=20 You are receiving this mail because: You are the assignee for the bug.=