unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64317: [Cuirass] Download products can disappear, leading to HTTP 500
@ 2023-06-27 14:09 Ludovic Courtès
  2023-08-24 15:22 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2023-06-27 14:09 UTC (permalink / raw)
  To: 64317

The /download endpoint refers directly to store items.  However, they
can be GC’d in the meantime, in which case the HTTP handler fails
gracelessly (HTTP 500 or so) as shown here:

--8<---------------cut here---------------start------------->8---
2023-06-27 16:02:24 GET /download/718
2023-06-27 16:02:24 Uncaught exception in task:
2023-06-27 16:02:24 In fibers.scm:
2023-06-27 16:02:24     172:8  1 (_)
2023-06-27 16:02:24 In ice-9/boot-9.scm:
2023-06-27 16:02:24   1685:16  0 (raise-exception _ #:continuable? _)
2023-06-27 16:02:24 ice-9/boot-9.scm:1685:16: In procedure raise-exception:
2023-06-27 16:02:24 In procedure open-file: No such file or directory: "/gnu/store/bnsh1yk4l913af8swqi3x7xp1xsa8gq7-guix-binary.tar.xz"
--8<---------------cut here---------------end--------------->8---

The solution IMO is to (1) register GC roots for these, (2) periodically
remove old GC roots, and (3) return 404 when the file has vanished.

Ludo’.




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

* bug#64317: [Cuirass] Download products can disappear, leading to HTTP 500
  2023-06-27 14:09 bug#64317: [Cuirass] Download products can disappear, leading to HTTP 500 Ludovic Courtès
@ 2023-08-24 15:22 ` Ludovic Courtès
  2023-08-26 20:15   ` Maxim Cournoyer
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2023-08-24 15:22 UTC (permalink / raw)
  To: 64317-done

Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

> The /download endpoint refers directly to store items.  However, they
> can be GC’d in the meantime, in which case the HTTP handler fails
> gracelessly (HTTP 500 or so) as shown here:
>
> 2023-06-27 16:02:24 GET /download/718
> 2023-06-27 16:02:24 Uncaught exception in task:
> 2023-06-27 16:02:24 In fibers.scm:
> 2023-06-27 16:02:24     172:8  1 (_)
> 2023-06-27 16:02:24 In ice-9/boot-9.scm:
> 2023-06-27 16:02:24   1685:16  0 (raise-exception _ #:continuable? _)
> 2023-06-27 16:02:24 ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> 2023-06-27 16:02:24 In procedure open-file: No such file or directory: "/gnu/store/bnsh1yk4l913af8swqi3x7xp1xsa8gq7-guix-binary.tar.xz"
>
> The solution IMO is to (1) register GC roots for these, (2) periodically
> remove old GC roots, and (3) return 404 when the file has vanished.

Fixed with these Cuirass commits:

  9e897d8 'create-build-outputs' registers a GC root on build products.
  103a6ec http: Gracefully handle missing files in "/download".
  5e3e49c http: "/download" returns 404 rather than 500 for "not found".

Ludo’.




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

* bug#64317: [Cuirass] Download products can disappear, leading to HTTP 500
  2023-08-24 15:22 ` Ludovic Courtès
@ 2023-08-26 20:15   ` Maxim Cournoyer
  0 siblings, 0 replies; 3+ messages in thread
From: Maxim Cournoyer @ 2023-08-26 20:15 UTC (permalink / raw)
  To: 64317-done; +Cc: ludo, ludovic.courtes

Hello,

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

> Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
>
>> The /download endpoint refers directly to store items.  However, they
>> can be GC’d in the meantime, in which case the HTTP handler fails
>> gracelessly (HTTP 500 or so) as shown here:
>>
>> 2023-06-27 16:02:24 GET /download/718
>> 2023-06-27 16:02:24 Uncaught exception in task:
>> 2023-06-27 16:02:24 In fibers.scm:
>> 2023-06-27 16:02:24     172:8  1 (_)
>> 2023-06-27 16:02:24 In ice-9/boot-9.scm:
>> 2023-06-27 16:02:24   1685:16  0 (raise-exception _ #:continuable? _)
>> 2023-06-27 16:02:24 ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>> 2023-06-27 16:02:24 In procedure open-file: No such file or
>> directory:
>> "/gnu/store/bnsh1yk4l913af8swqi3x7xp1xsa8gq7-guix-binary.tar.xz"
>>
>> The solution IMO is to (1) register GC roots for these, (2) periodically
>> remove old GC roots, and (3) return 404 when the file has vanished.
>
> Fixed with these Cuirass commits:
>
>   9e897d8 'create-build-outputs' registers a GC root on build products.
>   103a6ec http: Gracefully handle missing files in "/download".
>   5e3e49c http: "/download" returns 404 rather than 500 for "not found".

Yay!  Thanks for fixing this long standing issue!

-- 
Thanks,
Maxim




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

end of thread, other threads:[~2023-08-26 20:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 14:09 bug#64317: [Cuirass] Download products can disappear, leading to HTTP 500 Ludovic Courtès
2023-08-24 15:22 ` Ludovic Courtès
2023-08-26 20:15   ` Maxim Cournoyer

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