From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id F2EC23858D37 for ; Wed, 17 Aug 2022 11:18:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F2EC23858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1E5F42010B; Wed, 17 Aug 2022 11:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1660735085; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sfn2KlTSuPJdO6f8HlxqU4/llT/HsoFOkz+KX3jQbec=; b=sRlVUH5z6NFpb+N+BbUZrv/LjRjHX0fFt5eHIIlmX4bzwOc7pQdMfI4WrU6luDcZvA8Q4M 4DYYPVSNsA3HXLUJY4VHpQ1ylYRaBTvLH3C9mM/eWjYfmn8hi6Fn4Jb3flB2DiO1xYhJ0X sM74fU8U72rlx7Ji2k4YmjvTXkOHsc8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1660735085; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sfn2KlTSuPJdO6f8HlxqU4/llT/HsoFOkz+KX3jQbec=; b=hVyiEEOqHT2JVOA2qh0og2W3/eNDlydvKjCIziLLhII+DvCFrS0llVZyu52EuD56TsNhqv kp8QU0DlxYcOR6CA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0C1EE13A8E; Wed, 17 Aug 2022 11:18:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dJP+AW3O/GKOHwAAMHmgww (envelope-from ); Wed, 17 Aug 2022 11:18:05 +0000 Message-ID: <69911ef8-953a-102e-508d-8bd2464538cd@suse.cz> Date: Wed, 17 Aug 2022 13:18:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH v2] debuginfod: print filename for "cannot open archive" error To: elfutils-devel@sourceware.org References: <20220817105846.GA4328@redhat.com> Content-Language: en-US In-Reply-To: <20220817105846.GA4328@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2022 11:18:07 -0000 Report the file that has such a problem so that one can inspect it. Signed-off-by: Martin Liska --- debuginfod/debuginfod.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 9245be53..366a4a09 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -1714,7 +1714,10 @@ handle_buildid_r_match (bool internal_req_p, rc = archive_read_open_FILE (a, fp); if (rc != ARCHIVE_OK) - throw archive_exception(a, "cannot open archive from pipe"); + { + obatched(clog) << "cannot open archive from pipe " << b_source0 << endl; + throw archive_exception(a, "cannot open archive from pipe"); + } // archive traversal is in three stages, no, four stages: // 1) skip entries whose names do not match the requested one @@ -2973,7 +2976,10 @@ archive_classify (const string& rps, string& archive_extension, rc = archive_read_open_FILE (a, fp); if (rc != ARCHIVE_OK) - throw archive_exception(a, "cannot open archive from pipe"); + { + obatched(clog) << "cannot open archive from pipe " << rps << endl; + throw archive_exception(a, "cannot open archive from pipe"); + } if (verbose > 3) obatched(clog) << "libarchive scanning " << rps << endl; -- 2.37.1