Bug 2536998 - Please update rubygem-childprocess to 5.x -- 4.x fork+exec backend crashes/hangs multithreaded consumers (e.g. pcsd)
Summary: Please update rubygem-childprocess to 5.x -- 4.x fork+exec backend crashes/ha...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-childprocess
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2257146
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-09-18 12:45 UTC by Miroslav Lisik
Modified: 2026-09-24 01:35 UTC (History)
7 users (show)

Fixed In Version: rubygem-childprocess-5.1.0-1.fc46
Clone Of:
Environment:
Last Closed: 2026-09-21 14:25:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miroslav Lisik 2026-09-18 12:45:59 UTC
Description:

Fedora currently ships rubygem-childprocess 4.1.0. On this version, the default
POSIX backend (ChildProcess::Unix::ForkExecProcess) launches subprocesses by
calling fork and then running the Ruby VM in the child until exec. Running the
Ruby VM (allocation, GC finalizers, etc.) between fork and exec is not safe in
a multithreaded process: only the forking thread survives in the child, so any
lock held by another thread at the moment of fork (glibc malloc arena,
libcurl/DNS-resolver locks, Ruby runtime locks) is inherited already-locked
with no owner to release it.

In a multithreaded consumer this leads to two failure modes in the forked child
before it reaches exec:
- Crash: a GC finalizer running in the child performs a native cleanup that is
  invalid in the child (e.g. tearing down resolver threads that don't exist),
  aborting the process with SIGABRT and a core dump.
- Hang: the child deadlocks acquiring an inherited-locked mutex and never
  execs, so the parent's wait/waitpid blocks forever.

This was hit in practice by pcsd (pcs, the Pacemaker/Corosync configuration
daemon), which runs its Sinatra app under multithreaded Puma and shells out to
pcs via childprocess. We observed pcsd Puma worker crashes (SIGABRT core dumps)
on a host with childprocess-4.1.0-14.fc45.

Fix requested:

Update the package to childprocess ≥ 5.0.0. Upstream 5.0.0 replaced the
fork+exec backend with ProcessSpawnProcess, which uses Process.spawn
(posix_spawn/vfork under the hood). This does not run the Ruby VM in the child
and does only async-signal-safe work before exec, eliminating both the crash
and the hang for multithreaded consumers. Latest upstream is 5.1.0.

Additional info:
- pcs scratch-build: https://koji.fedoraproject.org/koji/taskinfo?taskID=150139457
- Note: ChildProcess.posix_spawn = true in 4.x is not a reliable workaround
  (experimental; on some setups it's a no-op), so a package update is the
  correct fix.
- Upstream: https://github.com/enkessler/childprocess - see the 5.0.0 release
  notes / CHANGELOG for the Process.spawn switch.

Reproducible: Sometimes

Comment 1 Fedora Update System 2026-09-21 14:22:41 UTC
FEDORA-2026-516635615f (rubygem-childprocess-5.1.0-1.fc46) has been submitted as an update to Fedora 46.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-516635615f

Comment 2 Fedora Update System 2026-09-21 14:25:39 UTC
FEDORA-2026-516635615f (rubygem-childprocess-5.1.0-1.fc46) has been pushed to the Fedora 46 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 3 Michal Pospisil 2026-09-21 14:54:15 UTC
Wow, that was fast! Thank you. Any chance for this update to also land in Fedora 45? Because the issue also happens there, but not on older Fedoras. I came across it while preparing the update for pcs that replaces ethon with curb, and it worked on Fedora 43 and 44.

I'm still waiting with merging the update on Fedora 45 and Rawhide:
https://src.fedoraproject.org/rpms/pcs/pull-request/75
https://src.fedoraproject.org/rpms/pcs/pull-request/74
I was prepared to put back ethon as a workaround until this bug is resolved. If you also update childprocess in Fedora 45, pcs will stop using ethon completely. Until then, we're stuck with it.

Comment 4 Vít Ondruch 2026-09-21 16:10:09 UTC
(In reply to Michal Pospisil from comment #3)
> Wow, that was fast! Thank you.

Please don't get used to it 😇

> Any chance for this update to also land in
> Fedora 45? Because the issue also happens there, but not on older Fedoras. I
> came across it while preparing the update for pcs that replaces ethon with
> curb, and it worked on Fedora 43 and 44.
> 
> I'm still waiting with merging the update on Fedora 45 and Rawhide:
> https://src.fedoraproject.org/rpms/pcs/pull-request/75
> https://src.fedoraproject.org/rpms/pcs/pull-request/74
> I was prepared to put back ethon as a workaround until this bug is resolved.
> If you also update childprocess in Fedora 45, pcs will stop using ethon
> completely. Until then, we're stuck with it.

Looking into this. I think the update should be fine also for F45. The PR is here:

https://src.fedoraproject.org/rpms/rubygem-childprocess/pull-request/4

and waiting for the reverse dependencies test running here:

https://copr.fedorainfracloud.org/coprs/vondruch/mpb.1

Comment 5 Michal Pospisil 2026-09-21 17:49:55 UTC
(In reply to Vít Ondruch from comment #4)
> (In reply to Michal Pospisil from comment #3)
> > Wow, that was fast! Thank you.
> 
> Please don't get used to it 😇
> 
Hihi, I was halfway done putting back ethon when I saw activity on the bug, so I stopped. I definitely wasn't and won't expect that in the future. 

<snip>

> Looking into this. I think the update should be fine also for F45. The PR is
> here:
> 
> https://src.fedoraproject.org/rpms/rubygem-childprocess/pull-request/4
> 
> and waiting for the reverse dependencies test running here:
> 
> https://copr.fedorainfracloud.org/coprs/vondruch/mpb.1
And it's merged now, thank you again, now I can finally get rid of ethon (and more importantly ffi) 🎉

Comment 6 Fedora Update System 2026-09-23 13:15:21 UTC
FEDORA-2026-6cfb9bea88 (pcs-0.12.3-2.fc45 and rubygem-childprocess-5.1.0-1.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-6cfb9bea88

Comment 7 Fedora Update System 2026-09-24 01:35:05 UTC
FEDORA-2026-6cfb9bea88 has been pushed to the Fedora 45 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-6cfb9bea88`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-6cfb9bea88

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.


Note You need to log in before you can comment on or make changes to this bug.