From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Clément Lassieur" <clement@lassieur.org>, 66254@debbugs.gnu.org
Subject: bug#66254: "guix --version | head -1" crashes most of the time
Date: Thu, 12 Oct 2023 00:30:58 +0200 [thread overview]
Message-ID: <86v8bcdc65.fsf@gmail.com> (raw)
In-Reply-To: <2458ef62-18af-4379-a6ff-0e9c02552ac2@app.fastmail.com>
[-- Attachment #1: Type: text/plain, Size: 1767 bytes --]
Hi Clément,
On Thu, 28 Sep 2023 at 12:20, Clément Lassieur <clement@lassieur.org> 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 <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n" #<unde…>)
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: p.patch --]
[-- Type: text/x-diff, Size: 493 bytes --]
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)
[-- Attachment #3: Type: text/plain, Size: 39 bytes --]
Does it fix the issue?
Cheers,
simon
next prev parent reply other threads:[~2023-10-12 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 10:20 bug#66254: "guix --version | head -1" crashes most of the time Clément Lassieur
2023-10-11 22:30 ` Simon Tournier [this message]
2023-10-12 8:58 ` Clément Lassieur
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86v8bcdc65.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=66254@debbugs.gnu.org \
--cc=clement@lassieur.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).