unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* httpd GzipFilter::zflush error, anyone else seen this?
@ 2022-08-02  6:54 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2022-08-02  6:54 UTC (permalink / raw)
  To: meta

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-02  6:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02  6:54 httpd GzipFilter::zflush error, anyone else seen this? Eric Wong

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).