Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: JRuby 1.7.0.pre1
-
Fix Version/s: None
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Hidejruby 1.7.0.dev (ruby-1.9.3-p139) (2012-04-13 873006d) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_31) [darwin-x86_64-java]
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-10M3635)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)
Showjruby 1.7.0.dev (ruby-1.9.3-p139) (2012-04-13 873006d) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_31) [darwin-x86_64-java] java version "1.6.0_31" Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-10M3635) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)
-
Number of attachments :
Description
I'm going to re-file this issue. Originally, it was https://jira.codehaus.org/browse/JRUBY-4614 .
On my Mac, test_socket.rb still blocks the thread. Thread dump is https://gist.github.com/2380016 .
Clearly, test_socket.rb is the culprit. When the line "test_socket" in test/jruby_index is commented out, "ant test" finishes.
As I wrote in JRUBY-4614, each test in test_socket finishes when those get run individually. However, those won't run concurrently. As you know, unit test runs multiple tests concurrently. When unit test gets involved in, dead lock happens.
I reported in JRUBY-4614, below caused deadlock:
test_unix_socket_peeraddr
test_can_create_socket_server_and_client_connected_to_it_and_send_from_server_to_client
test_can_create_socket_server_and_client_connected_to_it_and_send_from_client_to_server_using_recvfrom
test_can_create_socket_server_and_client_connected_to_it_and_send_from_server_to_client_using_recvfrom
Currently, those four tests are commented out in master branch. But, still test_socket.rb causes dead lock. So, probably, there's some more tests that have problems.
Eventually, I figured out what was playing the role.
My OS X firewall is enabled. When I turned off, "ant test" ran and finished. If you have OS X 10.6, you can set firewall on following http://support.apple.com/kb/HT1810 . Then, test_socket.rb will cause dead lock.
However, the 4 tests listed above caused dead lock even without firewall.
Currently, those are commented out and perhaps will be rewritten to be better one. So, I'll resolve this issue. If you have a chance, try "ant test" with firewall on.