imap connections hang forever on sun.nio.ch.EPollArrayWrapper.epollWait
-----------------------------------------------------------------------
Key: JRUBY-5169
URL: http://jira.codehaus.org/browse/JRUBY-5169
Project: JRuby
Issue Type: Bug
Components: Ruby 1.8.7
Affects Versions: JRuby 1.5.3
Environment: Ubuntu 10.04 LTS
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.1) (6b18-1.8.1-0ubuntu1)
OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode)
jruby-openssl (0.7.2.dev)
Reporter: Karl Baum
I have a jruby rest service which retrieves email from different imap accounts
using ruby imap. After being up for a few hours, all of the worker threads
become stuck within get_tagged_response on "@response_arrival.wait"
def get_tagged_response(tag)
until @tagged_responses.key?(tag)
@response_arrival.wait
end
return pick_up_tagged_response(tag)
end
They seem to be waiting on their @receiver_thread which is retrieving data from
the imap server. When i do a thread dump, half of the threads are stuck here:
"Thread-9802" daemon prio=10 tid=0x0000000003e71000 nid=0x5e78 runnable
[0x00007f3f6e9c6000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:228)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:83)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
- locked <0x00007f3ff95fbe48> (a sun.nio.ch.Util$1)
- locked <0x00007f3ff95fbe30> (a java.util.Collections$UnmodifiableSet)
- locked <0x00007f3ff95fba70> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
at org.jruby.ext.openssl.SSLSocket.waitSelect(SSLSocket.java:240)
at org.jruby.ext.openssl.SSLSocket.sysread(SSLSocket.java:448)
at
org.jruby.ext.openssl.SSLSocket$i_method_0_1$RUBYINVOKER$sysread.call(org/jruby/ext/openssl/SSLSocket$i_method_0_1$RUBYINVOKER$sysread.gen:65535)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:630)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:186)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:146)
at
ruby.jit.fill_rbuff_0CEA65EC1C909A5CF6CB7E8100C08A3F334C6007.rescue_1$RUBY$__rescue___0(buffering.rb:35)
at
ruby.jit.fill_rbuff_0CEA65EC1C909A5CF6CB7E8100C08A3F334C6007.__file__(buffering.rb:34)
at
ruby.jit.fill_rbuff_0CEA65EC1C909A5CF6CB7E8100C08A3F334C6007.__file__(buffering.rb)
at
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:119)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:106)
at
ruby.jit.gets_78EF17A1CC25A7841D76040F4F007ECC23A22E41.__file__(buffering.rb:106)
at
ruby.jit.gets_78EF17A1CC25A7841D76040F4F007ECC23A22E41.__file__(buffering.rb)
at
org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:39)
at
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:153)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at
ruby.jit.get_response_9C1FCDC0EA0182083B570911F4E3FECA09F08611.__file__(imap.rb:994)
at
ruby.jit.get_response_9C1FCDC0EA0182083B570911F4E3FECA09F08611.__file__(imap.rb)
at
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:119)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:289)
Could this be a problem with nio or open_ssl? I am using jruby-openssl
(0.7.2.dev).
I originally submitted a ticket with the ruby developers but they referred me
to jruby :-).
http://redmine.ruby-lang.org/issues/show/3999
thx.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email