GNU bug report logs -
#27704
[PATCH] daemon: Show actual rather than collateral error when export fails.
Previous Next
Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>
Date: Sat, 15 Jul 2017 11:00:02 UTC
Severity: normal
Tags: patch
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Having the wrong permissions on /etc/guix/signing-key.sec gives
guix-daemon: nix/libutil/serialise.cc:15: virtual nix::BufferedSink::~BufferedSink(): Assertion `!bufPos' failed.
this patch changes that to
guix-daemon: error: file `/etc/guix/signing-key.sec' should be secret (inaccessible to everybody else)!
* nix/nix-daemon/nix-daemon.cc (performOp): Catch any exportPath exception,
report and exit on that. Fixes failing later with uninformative collateral error.
---
nix/nix-daemon/nix-daemon.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc
index 7d26b6135..aeeadf144 100644
--- a/nix/nix-daemon/nix-daemon.cc
+++ b/nix/nix-daemon/nix-daemon.cc
@@ -436,7 +436,13 @@ static void performOp(bool trusted, unsigned int clientVersion,
bool sign = readInt(from) == 1;
startWork();
TunnelSink sink(to);
- store->exportPath(path, sign, sink);
+ try {
+ store->exportPath(path, sign, sink);
+ }
+ catch (std::exception &e) {
+ fprintf (stderr, "guix-daemon: error: %s\n", e.what ());
+ exit (EXIT_FAILURE);
+ }
sink.flush();
stopWork();
writeInt(1, to);
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
This bug report was last modified 8 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.