From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 699CF1FF0AB for ; Wed, 21 Oct 2026 09:47:27 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id B6E352144A; Wed, 21 Oct 2026 09:47:24 +0200 (CEST) From: Maximiliano Sandoval To: Kefu Chai Subject: Re: [PATCH librados2-perl] do not shut down the handle twice if a signal arrives at exit In-Reply-To: <20261020141223.2814127-1-k.chai@proxmox.com> (Kefu Chai's message of "Tue, 20 Oct 2026 22:12:23 +0800") References: <20261020141223.2814127-1-k.chai@proxmox.com> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Wed, 21 Oct 2026 09:47:19 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792568839399 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.773 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: TTYOLFGV3LJU6IWVMY3I7VYBRFGZGI6Z X-Message-ID-Hash: TTYOLFGV3LJU6IWVMY3I7VYBRFGZGI6Z X-MailFrom: m.sandoval@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Kefu Chai writes: > When a pveceph worker finishes, the CLI sends SIGTERM to its process > group, which includes the pverados child. That child is often already > shutting down the handle after seeing EOF, so the handler then calls > rados_shutdown() on the freed handle and the child segfaults. > > The handlers outlived the eval anyway, as the 'local' only covered > $SIG{HUP}. So ignore the signals before shutting down, and install the > handlers first thing in the child. > > Signed-off-by: Kefu Chai Tested that librados does not segfault anymore when doing the following - creating an EC pool with --erasure-coding k=4,m=2 --pg_num=64 - ceph -s - allocating a 1G image in the pool - destroying the data and metadata pools - ceph -s At least on my 3-node cluster the image cannot be allocated due to the issue described at https://lore.proxmox.com/pve-devel/20261021065240.3495098-1-k.chai@proxmox.com/T/, but that is a different issue. Tested-by: Maximiliano Sandoval -- Maximiliano