Project

General

Profile

Actions

Bug #17998

open

ractor: process hanging (with ractors initialized, but not being used)

Added by chucke (Tiago Cardoso) almost 3 years ago. Updated about 1 year ago.

Status:
Assigned
Target version:
-
[ruby-core:104341]

Description

I couldn't figure out how to reproduce this in a more contained way, so I'll share what I'm doing in this minitest branch.

I'm trying to make minitest's parallel mode use ractors. If you look at the last commit of the branch, I'm:

  • replacing the parallel executor with a ractor-based one;
  • I'm defining the ractor executor, where I have a ractor pipe that a pool will consume work from
  • I'm turning off parallel subset of tests (to reproduce the bug that I'll be describing).

When I run rake test in my Mac (BigSur 11.4), the process hangs. I can see that the ractor threads are executing and running, but the test process doesn't respond to the INFO signal interrupt (which should tell me where the process is hanging). This seems like a bug in the VM, as no work is being sent to the parallel executor, i.e. all ractors should be sleeping (I've puts'd also the executor shutdown process, and it never reaches it).

If I replace the ractor-based executor back with the thread based executor, everything works as expected.


Files

bug17998-0001.log (58.3 KB) bug17998-0001.log xtkoba (Tee KOBAYASHI), 06/17/2021 07:11 PM

Updated by xtkoba (Tee KOBAYASHI) almost 3 years ago

This reproduces for me on x86_64-linux using HoneyryderChuck/minitest issue-872 873ffd8.

In addition to hanging, there appear to be two more (nondeterministic) errors. A full log is attached.

/var/tmp/ruby/yyy/minitest/lib/minitest/test.rb:213:in `with_info_handler': can not access instance variables of classes/modules from non-main Ractors (Ractor::IsolationError)
[BUG] pthread_mutex_destroy: Device or resource busy (EBUSY)

Updated by ko1 (Koichi Sasada) over 2 years ago

  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)

Updated by luke-gru (Luke Gruber) about 1 year ago

Is this still an issue with current ruby @xtkoba (Tee KOBAYASHI)? I checkout out your branch and with a few modifications for Ractor::IsolationErrors, it worked for me.
It worked on: 3.3.0-dev and 3.2.0 (2022-12-25 revision a528908271)

Updated by xtkoba (Tee KOBAYASHI) about 1 year ago

I don't know. This is not my issue in the first place.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0