Project

General

Profile

Actions

Backport #9132

closed

Mutex error while using EM.defer with Ruby 2.0.0

Added by shurab (Alexander Babichev) over 10 years ago. Updated almost 8 years ago.

Status:
Rejected
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)

Updated by nagachika (Tomoyuki Chikanaga) over 10 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"

Actions #2

Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago

  • Status changed from Feedback to Open

Sorry, I can reproduce with more trial.

Updated by aaron@serendipity.cx (Aaron Stone) over 9 years ago

Any idea what is going on here? It is hurting eventmachine: https://github.com/eventmachine/eventmachine/issues/457

Actions #5

Updated by naruse (Yui NARUSE) almost 8 years ago

  • Status changed from Open to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0