From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6670 invoked from network); 21 Dec 2020 17:57:58 -0000 Received: from krantz.zx2c4.com (192.95.5.69) by inbox.vuxu.org with ESMTPUTF8; 21 Dec 2020 17:57:58 -0000 Received: by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id ca389701; Mon, 21 Dec 2020 17:48:53 +0000 (UTC) Return-Path: Received: from mta01.prd.rdg.aluminati.org (mta01.prd.rdg.aluminati.org [94.76.243.214]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 566c71dc (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Mon, 21 Dec 2020 17:48:50 +0000 (UTC) Received: from mta01.prd.rdg.aluminati.org (localhost [127.0.0.1]) by mta.aluminati.local (Postfix) with ESMTP id E5EBEBF173; Mon, 21 Dec 2020 17:57:52 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mta01.prd.rdg.aluminati.org (Postfix) with ESMTP id C63D920001; Mon, 21 Dec 2020 17:57:52 +0000 (GMT) X-Quarantine-ID: X-Virus-Scanned: Debian amavisd-new at mta01.prd.rdg.aluminati.org Received: from mta.aluminati.local ([127.0.0.1]) by localhost (mta01.prd.rdg.aluminati.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yCiXZBYK8r5Z; Mon, 21 Dec 2020 17:57:51 +0000 (GMT) Received: from john.keeping.me.uk (unknown [81.174.171.191]) by mta01.prd.rdg.aluminati.org (Postfix) with ESMTPSA id 17F7D5F70F; Mon, 21 Dec 2020 17:57:41 +0000 (GMT) Date: Mon, 21 Dec 2020 17:57:34 +0000 From: John Keeping To: Steffen Nurpmeso Cc: cgit@lists.zx2c4.com Subject: Re: cgit 1.2.3: lighttpd 1.4.57, AlpineLinux [edge]: using cache breaks delivery Message-ID: References: <20201221162619.wYrRU%steffen@sdaoden.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201221162619.wYrRU%steffen@sdaoden.eu> X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" On Mon, Dec 21, 2020 at 05:26:19PM +0100, Steffen Nurpmeso wrote: > I discovered today that cgit no longer delivers pages, and it must > have been like that for some time. The server looks show > successful delivery, the cgit cache is populated and rotated just > correctly, but all cgit delivers is that final error of main() as > >
Error processing page: Invalid argument (22)
> > (surely a misconfiguration that this is not a real HTML page, > i recall it took some time to figure out about about-filter, just > "doing it" (
cat(1)
)). > > If i set "cache-size=0" then the desired page is delivered. > Note the cache itself is managed as usual with the default > cache-size=1999. > > The files in the cache are 0600, i thought maybe that was it, but > the setting is actively reverted to this mask (i never looked at > cgit code except grepping the error). It has always been so, the > oldest cache entry was > > -rw------- 1 lighttpd lighttpd 3023 Mar 18 2018 d2200000 > > I am pretty sure cgit delivered some weeks ago, the most notable > difference is that AlpineLinux switched to Lighttpd 1.4.56 then > .57, which seems to have brought tremendous changes under the > hood, like HTTP/2 support and OCSP as well as support for all the > different TLS libraries, whereas before it only was OpenSSL and > compatibles, i think. We have HTTP/2 not enabled yet. > > Anything i can do about this? Have you looked at the log output? This error comes from cgit.c::cmd_main() as a result of cache.c::cache_process() returning an error. It looks like all of the error paths there will write a more detailed error message to stderr. I don't use lighttpd so I don't know whether that output is captured, but normally output written to stderr will end up in a log file. >From a quick look at the code, given that the problem seems to be caused by updating the web server, my guess is that you'll see the error: [cgit] error printing cache ...: Invalid argument (22) and this may be caused by sendfile(2) failing due to some difference in how the web server is setting up the output file descriptor. You may want to rebuild CGit without HAVE_LINUX_SENDFILE and see if that works. (If it does, we should add better fallback handling for the case where stdout is not a valid output for sendfile().) John