From: "Eregon (Benoit Daloze)" Date: 2022-03-18T15:55:08+00:00 Subject: [ruby-core:107978] [Ruby master Bug#18474] 938e027c seems to have caused a regression in yield handling with concurrent-ruby Issue #18474 has been updated by Eregon (Benoit Daloze). Backport changed from 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN to 2.6: REQUIRED, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONTNEED @mame Thanks for the repro and explanation. I've been looking into this and summarized some thoughts in https://github.com/ruby-concurrency/concurrent-ruby/issues/931#issuecomment-1072542582 Since this bug is fixed on 3.1, but 2.6-3.0 all print `"should_not_reach_here"`, I'll close this issue to mark it ready for backport. This feels like a serious semantic issue, so I think it is important to backport. ---------------------------------------- Bug #18474: 938e027c seems to have caused a regression in yield handling with concurrent-ruby https://bugs.ruby-lang.org/issues/18474#change-96929 * Author: aaronjensen (Aaron Jensen) * Status: Open * Priority: Normal * ruby -v: 3.1.0 * Backport: 2.6: REQUIRED, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONTNEED ---------------------------------------- I'm sorry for the awful title, I don't know enough about what is going on to describe it better. From a debugging perspective it seems that a very specific set of circumstances causes a `begin` block to be jumped out of when a proc it is calling yield, without anything being rescuable. An ensure block will be evaluated, if added, but nothing after that. This is begin block: https://github.com/ruby-concurrency/concurrent-ruby/blob/52c08fca13cc3811673ea2f6fdb244a0e42e0ebe/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#L23-L29 For reference, see this issue: https://github.com/ruby-concurrency/concurrent-ruby/issues/931 I have a repro here: https://github.com/aaronjensen/concurrent-repro It requires concurrent-ruby. Someone better versed than me may be able to create a repro without it, but there is a lot going on in concurrent-ruby. Everything in the repro seems to be required, to_a.first works, but first does not for example. -- https://bugs.ruby-lang.org/ Unsubscribe: