Project

General

Profile

Backport #9132

Mutex error while using EM.defer with Ruby 2.0.0

Added by shurab (Alexander Babichev) almost 6 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
[ruby-core:58449]

Description

We are in process of migrating our gem from ruby-1.9.3 to ruby-2.0.0. While running rspec examples with v2.0.0
sometimes the following error happens:

/usr/local/lib/ruby/2.0.0/thread.rb:188:in synchronize': Attempt to unlock a mutex which is locked #by another thread (ThreadError)
from /usr/local/lib/ruby/2.0.0/thread.rb:188:in
block in pop'
from /usr/local/lib/ruby/2.0.0/thread.rb:187:in handle_interrupt'
from /usr/local/lib/ruby/2.0.0/thread.rb:187:in
pop'
from /usr/local/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1036:in #`block in spawn_threadpool'

Initially, I thought that might be related to this EnventMachine issue: https://github.com/eventmachine/eventmachine/issues/457.

But more detailed analysis shows that it might be ruby-2.0.0:

  • mutex error never been observed with ruby-1.9.3-p448, ruby 2.1.0dev(2013-11-20 trunk 43737), and rbx-2.1.1
  • error happens with ruby-2.0.0-p247, and stable snapshot ruby 2.0.0p350 (2013-11-20 revision 43733)

How to reproduce it: see gist https://gist.github.com/shurab/7472793
Environment: ruby-2.0.0-427, eventmachine (1.0.3), rspec (2.14.1)

History

Updated by nagachika (Tomoyuki Chikanaga) almost 6 years ago

  • Status changed from Open to Feedback

I cannot reproduce with 2.0.0-p247 on my laptop with Gemfile shown below.
Is it platform dependent?

== Gemfile ==
source "https://rubygems.org"

gem "eventmachine"
gem "rspec"

#2

Updated by nagachika (Tomoyuki Chikanaga) almost 6 years ago

  • Status changed from Feedback to Open

Sorry, I can reproduce with more trial.

#5

Updated by naruse (Yui NARUSE) over 3 years ago

  • Status changed from Open to Rejected

Also available in: Atom PDF