"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotwebd: use less temp files
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 27 May 2024 11:20:37 +0200

Download raw body.

Thread
On Sat, May 25, 2024 at 06:45:52PM +0200, Omar Polo wrote:
> for gotwebd we allocate a whole set of temp fd per listening socket.
> since we only process one request at a time, we can instead use only
> a global set of fds.
> 
> i have this running on my instance.
> 
> ok?

It is possible for multiple clients to remain connected in parallel.
So can we be really sure there's no possibility of overlapping use
of files between clients, depending on how the kernel/libevent make
gotwebd run through its various code paths?

I do recall bugs when gotwebd had cached repositories were some requests
were returning spurious errors after some unexpected file descriptor
behaviour, usually unexpected EOF.
This hasn't happened again ever since the repository cache was removed.
There was likewise only one set of temp fds associated with a repo which
was used to serve multiple requests.
Is this diff not recreating this problem?