(guix git) crashes with backtrace upon EDQUOT

  • Open
  • quality assurance status badge
Details
One participant
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 15 Apr 2022 14:35
(address . bug-guix@gnu.org)
87wnfq5xtf.fsf@inria.fr
Hello!

The (guix git) code fails badly upon EDQUOT (“Disk quota exceeded”), and
perhaps upon ENOSPC as well:

Toggle snippet (18 lines)
$ guix pull
[…]
Backtrace:
5 (primitive-load "/home/lcirrott/.config/guix/current/bi…")
In guix/ui.scm:
2206:7 4 (run-guix . _)
2169:10 3 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 2 (with-exception-handler _ _ #:unwind? _ # _)
In guix/git.scm:
297:2 1 (report-git-error _)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `match-error' with args `("match" "no matching pattern" #f)'.

Here ‘report-git-error’ gets #f instead of a <git-error>.

Looking at Guile-Git, this happens when ‘giterr_last’ returns NULL:

Toggle snippet (11 lines)
(define last-git-error
(let ((proc (libgit2->procedure '* "giterr_last" '())))
(lambda (code)
"Return a <git-error> structure representing the last error, or #f."
(pointer->git-error (proc) code))))

(define (raise-git-error code)
"Raise a 'git-error' exception for the given code."
(throw 'git-error (last-git-error code)))

Ludo’.
?