From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 23D1F3858031; Sun, 16 May 2021 20:14:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 23D1F3858031 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from reform (unknown [172.31.132.202]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 53DA5302BBED; Sun, 16 May 2021 22:14:51 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 903112E82D5D; Sun, 16 May 2021 22:14:50 +0200 (CEST) Date: Sun, 16 May 2021 22:14:50 +0200 From: Mark Wielaard To: Martin =?utf-8?B?TGnFoWth?= Cc: debugedit@sourceware.org, dwz@sourceware.org, Tom de Vries Subject: Re: [PATCH] Fail if dwz fails. Message-ID: References: <0c4f9c78-ee2b-fb6f-a0f9-20c3731bfa0e@suse.cz> <0cfabb5c75508dc7dc419caa7c0e935ebc241bb3.camel@klomp.org> <153645a1-cdd7-e5cc-a392-e63ad3d44433@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <153645a1-cdd7-e5cc-a392-e63ad3d44433@suse.cz> X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: debugedit@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: debugedit development mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2021 20:14:55 -0000 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