public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Martin Liška" <mliska@suse.cz>
Cc: debugedit@sourceware.org, dwz@sourceware.org,
	Tom de Vries <tdevries@suse.de>
Subject: Re: [PATCH] Fail if dwz fails.
Date: Sun, 16 May 2021 22:14:50 +0200	[thread overview]
Message-ID: <YKF9OhngfI4w/I7E@wildebeest.org> (raw)
In-Reply-To: <153645a1-cdd7-e5cc-a392-e63ad3d44433@suse.cz>

Hi Martin,

On Fri, May 14, 2021 at 12:46:15PM +0200, Martin Liška wrote:
> On 5/13/21 4:07 PM, Mark Wielaard wrote:
> > > On 4/22/21 1:11 PM, Martin Liška wrote:
> > > > Right now, dwz return code is 0 or a small integer value (<= 3)
> > > > for situations like:
> > > > 
> > > > - dwz: Too few files for multifile optimization
> > > > - dwz: Multi-file optimization not allowed for different pointer sizes or endianity
> > > > 
> > > > These are not fatal errors and the script should continue. On the other
> > > > hand abort or segfault error values should cause failure of the script.
> > > > 
> > > > Let's reserve values 1-16 for a recoverable dwz exit codes.
> > 
> > With "recoverable" you mean that dwz did do compression, but could not
> > deliver optimal compression?
> 
> No, I speak about cases, where compression cannot be done
> (different endianess, ptr sizes, not beneficial, any other reason).

I think we are talking about somewhat the same thing. In those cases
dwz does something. The result is just not optimal.

> > It would be good to have an ack from the dwz developers that 1 to 16
> > are "recoverable" errors (I added dwz@sourceware.org to CC).
> 
> Yes. That's why I CCed Tom.
> 
> > 
> > Would it be possible to tweak the find-debuginfo.sh script to avoid
> > them? e.g. Could we see how many arguments we have so that we only use
> > -m when there are 1+ debug files? And/Or detect debug files using
> > different endianess and ptr sizes so they are processed in different
> > batches?
> 
> No, I would leave it to dwz. There may be other reasons.

But for the reasons we do know about we could improve
find-debuginfo.sh to do the right thing (not use -m if there is only
one file, sort files by endianess/ptrsize). Ideally you call
find-debuginfo.sh and it does the right thing even if you only have
one ELF file or a mix of ELF files.

> > Ideally an error code from dwz means something went terribly wrong and
> > we abort find-debuginfo.sh. IMHO.
> 
> I would allow the mentioned "soft" error codes.

Couldn't optimize is an "soft" error indeed. I don't know about the
others.

Cheers,

Mark

  reply	other threads:[~2021-05-16 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 11:11 Martin Liška
2021-05-13  8:01 ` Martin Liška
2021-05-13 14:07   ` Mark Wielaard
2021-05-14 10:46     ` Martin Liška
2021-05-16 20:14       ` Mark Wielaard [this message]
2021-05-17 10:06         ` Tom de Vries

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=YKF9OhngfI4w/I7E@wildebeest.org \
    --to=mark@klomp.org \
    --cc=debugedit@sourceware.org \
    --cc=dwz@sourceware.org \
    --cc=mliska@suse.cz \
    --cc=tdevries@suse.de \
    /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).