+++ This bug was initially created as a clone of Bug #1365812 +++ Description of problem: I ran eu-stack with a core dump file generated by gcore. $ sleep 1000 & $ SLEEP_PID=$! $ gcore $SLEEP_PID $ eu-stack --executable=/usr/bin/sleep --core=core.$SLEEP_PID eu-stack: link_map.c:846: dwfl_link_map_report: Assertion `in.d_size == phnum * phent' failed. Aborted (core dumped) Version-Release number of selected component: elfutils-0.166-2.fc25 Truncated backtrace: Thread no. 1 (7 frames) #25 ?? #26 dwfl_link_map_report at link_map.c:846 #27 dwfl_core_file_report at core-file.c:531 #28 parse_opt at stack.c:595 #29 parser_parse_arg at argp-parse.c:716 #30 parser_parse_next at argp-parse.c:865 #31 __argp_parse at argp-parse.c:921 --- Additional comment from Matej Habrnal on 2016-08-10 11:30:56 CEST --- It is possible to generate backtrace from such a coredump using gdb: $ gdb -batch -ex 'file /usr/bin/sleep' -ex "core-file core.$SLEEP_PID" -ex "bt" [New LWP 22760] Core was generated by `sleep'. #0 0x00007fe59479c810 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:84 84 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) #0 0x00007fe59479c810 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:84 #1 0x000055d61b75845f in rpl_nanosleep () #2 0x000055d61b7582c0 in xnanosleep () #3 0x000055d61b75587d in main () --- Additional comment from Jan Kratochvil on 2016-08-10 13:55:09 CEST --- The core file generated by gcore is bogus so it is rather a GDB bug: 3 AT_PHDR Program headers for program 0x55848c2b5040 9 AT_ENTRY Entry point of program 0x55848c2b6940 ^^^ it points to nowhere: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000df8 0x000055848c4bb000 0x0000000000000000 0x0000000000001000 0x0000000000001000 R 1 LOAD 0x0000000000001df8 0x000055848c4bc000 0x0000000000000000 0x0000000000001000 0x0000000000001000 RW 1 LOAD 0x0000000000002df8 0x000055848e3b7000 0x0000000000000000 0x0000000000021000 0x0000000000021000 RW 1 --- Additional comment from Jan Kratochvil on 2016-08-10 21:50:35 CEST --- A workaround is: (gdb) shell cat /proc/20477/coredump_filter 00000033 (gdb) shell echo 0x37 >/proc/20477/coredump_filter (gdb) shell cat /proc/20477/coredump_filter 00000037 (gdb) gcore /tmp/sleep.core (gdb) shell echo 0x33 >/proc/20477/coredump_filter This is not a regression, before 'set use-coredump-filter' (gdb >=7.10) GDB also never dumped pages of binary code.
FWIW, I am currently implementing the support for setting the coredump filter flags from inside GDB, i.e., without having to resort to invoking a shell. This feature should solve or at least help in this issue.
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
This bug is currently reported against a Fedora version which is already unsuported. I am changing the version to '27', the latest supported release. Please check whether this bug is still an issue on the '27' release. If you find this bug not being applicable on this release, please close it.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
Fixed upstream by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=57e5e645010430b3d73f8c6a757d09f48dc8f8d5 commit 57e5e645010430b3d73f8c6a757d09f48dc8f8d5 Author: Sergio Durigan Junior <sergiodj> Date: Tue Apr 23 18:17:57 2019 -0400 Implement dump of mappings with ELF headers by gcore I'll prepare a Fedora GDB release with it tomorrow.
Building gdb-8.3.50.20190501-11.fc31 right now, so I'm closing this. Please reopen if needed. Thanks.
Sorry, as it turns out the package failed to build and there are a bunch of new regressions (unrelated to this bug). I'm reopening this bug temporarily just to keep things in sync.
Fixed.
gdb-8.3-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2bfea97c1a
gdb-8.3-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-2bfea97c1a
gdb-8.3-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.