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-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 615A51F86C for ; Sun, 29 Nov 2020 10:52:30 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/2] git: some safety fixes Date: Sun, 29 Nov 2020 10:52:28 +0000 Message-Id: <20201129105230.12501-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I noticed -imapd on public-inbox.org was stuck reading on the Gcf2 pipe; so patch 1/2 should allow us to recover within 60s if it happens again. And 2/2 makes the code easier to follow/modify in case we do hit failures, since we need to ensure we call DS::close in the daemons. Not sure what caused that read(2) to get stuck, I reread the partial writev calculations in lib/PublicInbox/gcf2_libgit2.h and it all seems to make sense to me. I've also written and tested similar code for writev/sendmmsg many times over the years in other projects... Eric Wong (2): git: set non-blocking flag in case of other bugs git: ensure subclassed ->fail gets called lib/PublicInbox/Git.pm | 52 +++++++++++++++++++++------------- lib/PublicInbox/GitAsyncCat.pm | 6 +--- 2 files changed, 34 insertions(+), 24 deletions(-)