Project

General

Profile

Actions

Bug #19853

closed

Segfault when calling `system` from a non-blocking fiber

Added by rmosolgo (Robert Mosolgo) about 1 year ago. Updated about 1 year ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin22]
[ruby-core:114568]

Description

Hi! I'm trying to improve my Ruby library to support transfer-based fibers (https://github.com/rmosolgo/graphql-ruby/pull/4322). To test parallel I/O, I'm using system("sleep #{duration}"), but this causes a segfault sometimes. I'd love to find a way to keep developing this feature but I'm not sure where to go next.

I have attached a script which replicates the bug and I have attached the full segfault error dump. I encountered this error by running:

ruby fiber_bug.rb 2>out.txt

Does that help debug? Please let me know if I can provide anything else that'd be helpful.


Files

out.txt (121 KB) out.txt Output on my machine when the segfault comes up rmosolgo (Robert Mosolgo), 08/28/2023 04:04 PM
fiber_bug.rb (624 Bytes) fiber_bug.rb Script to replicate this problem rmosolgo (Robert Mosolgo), 08/28/2023 04:05 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0