unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: 58733@debbugs.gnu.org
Subject: bug#58733: installer: coredump generation
Date: Sun, 23 Oct 2022 11:29:37 +0200	[thread overview]
Message-ID: <87o7u228hq.fsf@gnu.org> (raw)


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@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




             reply	other threads:[~2022-10-24  4:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23  9:29 Mathieu Othacehe [this message]
2022-10-31 13:34 ` bug#58733: installer: coredump generation Mathieu Othacehe
2022-10-31 15:51   ` Mathieu Othacehe
2022-11-02 10:34   ` Ludovic Courtès
2022-11-02 16:58     ` Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7u228hq.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=58733@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).