From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 21D461F463; Thu, 12 Sep 2019 08:35:03 +0000 (UTC) Date: Thu, 12 Sep 2019 08:35:03 +0000 From: Eric Wong To: Konstantin Ryabitsev Cc: meta@public-inbox.org Subject: Re: httpd 502s [was: trying to figure out 100% CPU usage in nntpd...] Message-ID: <20190912083503.GA10657@dcvr> References: <20190909100500.GA9452@pure.paranoia.local> <20190909175340.u5aq4ztfzukko7zb@dcvr> <20190910083820.GA8018@pure.paranoia.local> <20190910181224.urhyoo6av7mhjs67@dcvr> <20190911022215.GA309@dcvr> <20190911102436.GA21959@pure.paranoia.local> <20190911171250.vqqpaeb7sn34hv3s@dcvr> <20190911173628.GA14147@pure.paranoia.local> <20190912000541.gikjoimbdeahh7lx@whir> <20190912024942.7dejzf47swpzkdux@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190912024942.7dejzf47swpzkdux@dcvr> List-Id: Eric Wong wrote: > One more thing, are you running any extra middlewares in the > .psgi file? Thanks. That's probably not it, I suspected the non-fileno path was being hit, but I just tested a debug change on top of b7cfd5aeff4b6b316b61b327af9c144776d77225 (branch: "unlink") ("tmpfile: support O_APPEND and use it in DS::tmpio") to fake the presence of a middleware wrapping psgi.input. I've also pushed out an "unlink-fix" branch on top of f4f0a3be0864721d90f9557ffe1c513b0289a74b which only features one bugfix which wouldn't affect you, as well as the tmpfile change to give more meanigful names: solvergit: ensure Qspawn usage doesn't unref update-index stdin tmpfile: give temporary files meaningful names Note: if reusing existing working tree, be sure to rerun "perl Makefile.PL" since new .pm files won't get picked up, otherwise. # force creation of extra temporary file for psgi.input # in case some middleware overrides the psgi.input we # set in HTTP.pm: --------8<------ diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index a8337035..2eaf221e 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -216,7 +216,7 @@ sub input_prepare { my $input = $env->{'psgi.input'}; my $fd = eval { fileno($input) }; - if (defined $fd && $fd >= 0) { + if (0 && defined $fd && $fd >= 0) { return { 0 => $fd }; } my $id = "git-http.input.$env->{REMOTE_HOST}:$env->{REMOTE_PORT}";