From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 850A03858C74; Thu, 8 Jun 2023 14:27:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 850A03858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686234465; bh=AwBr1mr/4bnSAabXd3x5TacPQYqLZZ5SDkZ8+eGEeO4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tQJeYBm5acDs12yRBknkasjN/rJv1In+M+g1XH4GWYvmGnoV4GqSAIW2R7SHxcYBQ U2U9IxKFYB1t5XTpyLGtkeO30SPg01c34mvikq8PGSoxq6ev1sLuO0utKcOPVCuAcZ 0FW16ArA1iR2u1YmOqPCP2mProAuvdL3b87jWj0E= From: "mcermak at redhat dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/30407] Tapset function print_ubacktrace_fileline() no longer works on kernel 6.2/6.1 Date: Thu, 08 Jun 2023 14:27:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mcermak at redhat 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: cc Message-ID: In-Reply-To: References: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30407 Martin Cermak changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mcermak at redhat dot com --- Comment #2 from Martin Cermak --- This can be replicated with rhel8 (works) versusus rhel9 (doesn't work). B= ut I don't think it's related to kernel: After copying my test binary from rhel8 over to rhel9 (and making sure it's md5-identical, things started to work e= ven on rhel9! The following comes from my rhel8 binary where things work fine: > 8 x86_64 # eu-readelf --debug-dump=3Dinfo a.out=20 >=20 > DWARF section [26] '.debug_info' at offset 0x2e70: > [Offset] > Compilation unit at offset 0: > Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size= : 4 > [ b] compile_unit abbrev: 1 > producer (strp) "GNU C17 8.5.0 20210514 (Red Hat 8= .5.0-19) -mtune=3Dgeneric -march=3Dx86-64 -g" > language (data1) C99 (12) > name (strp) "test.c" > comp_dir (strp) "/root/build" > low_pc (addr) 0x0000000000400536
> high_pc (data8) 11 (0x0000000000400541) > stmt_list (sec_offset) 0 > [ 2d] subprogram abbrev: 2 > external (flag_present) yes > name (strp) "main" > decl_file (data1) test.c (1) > decl_line (data1) 1 > decl_column (data1) 5 > prototyped (flag_present) yes > type (ref4) [ 4b] > low_pc (addr) 0x0000000000400536
> high_pc (data8) 11 (0x0000000000400541) > frame_base (exprloc)=20 > [ 0] call_frame_cfa > GNU_all_call_sites (flag_present) yes > [ 4b] base_type abbrev: 3 > byte_size (data1) 4 > encoding (data1) signed (5) > name (string) "int" > 8 x86_64 # Now here's what my rhel9 binary shows: > 9 x86_64 # eu-readelf --debug-dump=3Dinfo a.out=20 >=20 > DWARF section [27] '.debug_info' at offset 0x47a0: > [Offset] > Compilation unit at offset 0: > Version: 5, Abbreviation section offset: 0, Address size: 8, Offset size= : 4 > Unit type: compile (1) > [ c] compile_unit abbrev: 1 > producer (strp) "GNU C17 11.3.1 20221121 (Red Hat = 11.3.1-4) -mtune=3Dgeneric -march=3Dx86-64-v2 -g" > language (data1) C11 (29) > name (line_strp) "test.c" > comp_dir (line_strp) "/root/build" > low_pc (addr) 0x0000000000401106
> high_pc (data8) 11 (0x0000000000401111) > stmt_list (sec_offset) 0 > [ 2e] subprogram abbrev: 2 > external (flag_present) yes > name (strp) "main" > decl_file (data1) test.c (1) > decl_line (data1) 1 > decl_column (data1) 5 > prototyped (flag_present) yes > type (ref4) [ 4c] > low_pc (addr) 0x0000000000401106
> high_pc (data8) 11 (0x0000000000401111) > frame_base (exprloc)=20 > [ 0] call_frame_cfa > call_all_calls (flag_present) yes > [ 4c] base_type abbrev: 3 > byte_size (data1) 4 > encoding (data1) signed (5) > name (string) "int" > 9 x86_64 #=20 I've verified that -march, doesn't cause the difference. But enforcing DWA= RF4 on rhel9 with `gcc -gdwarf-4` makes things work again on rhel9! So I think it's the DWARF version that makes the difference :) The print_ubacktrace_fileline() call propagates down to _stp_linenumber_lookup(address, task, &filename, ...) which already returns= the NULL filename. Stepping in, this calls _stp_linenumber_lookup(), which ret= urns struct _stp_module with a NULL debug_line member. Looking farther... --=20 You are receiving this mail because: You are the assignee for the bug.=