public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Kefu Chai <k.chai@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH librados2-perl] do not shut down the handle twice if a signal arrives at exit
Date: Wed, 21 Oct 2026 09:47:19 +0200	[thread overview]
Message-ID: <s8o7bjbv6k8.fsf@toolbox> (raw)
In-Reply-To: <20261020141223.2814127-1-k.chai@proxmox.com> (Kefu Chai's message of "Tue, 20 Oct 2026 22:12:23 +0800")


Kefu Chai <k.chai@proxmox.com> 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 <k.chai@proxmox.com>

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 <m.sandoval@proxmox.com>

-- 
Maximiliano




      parent reply	other threads:[~2026-10-21  7:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 14:12 [PATCH librados2-perl] do not shut down the handle twice if a signal arrives at exit Kefu Chai
2026-10-20 14:59 ` Maximiliano Sandoval
2026-10-21  7:47 ` Maximiliano Sandoval [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s8o7bjbv6k8.fsf@toolbox \
    --to=m.sandoval@proxmox.com \
    --cc=k.chai@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal