GNU bug report logs -
#58733
installer: coredump generation
Previous Next
Reported by: Mathieu Othacehe <othacehe <at> gnu.org>
Date: Sun, 23 Oct 2022 09:30:02 UTC
Severity: normal
Done: Mathieu Othacehe <othacehe <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#58733: installer: coredump generation
which was filed against the guix package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 58733 <at> debbugs.gnu.org.
--
58733: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58733
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hey,
> Both look reasonable to me, thanks!
Thanks for reviewing :)
> Now, we should probably focus on Guile-Parted…
Yes, I saw you sent a few pointers, that will be my next focus!
Mathieu
[Message part 3 (message/rfc822, inline)]
Hello,
This installer sometimes sadly segfaults, most of the time in
libparted. To be able to catch this coredump[1], I ran those commands:
--8<---------------cut here---------------start------------->8---
echo /tmp/core > /proc/sys/kernel/core_pattern
prlimit --core=unlimited --pid=1234
--8<---------------cut here---------------end--------------->8---
The coredump I obtained did not seem to be exploitable, despite the fact
that it weights 155MB:
--8<---------------cut here---------------start------------->8---
mathieu <at> meije ~/guix [env]$ gdb /gnu/store/1jgcbdzx2ss6xv59w55g3kr3x4935dfb-guile-3.0.8/bin/guile core
...
BFD: warning: /home/mathieu/guix/core has a segment extending past end of file
warning: core file may not match specified executable file.
...
Failed to read a valid object file image from memory.
Core was generated by `/gnu/store/1jgcbdzx2ss6xv59w55g3kr3x4935dfb-guile-3.0.8/bin/guile --no-auto-com'.
--8<---------------cut here---------------end--------------->8---
So I decided to adopt a new strategy and ran:
--8<---------------cut here---------------start------------->8---
$ gdb
$ attach 1234
...
$ gcore
--8<---------------cut here---------------end--------------->8---
to get a viable core dump, and those commands to exploit it (thanks
Josselin!):
--8<---------------cut here---------------start------------->8---
(gdb) info sharedlibrary
From To Syms Read Shared Object Library
...
0x00007f892c59c850 0x00007f892c5d3d0b Yes (*) /gnu/store/qz7qqrhgcs3ixv8f1k30gwiqr1prm7qs-parted-3.5/lib/libparted.so
(gdb) add-symbol-file /gnu/store/b0ymz7vjfkcvhbci49q5yk1fi0l9lq49-parted-3.5/lib/libparted.so 0x00007f892c59c850
add symbol table from file "/gnu/store/b0ymz7vjfkcvhbci49q5yk1fi0l9lq49-parted-3.5/lib/libparted.so" at
.text_addr = 0x7f892c59c850
(y or n) y
Reading symbols from /gnu/store/b0ymz7vjfkcvhbci49q5yk1fi0l9lq49-parted-3.5/lib/libparted.so...
(gdb) bt
#0 linux_destroy (dev=0x1dc89e0) at arch/linux.c:1615
#1 0x00007f8941aecd37 in ?? () from /gnu/store/1jgcbdzx2ss6xv59w55g3kr3x4935dfb-guile-3.0.8/lib/libguile-3.0.so.1
...
--8<---------------cut here---------------end--------------->8---
I think that it would be great if we could enable coredump generation
from the installer. This way, when a crash occurs and the installer
restarts, it would notice that there is an existing coredump in say
/tmp/coredump_xxx and propose to upload it using the existing dump
mechanism.
Thanks,
Mathieu
[1]: https://issues.guix.gnu.org/58732
This bug report was last modified 2 years and 203 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.