unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44442: ‘guix publish --cache’ can lose its daemon connection
@ 2020-11-04 14:48 Ludovic Courtès
  2020-11-04 15:06 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2020-11-04 14:48 UTC (permalink / raw)
  To: 44442

With the introduction of “cache bypass” for ‘guix publish --cache’ in
commit 2b2ab7796ac186d88060793b8873fc0e21462758, ‘guix publish’ can
crash like so:

--8<---------------cut here---------------start------------->8---
$ 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.

--8<---------------cut here---------------end--------------->8---

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’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#44442: ‘guix publish --cache’ can lose its daemon connection
  2020-11-04 14:48 bug#44442: ‘guix publish --cache’ can lose its daemon connection Ludovic Courtès
@ 2020-11-04 15:06 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-11-04 15:06 UTC (permalink / raw)
  To: 44442

Ludovic Courtès <ludo@gnu.org> skribis:

> 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’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-04 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 14:48 bug#44442: ‘guix publish --cache’ can lose its daemon connection Ludovic Courtès
2020-11-04 15:06 ` Ludovic Courtès

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).