0

When I report a crash using ABRT, it attaches a file maps, which shows memory mappings - and their permissions - saved from /proc/self/maps.

I have a crash of gnome-shell which has mysteriously failed to show up in ABRT, despite showing up in coredumpctl. (This searches for records in the systemd journal, written by systemd-coredump).

I cannot see any option to show mapping information in coredumpctl. I tried coredumpctl gdb. Amazingly, info proc mappings appeared to work :-) However this gdb command does not seem to tell me the permissions for each mapping, like /proc/self/maps does.

Is it possible to get this information? I rather wanted to confirm the permissions for the particular mapping that gnome-shell accessed to trigger the crash.

$ head /proc/self/maps
55fd5c982000-55fd5c984000 r--p 00000000 fd:00 1704424                    /usr/bin/head
55fd5c984000-55fd5c98a000 r-xp 00002000 fd:00 1704424                    /usr/bin/head
55fd5c98a000-55fd5c98d000 r--p 00008000 fd:00 1704424                    /usr/bin/head
55fd5c98d000-55fd5c98e000 r--p 0000a000 fd:00 1704424                    /usr/bin/head
55fd5c98e000-55fd5c98f000 rw-p 0000b000 fd:00 1704424                    /usr/bin/head
55fd5da11000-55fd5da32000 rw-p 00000000 00:00 0                          [heap]
7f4d1a181000-7f4d27129000 r--p 00000000 fd:00 1705474                    /usr/lib/locale/locale-archive
7f4d27129000-7f4d2714b000 r--p 00000000 fd:00 1711052                    /usr/lib64/libc-2.28.so
7f4d2714b000-7f4d27298000 r-xp 00022000 fd:00 1711052                    /usr/lib64/libc-2.28.so
7f4d27298000-7f4d272e4000 r--p 0016f000 fd:00 1711052                    /usr/lib64/libc-2.28.so

$ coredumpctl gdb gnome-shell
...
(gdb) info proc mappings
Mapped address spaces:

          Start Addr           End Addr       Size     Offset objfile
      0x55cbdcc70000     0x55cbdcc72000     0x2000        0x0 /usr/bin/gnome-shell
      0x55cbdcc72000     0x55cbdcc74000     0x2000     0x2000 /usr/bin/gnome-shell
      0x55cbdcc74000     0x55cbdcc75000     0x1000     0x4000 /usr/bin/gnome-shell
      0x55cbdcc75000     0x55cbdcc76000     0x1000     0x4000 /usr/bin/gnome-shell
      0x55cbdcc76000     0x55cbdcc77000     0x1000     0x5000 /usr/bin/gnome-shell
      0x7f9b3f600000     0x7f9b3fb00000   0x500000        0x0 /i915 (deleted)
      0x7f9b3fb00000     0x7f9b40000000   0x500000        0x0 /i915 (deleted)
...
sourcejedi
  • 3,051
  • 2
  • 24
  • 42

1 Answers1

0
journalctl -b -u systemd-coredump@* -o verbose

The above command shows all the text fields of journal records for crashes during the current boot.

A copy of /proc/[pid]/maps is recorded in the field COREDUMP_PROC_MAPS.

However, it appears to be truncated somehow. (gnome-shell has a lot of mappings). Adding the --full option to journalctl does not help.

    COREDUMP_PROC_MAPS=dff14ca4000-dff14cb4000 ---p 00000000 00:00 0 
                       dff14cb4000-dff14cc4000 r-xp 00000000 00:00 0 
                       dff14cc4000-dff14d04000 ---p 00000000 00:00 0 
[... my omission ...]
                       7f9bcaa01000-7f9bcaa02000 rw-s 00000000 00:2b 5074731                    /i915 (deleted)
                       7f9bcaa02000-7f9bcaa03000 rw-s 00000000 00:2b 5074730                    /i915 (deleted)
                       7f9bcaa03000-7f9bcaa04000 rw-s 00000000 00:35 5522157                    /run/user/1000/xwayland-shared-zooWRD (deleted)
                       7f9bcaa04000-7f9bcaa05000 rw-s 00000000 00:35 5522156                    /run/user/1000/xwayland-shared-CBgtV0 (deleted)
                       7f9bcaa05000-7f9bcaa06000 rw-s 000000...
                                                            ^ this ellipsis is in the original output.
sourcejedi
  • 3,051
  • 2
  • 24
  • 42