unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: httpd GzipFilter::zflush error, anyone else seen this?
Date: Tue, 2 Aug 2022 06:54:36 +0000	[thread overview]
Message-ID: <20220802065436.GA13935@dcvr> (raw)

I'm getting this from inside the PublicInbox::GzipFilter::zflush error:
forward ->close error: Can't call method "flush" on an undefined value at ../PublicInbox/GzipFilter.pm

I'm not concerned for the error itself, really; it's that I'm
more surprised I haven't seen it in the past.

A backtrace confirms it's triggered by a DS->write failure,
which is common for network servers facing the Internet.

Of course, I haven't paid much attention to syslog in ages and
don't store logs for long; so I just noticed it a few times
since I've started running -netd (and moving away from separate
-httpd/-imapd/-pop3d/-imapd).

Anyways, I think the following should quiet the error message:

diff --git a/lib/PublicInbox/GzipFilter.pm b/lib/PublicInbox/GzipFilter.pm
index e37f1f76..6a25fb8d 100644
--- a/lib/PublicInbox/GzipFilter.pm
+++ b/lib/PublicInbox/GzipFilter.pm
@@ -153,6 +153,7 @@ sub zflush ($;$) {
 		$err = $gz->deflate($_[1], $zbuf);
 		die "gzip->deflate: $err" if $err != Z_OK;
 	}
+	$gz // return; # recursing on DS->write failure
 	$err = $gz->flush($zbuf);
 	die "gzip->flush: $err" if $err != Z_OK;
 	$zbuf;

                 reply	other threads:[~2022-08-02  6:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220802065436.GA13935@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).