From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7DAA3858C5E; Fri, 3 Nov 2023 19:39:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7DAA3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1699040394; bh=MlcdeCmkSJKqfTuQhvEgb0Bct3Mr9uHMiXCCBf6+aVU=; h=From:To:Subject:Date:From; b=Ts9rSwn71u2Mhyd/zD2H0j25q57t8ZALeJESxwuEJ7tqRQL8x9SdfLYqSxIdb7n78 MD/tGb8F3tN8a7aQhf9L6oqrvg7zEjSrvMiuPkc0fSDEWbAuU5ohzdKC7w5GoF6Ybn FeuxYdgUCBcN4HW+n9AWIYvb/pbsa/lJxtWphwQk= From: "amerey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/31031] New: gcore misses non-contiguous file mappings Date: Fri, 03 Nov 2023 19:39:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amerey at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned 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 attachments.created 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31031 Bug ID: 31031 Summary: gcore misses non-contiguous file mappings Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: amerey at redhat dot com Target Milestone: --- Created attachment 15209 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D15209&action=3Ded= it copy of /proc/PID/maps While looking into https://sourceware.org/bugzilla/show_bug.cgi?id=3D30975 I noticed that gcore produces corefiles with missing file mappings in NT_FILE= if the segments for some shared library are not all contiguous. To reproduce this on RHEL 7.9, run python and let it idle while waiting for user input. Generate a corefile for this process with gcore, then kill the process with `kill -11` to generate a corefile through systemd (systemd coredumps must be enabled). I've attached 2 corefiles that were generated with the above procedure. The non-contiguously loaded shared library in question is ld-2.17.so. systemd.core NT_FILE contains: [...] 7f432a373000-7f432a3b1000 0017f000 253952=20=20=20=20=20 /usr/lib64/libpython2.7.so.1.0 7f432a3c0000-7f432a3e2000 00000000 139264 /usr/lib64/ld-2.17.so 7f432a5d8000-7f432a5df000 00000000 28672=20=20=20=20=20=20 /usr/lib64/gconv/gconv-modules.cache 7f432a5e1000-7f432a5e2000 00021000 4096 /usr/lib64/ld-2.17.so 7f432a5e2000-7f432a5e3000 00022000 4096 /usr/lib64/ld-2.17.so while gcore.core NT_FILE contains: [...] 7f432a373000-7f432a3b1000 0017f000 253952=20=20=20=20=20 /usr/lib64/libpython2.7.so.1.0 7f432a5e1000-7f432a5e2000 00021000 4096 /usr/lib64/ld-2.17.so 7f432a5e2000-7f432a5e3000 00022000 4096 /usr/lib64/ld-2.17.so An ld segment and a gconv segment are missing from gcore.core but present in systemd.core.=20 I've also attached a copy of the python process' /proc/PID/maps file, which agrees with systemd.core. --=20 You are receiving this mail because: You are on the CC list for the bug.=