user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/5] lei: do not access {sock} after SIGPIPE
  2021-10-30  8:11  5% [PATCH 0/5] lei: fix various SIGPIPE problems Eric Wong
@ 2021-10-30  8:11  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-10-30  8:11 UTC (permalink / raw)
  To: meta

It's possible for this to break out of the event loop if
note_sigpipe fires via PktOp in the same iteration.
---
 lib/PublicInbox/LEI.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index 96f7c5e315a9..78b49a3bc1af 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -1127,7 +1127,7 @@ sub event_step {
 	local %ENV = %{$self->{env}};
 	local $current_lei = $self;
 	eval {
-		my @fds = $recv_cmd->($self->{sock}, my $buf, 4096);
+		my @fds = $recv_cmd->($self->{sock} // return, my $buf, 4096);
 		if (scalar(@fds) == 1 && !defined($fds[0])) {
 			return if $! == EAGAIN;
 			die "recvmsg: $!" if $! != ECONNRESET;

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/5] lei: fix various SIGPIPE problems
@ 2021-10-30  8:11  5% Eric Wong
  2021-10-30  8:11  7% ` [PATCH 1/5] lei: do not access {sock} after SIGPIPE Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-10-30  8:11 UTC (permalink / raw)
  To: meta

Most worrying was the the bug fixed in 4/5; but at least there
wasn't data loss involved...

While the bug fixed in 4/5 didn't cause data loss, it was
dumping core files and filling up my disk while polluting the
kernel log buffer.

Eric Wong (5):
  lei: do not access {sock} after SIGPIPE
  lei_to_mail: limit workers for text, reply and v2 outputs
  lei_xsearch: quiet error message on SIG{PIPE,TERM}
  lei_to_mail: avoid SEGV on worker exit via SIGTERM
  doc: lei-security: add a note about core dumps

 Documentation/lei-security.pod |  6 ++++++
 lib/PublicInbox/LEI.pm         |  2 +-
 lib/PublicInbox/LeiQuery.pm    |  2 +-
 lib/PublicInbox/LeiToMail.pm   | 10 +++++++++-
 lib/PublicInbox/LeiXSearch.pm  |  5 ++++-
 t/lei-sigpipe.t                |  7 +++++--
 6 files changed, 26 insertions(+), 6 deletions(-)

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-10-30  8:11  5% [PATCH 0/5] lei: fix various SIGPIPE problems Eric Wong
2021-10-30  8:11  7% ` [PATCH 1/5] lei: do not access {sock} after SIGPIPE Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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