unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] git: show more context info on failures
@ 2020-08-27  7:51 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-08-27  7:51 UTC (permalink / raw)
  To: meta

I'm seeing "read: Connection timed out" from in my syslog from
-httpd.  The fail() calls in PublicInbox::Git seems to be the
only code path of ours which could trigger it...

ETIMEDOUT shouldn't happen on pipes, only sockets; and all of
our socket operations are non-blocking.  So this could be
cgit-wwwhighlight-filter.lua, but that's connecting over
localhost, though on fairly loaded HW.
---
 lib/PublicInbox/Git.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 7b2ada24..181026c7 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -17,6 +17,7 @@ use File::Glob qw(bsd_glob GLOB_NOSORT);
 use Time::HiRes qw(stat);
 use PublicInbox::Spawn qw(popen_rd);
 use PublicInbox::Tmpfile;
+use Carp qw(croak);
 our @EXPORT_OK = qw(git_unquote git_quote);
 our $PIPE_BUFSIZ = 65536; # Linux default
 our $in_cleanup;
@@ -319,7 +320,7 @@ sub cat_async_abort ($) {
 sub fail {
 	my ($self, $msg) = @_;
 	$self->{inflight} ? cat_async_abort($self) : cleanup($self);
-	die $msg;
+	croak("git $self->{git_dir}: $msg");
 }
 
 sub popen {

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

only message in thread, other threads:[~2020-08-27  7:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27  7:51 [PATCH] git: show more context info on failures Eric Wong

unofficial mirror of meta@public-inbox.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
	nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git