Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with concurrent-ruby dependency under mutation testing #757

Closed
mostlyobvious opened this issue Aug 28, 2020 · 2 comments
Closed

Issue with concurrent-ruby dependency under mutation testing #757

mostlyobvious opened this issue Aug 28, 2020 · 2 comments

Comments

@mostlyobvious
Copy link
Member

mostlyobvious commented Aug 28, 2020

There has been a recent wave of failing builds on particular RuntimeError:

#<Thread:0x00007fab53622338@/root/project/ruby_event_store/spec/client_spec.rb:207 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
	5: from /root/project/ruby_event_store/spec/client_spec.rb:208:in `block (4 levels) in <module:RubyEventStore>'
	4: from /root/project/ruby_event_store/lib/ruby_event_store/client.rb:215:in `with_metadata'
	3: from /root/project/ruby_event_store/lib/ruby_event_store/client.rb:306:in `metadata='
	2: from /usr/local/bundle/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb:77:in `value='
	1: from /usr/local/bundle/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb:42:in `semi_sync'
/usr/local/bundle/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb:77:in `block in value=': can't add a new key into hash during iteration (RuntimeError)

This comes from the code that was not changed recently and uses ThreadLocalVar from concurrent-ruby package.

It has been reported [#698] in the past that particular version of that package segfaulted on MRI 2.6. As a resolution, dependency on version >= 1.1.6 was set.

There has been a new release of concurrent-ruby since August 08, 2020 (1.1.7). It has changed the implementation of ThreadLocalVar to rely on GIL on MRI to avoid problems with thread/mutex/queue in finalizers:
ruby-concurrency/concurrent-ruby@a6654b3

We've started observing the issue on CI since 2020-08-18 (and CI was not used earlier this month). There's no Gemfile.lock for dev dependencies and this new version has been pulled in.

Mutation testing with mutant is known to exercise MRI very well — I'm not surprised if it exposes some underlying MRI issues.

@pitr-ch
Copy link

pitr-ch commented Aug 28, 2020

I think I see the issue, I'll fix it asap in concurrent-ruby and release a new version.

@mostlyobvious
Copy link
Member Author

@pitr-ch The issue seems to be gone 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants