‘guix publish --cache’ can lose its daemon connection

  • Done
  • 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 4 Nov 2020 15:48
(address . bug-guix@gnu.org)
87lffh9nzf.fsf@inria.fr
With the introduction of “cache bypass” for ‘guix publish --cache’ in
commit 2b2ab7796ac186d88060793b8873fc0e21462758, ‘guix publish’ can
crash like so:

Toggle snippet (55 lines)
$ sudo guix publish -u ludo --cache=/tmp/cache --cache-bypass-threshold=30M
guix publish: publishing /gnu/store on 0.0.0.0, port 8080
guix publish: using 'gzip' compression method, level 3
C-c C-z
[1]+ Haltigita sudo guix publish -u ludo --cache=/tmp/cache --cache-bypass-threshold=30M
$ bg
[1]+ sudo guix publish -u ludo --cache=/tmp/cache --cache-bypass-threshold=30M &
$ wget -O - http://localhost:8080/nar/gzip/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-foo
--2020-11-04 15:42:50-- http://localhost:8080/nar/gzip/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-foo
Ni solvigas localhost (localhost)... 127.0.0.1
Konektado al localhost (localhost)|127.0.0.1|:8080... konektita.
HTTP peto sendita, ni atendas respondon... GET /nar/gzip/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-foo
404 Not Found
2020-11-04 15:42:50 ERARO 404: Not Found.

$ wget -O - http://localhost:8080/n8awazyldv9hbzb7pjcw76hiifmvrpvd.narinfo
--2020-11-04 15:43:13-- http://localhost:8080/n8awazyldv9hbzb7pjcw76hiifmvrpvd.narinfo
Ni solvigas localhost (localhost)... 127.0.0.1
Konektado al localhost (localhost)|127.0.0.1|:8080... konektita.
HTTP peto sendita, ni atendas respondon... GET /n8awazyldv9hbzb7pjcw76hiifmvrpvd.narinfo
In guix/scripts/publish.scm:
455:4 5 (render-narinfo/cached #<store-connection 256.99 7f24e…> …)
460:12 4 (_ . _)
In guix/store.scm:
1020:9 3 (_ #<store-connection 256.99 7f24eff0e320> "n8awazyldv9…")
916:4 2 (flush)
In unknown file:
1 (put-bytevector #<input-output: socket 15> #vu8(29 0 …) …)
In ice-9/boot-9.scm:
1669:16 0 (raise-exception _ #:continuable? _)
In procedure fport_write: Rompita dukto
500 Internal Server Error
2020-11-04 15:43:13 ERARO 500: Internal Server Error.

$ wget -O - http://localhost:8080/n8awazyldv9hbzb7pjcw76hiifmvrpvd.narinfo
--2020-11-04 15:43:15-- http://localhost:8080/n8awazyldv9hbzb7pjcw76hiifmvrpvd.narinfo
Ni solvigas localhost (localhost)... 127.0.0.1
Konektado al localhost (localhost)|127.0.0.1|:8080... konektita.
HTTP peto sendita, ni atendas respondon... GET /n8awazyldv9hbzb7pjcw76hiifmvrpvd.narinfo
In guix/scripts/publish.scm:
455:4 5 (render-narinfo/cached #<store-connection 256.99 7f24e…> …)
460:12 4 (_ . _)
In guix/store.scm:
1020:9 3 (_ #<store-connection 256.99 7f24eff0e320> "n8awazyldv9…")
916:4 2 (flush)
In unknown file:
1 (put-bytevector #<input-output: socket 15> #vu8(29 0 …) …)
In ice-9/boot-9.scm:
1669:16 0 (raise-exception _ #:continuable? _)
In procedure fport_write: Rompita dukto
500 Internal Server Error
2020-11-04 15:43:15 ERARO 500: Internal Server Error.


The first wget here, leads to this call in ‘render-nar/cached’:

(hash-part->path store "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
⇒ ""

and in turn to:

(bypass-cache? store "")
(query-path-info store "")

at which point the daemon throws and closes the connection.

Further attempts to access the store all lead to EPIPE as shown above.
At this point, ‘guix publish’ can only serve what’s already cached.

Ludo’.
L
L
Ludovic Courtès wrote on 4 Nov 2020 16:06
Re: bug#44442: ‘guix publish --cach e’ can lose its daemon connection
(address . 44442@debbugs.gnu.org)
87h7q59n5l.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (4 lines)
> With the introduction of “cache bypass” for ‘guix publish --cache’ in
> commit 2b2ab7796ac186d88060793b8873fc0e21462758, ‘guix publish’ can
> crash like so:

Fixed in 5e7cf66fb35780f930ad0bc5fe21ac330df4411d.

I’ll update the ‘guix’ package.

Ludo’.
L
L
Ludovic Courtès wrote on 4 Nov 2020 16:06
control message for bug #44442
(address . control@debbugs.gnu.org)
87ft5p9n5a.fsf@gnu.org
tags 44442 fixed
close 44442
quit
?