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 24A881FA13 for ; Sat, 23 Jan 2021 10:27:56 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 03/10] lei_to_mail: drop cyclic reference if not using IPC Date: Sat, 23 Jan 2021 10:27:48 +0000 Message-Id: <20210123102755.425-4-e@80x24.org> In-Reply-To: <20210123102755.425-1-e@80x24.org> References: <20210123102755.425-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This may fix another interrupt-related segfault I'm occasionally seeing (but so far unable to reproduce). --- lib/PublicInbox/LeiToMail.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index 43c59da0..438fb175 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -483,11 +483,14 @@ sub ipc_atfork_prepare { # ordering is unstable at worker exit and may cause segfaults sub reap_gits { my ($self) = @_; + delete $self->{wcb}; for my $git (delete @$self{grep(/\A$$\0/, keys %$self)}) { $git->async_wait_all; } } +sub DESTROY { delete $_[0]->{wcb} } + sub ipc_atfork_child { # runs after IPC::wq_worker_loop my ($self) = @_; $self->SUPER::ipc_atfork_child;