public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@lists.fedorahosted.org
Subject: Re: [PATCH] Add --core-pattern option to eu-stack
Date: Fri, 28 Nov 2014 15:27:37 +0100	[thread overview]
Message-ID: <1417184857.4954.53.camel@bordewijk.wildebeest.org> (raw)
In-Reply-To: 20141127212711.GA29375@host2.jankratochvil.net

[-- Attachment #1: Type: text/plain, Size: 3429 bytes --]

On Thu, 2014-11-27 at 22:27 +0100, Jan Kratochvil wrote:
> On Thu, 27 Nov 2014 12:04:39 +0100, Mark Wielaard wrote:
> > On Wed, 2014-11-26 at 15:32 +0100, Jan Kratochvil wrote:
> > > Therefore they are dead at the core_pattern time, they cannot be ptraced and
> > > therefore they cannot be unwound. One could only find them in the core file
> > > itself but that is outside of the scope of this eu-stack feature.
> > 
> > Why do you think that is out of scope? We get both the actual tid
> > through the command line option and the core file through stdin. Can't
> > we combine those two to get all information we want/need?
> 
> It could be extended that way but:
> 
> Currently elfutils is used only for the list of unwound PCs.  There is missing
> a big part of functionality present in GDB - displaying parameters, local
> variables, entry-value recovered values, data types pretty printing etc.
> And I have doubts unwind of non-crashed threads is useful at all.

But that not what I suggested. Although I think it would be cool to
extend eu-stack to also show arguments, locals, etc. That is an
interesting project on its own separate from this work.

> It is a new functionality on top of this patch that it has to read thread
> registers from PT_NOTE but access the memory via ptraced crashed thread.
> Fortunately core file PT_NOTE is first so it can be read quickly:
> Program Headers:
>   Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz   Flg Align
>   NOTE           0x0004a0 0x0000000000000000 0x0000000000000000 0x0005f4 0x000000     0
> As reading the whole core file is in many times not possible (without some
> better kernel core dumping interface):
> 	-fsanitize=address locks up abrt-hook-ccpp
> 	https://bugzilla.redhat.com/show_bug.cgi?id=1164548

Is this bug being hit by elfutils/libdwfl core file parsing or a
specific issue with how abrt-hook-ccpp parses its input? I agree a nicer
interface for /proc/sys/kernel/core_pattern would be appreciated. But
that seems a kernel issue. We have to work with what we have now.

systemd has a standard core_pattern hook systemd-coredump (that also
uses elfutils/libdwfl to extract backtraces). Maybe we can work with
them on a interface/daemon to provide access to client programs that
wish to inspect the process/core? But again I think that is separate
from what we are currently working on.

> So I agree your proposal makes some sense but:
>  * I find it an incremental feature on top of this one.
>  * Given elfutils just lists the unwound PCs I do not see how it is useful.
> 
> What is your - or Martin's - opinion on such feature given these contraints?

I think getting backtraces for one or more threads of a crashing/exiting
process is an nice feature. My point is simply that I think that what
you wrote is a nice feature that we need to make into something that is
really usable. Whether that is by extending the support to something
more generic like --wait-pid that can be used independent of the
core_pattern filter or in providing in eu-stack all functionality
expected from a core_pattern filter program so that it is just a drop in
filter program doesn't really matter to me. All I am interested in is
that the eu-stack feature will actually be used and is not just some
example code that isn't really usable or used by actual users.

Cheers,

Mark

             reply	other threads:[~2014-11-28 14:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28 14:27 Mark Wielaard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-11-28 15:04 Mark Wielaard
2014-11-28 14:44 Mark Wielaard
2014-11-27 21:47 Jan Kratochvil
2014-11-27 21:41 Jan Kratochvil
2014-11-27 21:27 Jan Kratochvil
2014-11-27 11:17 Mark Wielaard
2014-11-27 11:05 Mark Wielaard
2014-11-27 11:04 Mark Wielaard
2014-11-26 20:57 Oleg Nesterov
2014-11-26 20:26 Jan Kratochvil
2014-11-26 20:08 Oleg Nesterov
2014-11-26 14:47 Jan Kratochvil
2014-11-26 14:44 Jan Kratochvil
2014-11-26 14:32 Jan Kratochvil
2014-11-03 13:22 Mark Wielaard
2014-10-30 21:55 Mark Wielaard

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

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

  git send-email \
    --in-reply-to=1417184857.4954.53.camel@bordewijk.wildebeest.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@lists.fedorahosted.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.
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).