public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/31031] New: gcore misses non-contiguous file mappings
@ 2023-11-03 19:39 amerey at redhat dot com
  2023-11-03 19:40 ` [Bug gdb/31031] " amerey at redhat dot com
  2023-11-03 19:40 ` amerey at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: amerey at redhat dot com @ 2023-11-03 19:39 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31031

            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=15209&action=edit
copy of /proc/PID/maps

While looking into https://sourceware.org/bugzilla/show_bug.cgi?id=30975 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     
/usr/lib64/libpython2.7.so.1.0
      7f432a3c0000-7f432a3e2000 00000000 139264      /usr/lib64/ld-2.17.so
      7f432a5d8000-7f432a5df000 00000000 28672      
/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     
/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. 

I've also attached a copy of the python process' /proc/PID/maps file, which
agrees with systemd.core.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/31031] gcore misses non-contiguous file mappings
  2023-11-03 19:39 [Bug gdb/31031] New: gcore misses non-contiguous file mappings amerey at redhat dot com
@ 2023-11-03 19:40 ` amerey at redhat dot com
  2023-11-03 19:40 ` amerey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: amerey at redhat dot com @ 2023-11-03 19:40 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31031

--- Comment #1 from Aaron Merey <amerey at redhat dot com> ---
Created attachment 15210
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15210&action=edit
gcore.core

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/31031] gcore misses non-contiguous file mappings
  2023-11-03 19:39 [Bug gdb/31031] New: gcore misses non-contiguous file mappings amerey at redhat dot com
  2023-11-03 19:40 ` [Bug gdb/31031] " amerey at redhat dot com
@ 2023-11-03 19:40 ` amerey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: amerey at redhat dot com @ 2023-11-03 19:40 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31031

--- Comment #2 from Aaron Merey <amerey at redhat dot com> ---
Created attachment 15211
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15211&action=edit
sytemd.core

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-03 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-03 19:39 [Bug gdb/31031] New: gcore misses non-contiguous file mappings amerey at redhat dot com
2023-11-03 19:40 ` [Bug gdb/31031] " amerey at redhat dot com
2023-11-03 19:40 ` amerey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).