JRuby

Deadlock between RubyModule.includeModule() and RubyClass.invalidateCacheDescendants()

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1.5
  • Fix Version/s: JRuby 1.2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Relevant parts of call stacks:

JobScheduler pool 3@10778, priority=6, in group 'Idea Thread Group', status: 'MONITOR'
	 blocks AWT-EventQueue-1@1708
	 waiting for AWT-EventQueue-1@1708
	  at org.jruby.RubyClass.invalidateCacheDescendants(RubyClass.java:655)      # this: RubyClass@11637
	  at org.jruby.RubyClass.invalidateCacheDescendants(RubyClass.java:658)      # this: RubyClass@11636

AWT-EventQueue-1@1708, priority=6, in group 'Idea Thread Group', status: 'MONITOR'
	 blocks JobScheduler pool 3@10778
	 waiting for JobScheduler pool 3@10778
	  at org.jruby.RubyClass.removeSubclass(RubyClass.java:650)                       # this: RubyClass@11636
	  at org.jruby.RubyModule.proceedWithInclude(RubyModule.java:2135)          # this: RubyClass@11637
	  at org.jruby.RubyModule.doIncludeModule(RubyModule.java:2079)
	  at org.jruby.RubyModule.includeModule(RubyModule.java:494)

Activity

Hide
Charles Oliver Nutter added a comment -

Nice find, looking into it.

Show
Charles Oliver Nutter added a comment - Nice find, looking into it.
Hide
Charles Oliver Nutter added a comment -

Ok, it turns out the synchronization on invalidateCacheDescendants was no longer necessary because the generation-holder had its own synchronization. I don't have a good way to reproduce your issue, but this should fix it. Please let me know ASAP if you see it again. Committed in r8930.

Show
Charles Oliver Nutter added a comment - Ok, it turns out the synchronization on invalidateCacheDescendants was no longer necessary because the generation-holder had its own synchronization. I don't have a good way to reproduce your issue, but this should fix it. Please let me know ASAP if you see it again. Committed in r8930.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: