From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ABAmFZqpJ2Xs+AAA9RJhRA:P1 (envelope-from ) for ; Thu, 12 Oct 2023 10:08:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ABAmFZqpJ2Xs+AAA9RJhRA (envelope-from ) for ; Thu, 12 Oct 2023 10:08:58 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0C360478E9 for ; Thu, 12 Oct 2023 10:08:58 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=TidJsrBz; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697098138; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=hkKDelKy2YeOCKkckirbA2MzwS+hBgvoL/w3/IwcnwQ=; b=pMj4DPqfnpHDQrigfigwsQiHvuzLXe3GiwZNiOn+oWV3kLQYOZi7O4ldRSM9KpUc9JxZxx Ls862u4thbSy0FNrkcJNCWoso39armZSSM3npIEjtNEZK+CGn/+3vMsd3Uh50DG9wlXmfS 18e/UkIbR37KcXEYkSRlPZICcinj/L3MA65YUxJqe7ZnQdl37UKoCfaMzbZuAcOveXsqTK BpPWwKPZgZCgQu7dvheaUo0GphQXRQSmTAk9mlVKCvOFgg3rWEqYGLcUAL//I5FlBkoe3H wkcib++Bx3/hdOPSpaWGNwFS+zpQZEcIwoMgi+zYlZjneuIXVvQhY4w6w/ztkw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697098138; a=rsa-sha256; cv=none; b=Timw9wG5FFVnyi4PXaztJ3QSbndbJsNxQM/Tm6NsYYqeeXIw1pxJ6TK5XpgA1hhk81qDRd zJYWxbAT6GwK+A1YzCoiNBZqJq/ma5wkj9TYkCQISjRocFuueMIR/EMRiS1SzS2f04pmxs 2vVKz6zV2d1KXMh0xTui2gbV/n3qp2UbnFSoh9zbUhsL9cvEpSjP1b1cg8SCvs/A/G9Q8+ /QgNJS8lxPMJg/yySwj9lWjYEcLPYb6sTCNe37y7waLuMdZhzdrhQZcpNtNxtd9m0gxb9c hWjP/Duo4Z7YiovR2XDf6tMpFoeFU4nKZ73lttLwBERCUOi65nc2t0l69YsY1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=TidJsrBz; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqqkP-0007x4-JB; Thu, 12 Oct 2023 04:08:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqqkK-0007oo-NQ for bug-guix@gnu.org; Thu, 12 Oct 2023 04:08:42 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqqkK-00040P-1F for bug-guix@gnu.org; Thu, 12 Oct 2023 04:08:40 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqqkg-00014A-5B for bug-guix@gnu.org; Thu, 12 Oct 2023 04:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#66254: "guix --version | head -1" crashes most of the time Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 12 Oct 2023 08:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66254 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur , 66254@debbugs.gnu.org Received: via spool by 66254-submit@debbugs.gnu.org id=B66254.16970981004010 (code B ref 66254); Thu, 12 Oct 2023 08:09:02 +0000 Received: (at 66254) by debbugs.gnu.org; 12 Oct 2023 08:08:20 +0000 Received: from localhost ([127.0.0.1]:40558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqqjz-00012P-NY for submit@debbugs.gnu.org; Thu, 12 Oct 2023 04:08:20 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:40299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqqjw-000129-0o for 66254@debbugs.gnu.org; Thu, 12 Oct 2023 04:08:18 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4053e6e8ca7so2405115e9.1 for <66254@debbugs.gnu.org>; Thu, 12 Oct 2023 01:07:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697098068; x=1697702868; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=hkKDelKy2YeOCKkckirbA2MzwS+hBgvoL/w3/IwcnwQ=; b=TidJsrBzB6VgbJCjIKQw6HFbzLFbPAm5mYjCrf/C1fJIGJKlAyz/mS49OXkQJk5Gs7 mkjSMDpBTm+vK2z7aPazitOdXMSNx8wN8lKrnJJeODgA+73DRE4TAheb1RPg3FCPRp09 wY983j61PGJQxwcyR2M4JXA2SM4Ksex2VGiEgXaBbpXBK/ouhsR17hb9dUj0qftQ6Cj0 iEuKlIHlmvSqCiXD6NsbBzFNb7zWqRvValfuSNDtLfj8IIMrEtVtt7wwUX+6VIfsG4mK BZrXMHYNs6zP0JWkzOMeSbYGlYSToLCop90ma4MJ+Uu32EqGtib126Q8RzfoR+yPiGkX bSJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697098068; x=1697702868; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hkKDelKy2YeOCKkckirbA2MzwS+hBgvoL/w3/IwcnwQ=; b=Ht9f8JMy1GE/4LRvU5qmbJpwoY0GxyVSGPxBECMiSkFh283OfXnVTa/oa2APAs/Vvy PmTpCTfHBLL79zfj51mo7bwIByXR1SdJoGXQ8OsVqqoRPvcRkNJ6Xi1JuBdbMxJpaHG4 pd0EJqemiKCtJ4c09bC03J0GfkZAGymQSqc336E5xBo43t9Zd2Zqux97Y0WaFz+bDOgy NgiLLjn1jo2lryIujB3n/Ux9z6KPWSy+y7599hb0aRm93C64pKavuw/Km36hv1rLeGp4 1aaey3KH0DCavqjBaXWIHbGI/mK8OU1mJ7PvG6T8nS1fGpqJlrFiLqolFR+P52k4x+m3 oYAQ== X-Gm-Message-State: AOJu0Yxbs1eBQnll+dZCXTDuHuHVm1QKzKUeoOkiHcCkpoQMw4iW0JZ1 jttl8XZX1saym18d+oha6ma7KY4ftUs= X-Google-Smtp-Source: AGHT+IF0kCUHhJyjhstgTl4T9yw7ky24aysLQfXQjZ95elBbsbtyX9K+6JeVPkD2S2aGC1P32NHfwA== X-Received: by 2002:a05:600c:511d:b0:401:b53e:6c3e with SMTP id o29-20020a05600c511d00b00401b53e6c3emr21027291wms.1.1697098067536; Thu, 12 Oct 2023 01:07:47 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id k17-20020adff291000000b003143867d2ebsm17638667wro.63.2023.10.12.01.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:07:47 -0700 (PDT) From: Simon Tournier In-Reply-To: <2458ef62-18af-4379-a6ff-0e9c02552ac2@app.fastmail.com> References: <2458ef62-18af-4379-a6ff-0e9c02552ac2@app.fastmail.com> Date: Thu, 12 Oct 2023 00:30:58 +0200 Message-ID: <86v8bcdc65.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: 2.80 X-Migadu-Queue-Id: 0C360478E9 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: 2.80 X-TUID: pVgz/6neZSUT --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Cl=C3=A9ment, On Thu, 28 Sep 2023 at 12:20, Cl=C3=A9ment Lassieur = wrote: >> guix --version | cat | head -1 > works Not for me. --8<---------------cut here---------------start------------->8--- $ guix --version | cat | head -1 guix (GNU Guix) 6113e0529d61df7425f64e30a6bf77f7cfdfe5a5 Backtrace: 3 (primitive-load "/home/simon/.config/guix/current/bin/guix") In guix/ui.scm: 2312:7 2 (run-guix . _) 563:2 1 (show-version-and-exit _) In unknown file: 0 (display "License GPLv3+: GNU GPL version 3 or later \nThis is free software: you are free to change an= d redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n= " #) ERROR: In procedure display: In procedure fport_write: Broken pipe --8<---------------cut here---------------end--------------->8--- >> guix --version | head -1 > crashes most of the time And note that: --8<---------------cut here---------------start------------->8--- $ guix --version | head -2 guix (GNU Guix) 6113e0529d61df7425f64e30a6bf77f7cfdfe5a5 Copyright (C) 2023 the Guix authors --8<---------------cut here---------------end--------------->8--- Well, I do not know if it is related, please note: --8<---------------cut here---------------start------------->8--- (define* (show-version-and-exit #:optional (command (car (command-line)))) "Display version information for COMMAND and `(exit 0)'." (simple-format #t "~a (~a) ~a~%" command %guix-package-name %guix-version) (format #t "Copyright ~a 2023 ~a" --8<---------------cut here---------------end--------------->8--- Anyway. The issue is from leave-on-EPIPE. This patch fixes the issue, I guess. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=p.patch Content-Description: p.patch diff --git a/guix/ui.scm b/guix/ui.scm index 6f2d4fe245..507bc67f1d 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -2309,7 +2309,7 @@ (define (run-guix . args) ((or ("-h") ("--help")) (leave-on-EPIPE (show-guix-help))) ((or ("-V") ("--version")) - (show-version-and-exit "guix")) + (leave-on-EPIPE (show-version-and-exit "guix"))) (((? option? o) args ...) (format (current-error-port) (G_ "guix: unrecognized option '~a'~%") o) --=-=-= Content-Type: text/plain Does it fix the issue? Cheers, simon --=-=-=--