Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-67

TCP tests fail under Java 5, not Java 6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Blocker Blocker
    • 1.2.0.CR2
    • 1.2.0.CR1
    • None
    • None
    • Workaround Exists
    • Hide

      Specify the EPoll selector provider on VM startup, using the following system property:

      -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider

      Not only does the problem disappear, but you should see improved overall performance as well.

      Show
      Specify the EPoll selector provider on VM startup, using the following system property: -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider Not only does the problem disappear, but you should see improved overall performance as well.
    • Medium

      /home/david/local/jdk/home-1.5-32/bin/java -Didea.launcher.port=7593 -Didea.launcher.bin.path=/home/david/local/idea-8.0.1-9164/bin -Dfile.encoding=UTF-8 -classpath /home/david/local/jdk/home-1.5-32/jre/lib/jce.jar:/home/david/local/jdk/home-1.5-32/jre/lib/rt.jar:/home/david/local/jdk/home-1.5-32/jre/lib/jsse.jar:/home/david/local/jdk/home-1.5-32/jre/lib/charsets.jar:/home/david/local/jdk/home-1.5-32/jre/lib/plugin.jar:/home/david/local/jdk/home-1.5-32/jre/lib/javaws.jar:/home/david/local/jdk/home-1.5-32/jre/lib/deploy.jar:/home/david/local/jdk/home-1.5-32/jre/lib/ext/sunjce_provider.jar:/home/david/local/jdk/home-1.5-32/jre/lib/ext/sunpkcs11.jar:/home/david/local/jdk/home-1.5-32/jre/lib/ext/dnsns.jar:/home/david/local/jdk/home-1.5-32/jre/lib/ext/localedata.jar:/home/david/src/java/xnio/out/test/version:/home/david/src/java/xnio/out/production/version:/home/david/src/java/xnio/out/test/nio2-impl:/home/david/src/java/xnio/out/production/nio2-impl:/home/david/src/java/xnio/out/test/logging-jdk:/home/david/src/java/xnio/out/production/logging-jdk:/home/david/src/java/xnio/trunk/test-support/target/test/classes:/home/david/src/java/xnio/trunk/test-support/target/main/classes:/home/david/src/java/xnio/out/test/api:/home/david/src/java/xnio/out/production/api:/home/david/local/idea-8.0.1-9164/lib/junit.jar:/home/david/src/java/xnio/out/test/slp-api:/home/david/src/java/xnio/out/production/slp-api:/home/david/src/java/xnio/out/test/slp-impl:/home/david/src/java/xnio/out/production/slp-impl:/home/david/src/java/xnio/out/test/posix-ish:/home/david/src/java/xnio/out/production/posix-ish:/home/david/src/java/xnio/trunk/nio-impl/target/test/classes:/home/david/src/java/xnio/trunk/nio-impl/target/main/classes:/home/david/src/java/xnio/out/test/transport:/home/david/src/java/xnio/out/production/transport:/home/david/src/java/xnio/out/test/samples:/home/david/src/java/xnio/out/production/samples:/home/david/src/java/xnio/out/test/example:/home/david/src/java/xnio/out/production/example:/home/david/src/java/xnio/out/test/deployer:/home/david/src/java/xnio/out/production/deployer:/home/david/local/jdk/repository/jbossxb/2.0.0.CR7/lib/jboss-xml-binding.jar:/home/david/local/jdk/repository/sun-jaxb/2.0.5/lib/jaxb-api.jar:/home/david/local/jdk/repository/jboss-common-core/2.2.3.GA/lib/jboss-common-core.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-structure-spi.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-core.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-client.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-core-spi.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-spi.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-impl.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-vfs-spi.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-client-spi.jar:/home/david/local/jdk/repository/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-vfs.jar:/home/david/local/jdk/repository/jboss-managed/2.0.0.snapshot/lib/jboss-managed.jar:/home/david/local/jdk/repository/jboss-microcontainer/2.0.0.Beta11/lib/jboss-aop-mc-int.jar:/home/david/local/jdk/repository/jboss-microcontainer/2.0.0.Beta11/lib/jboss-kernel.jar:/home/david/local/jdk/repository/jboss-microcontainer/2.0.0.Beta11/lib/jboss-dependency.jar:/home/david/src/java/xnio/out/test/linux-impl:/home/david/src/java/xnio/out/production/linux-impl:/home/david/src/java/xnio/out/test/jbossorg:/home/david/src/java/xnio/out/production/jbossorg:/home/david/src/java/xnio/out/test/jboss-jce:/home/david/src/java/xnio/out/production/jboss-jce:/home/david/src/java/xnio/out/test/docs:/home/david/src/java/xnio/out/production/docs:/home/david/src/java/xnio/out/test/build:/home/david/src/java/xnio/out/production/build:/home/david/local/idea-8.0.1-9164/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 @/tmp/idea_junit2253154019228878175.tmp
      4 test classes found in package 'org.jboss.xnio.nio.test'
      +0000.050 tid:10 INFO [TEST] Test: testClientTcpClose
      +0000.086 tid:10 INFO [org.jboss.xnio] XNIO Version 1.2.0.CR2
      +0000.088 tid:10 INFO [org.jboss.xnio.nio] XNIO NIO Implementation Version 1.2.0.CR2
      +0000.109 tid:10 DEBUG [org.jboss.xnio.nio] Creating NioXnio instance using executor java.util.concurrent.ThreadPoolExecutor@11d0a4f, 2 read threads, 1 write threads, 1 connect threads
      +0000.175 tid:10 TRACE [org.jboss.xnio.nio.tcp.server] Successfully started TCP server
      +0000.188 tid:10 TRACE [org.jboss.xnio.nio.tcp.connector] Connecting from any to /127.0.0.1:12345
      +0000.212 tid:11 TRACE [org.jboss.xnio.nio.tcp.connector] Connection is up (deferred)
      +0000.217 tid:12 TRACE [org.jboss.xnio.nio.tcp.server] TCP server accepted connection
      +0000.217 tid:11 TRACE [org.jboss.xnio.nio.tcp.channel] Closing TCP socket channel (NIO) <4e79f1> (local: /127.0.0.1:51807, remote: /127.0.0.1:12345)
      +0000.717 tid:10 TRACE [org.jboss.xnio.nio.tcp.connector] Closing TCP connector (NIO) <10f6d3>
      +0000.723 tid:10 TRACE [org.jboss.xnio.nio.tcp.server] Closing TCP server (NIO) <1bcc0bc>
      +0000.724 tid:10 TRACE [org.jboss.xnio.nio.tcp.server.channel] Closing TCP server channel (NIO) <1543c88> (local: /127.0.0.1:12345)
      +0000.725 tid:10 TRACE [org.jboss.xnio.nio.tcp.channel] Closing TCP socket channel (NIO) <27e353> (local: /127.0.0.1:12345, remote: /127.0.0.1:51807)
      +0000.727 tid:13 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@12d263f closed
      +0000.727 tid:14 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@12a0f6c closed
      +0000.728 tid:15 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@5a9de6 closed
      +0000.735 tid:16 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@13ad085 closed

      junit.framework.AssertionFailedError
      at org.jboss.xnio.nio.test.NioTcpTestCase$3.run(NioTcpTestCase.java:132)
      at org.jboss.xnio.nio.test.NioTcpTestCase.doConnectionTest(NioTcpTestCase.java:94)
      at org.jboss.xnio.nio.test.NioTcpTestCase.testClientTcpClose(NioTcpTestCase.java:129)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

      +0000.739 tid:10 INFO [TEST] Test: testServerTcpClose
      +0000.744 tid:10 DEBUG [org.jboss.xnio.nio] Creating NioXnio instance using executor java.util.concurrent.ThreadPoolExecutor@12b3d53, 2 read threads, 1 write threads, 1 connect threads
      +0000.746 tid:10 TRACE [org.jboss.xnio.nio.tcp.server] Successfully started TCP server
      +0000.746 tid:10 TRACE [org.jboss.xnio.nio.tcp.connector] Connecting from any to /127.0.0.1:12345
      +0000.747 tid:17 TRACE [org.jboss.xnio.nio.tcp.connector] Connection is up (deferred)
      +0000.748 tid:18 TRACE [org.jboss.xnio.nio.tcp.channel] Closing TCP socket channel (NIO) <982589> (local: /127.0.0.1:12345, remote: /127.0.0.1:51808)
      +0000.749 tid:18 TRACE [org.jboss.xnio.nio.tcp.server] TCP server accepted connection
      +0001.249 tid:10 TRACE [org.jboss.xnio.nio.tcp.channel] Closing TCP socket channel (NIO) <1c0e45a> (local: /127.0.0.1:51808, remote: /127.0.0.1:12345)
      +0001.250 tid:10 TRACE [org.jboss.xnio.nio.tcp.connector] Closing TCP connector (NIO) <cfec48>
      +0001.250 tid:10 TRACE [org.jboss.xnio.nio.tcp.server] Closing TCP server (NIO) <a17083>
      +0001.251 tid:10 TRACE [org.jboss.xnio.nio.tcp.server.channel] Closing TCP server channel (NIO) <21b220> (local: /127.0.0.1:12345)
      +0001.252 tid:19 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@10da5eb closed
      +0001.253 tid:20 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@1081d2e closed
      +0001.254 tid:21 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@1b3f829 closed

      junit.framework.AssertionFailedError
      at org.jboss.xnio.nio.test.NioTcpTestCase$6.run(NioTcpTestCase.java:208)
      at org.jboss.xnio.nio.test.NioTcpTestCase.doConnectionTest(NioTcpTestCase.java:94)
      at org.jboss.xnio.nio.test.NioTcpTestCase.testServerTcpClose(NioTcpTestCase.java:205)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

      +0001.256 tid:10 INFO [TEST] Test: testClientTcpNastyClose
      +0001.262 tid:22 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@765a16 closed
      +0001.264 tid:10 DEBUG [org.jboss.xnio.nio] Creating NioXnio instance using executor java.util.concurrent.ThreadPoolExecutor@148bd3, 2 read threads, 1 write threads, 1 connect threads
      +0001.265 tid:10 TRACE [org.jboss.xnio.nio.tcp.server] Successfully started TCP server
      +0001.266 tid:10 TRACE [org.jboss.xnio.nio.tcp.connector] Connecting from any to /127.0.0.1:12345
      +0001.267 tid:23 TRACE [org.jboss.xnio.nio.tcp.connector] Connection is up (deferred)
      +0001.267 tid:24 TRACE [org.jboss.xnio.nio.tcp.server] TCP server accepted connection
      +0001.271 tid:23 TRACE [org.jboss.xnio.nio.tcp.channel] Closing TCP socket channel (NIO) <2a15cd> (local: /127.0.0.1:51809, remote: /127.0.0.1:12345)
      +0001.771 tid:10 TRACE [org.jboss.xnio.nio.tcp.connector] Closing TCP connector (NIO) <fd68b1>
      +0001.772 tid:10 TRACE [org.jboss.xnio.nio.tcp.server] Closing TCP server (NIO) <e45076>
      +0001.772 tid:10 TRACE [org.jboss.xnio.nio.tcp.server.channel] Closing TCP server channel (NIO) <17653ae> (local: /127.0.0.1:12345)
      +0001.773 tid:10 TRACE [org.jboss.xnio.nio.tcp.channel] Closing TCP socket channel (NIO) <1431340> (local: /127.0.0.1:12345, remote: /127.0.0.1:51809)
      +0001.774 tid:25 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@15e9756 closed
      +0001.775 tid:27 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@1827284 closed
      +0001.774 tid:26 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@121ab80 closed
      +0001.778 tid:28 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@12d15a9 closed

      junit.framework.AssertionFailedError
      at org.jboss.xnio.nio.test.NioTcpTestCase$12.run(NioTcpTestCase.java:397)
      at org.jboss.xnio.nio.test.NioTcpTestCase.doConnectionTest(NioTcpTestCase.java:94)
      at org.jboss.xnio.nio.test.NioTcpTestCase.testClientTcpNastyClose(NioTcpTestCase.java:394)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

      +0001.779 tid:10 INFO [TEST] Test: testServerTcpNastyClose
      +0001.786 tid:10 DEBUG [org.jboss.xnio.nio] Creating NioXnio instance using executor java.util.concurrent.ThreadPoolExecutor@1c92535, 2 read threads, 1 write threads, 1 connect threads
      +0001.788 tid:10 TRACE [org.jboss.xnio.nio.tcp.server] Successfully started TCP server
      +0001.796 tid:10 TRACE [org.jboss.xnio.nio.tcp.connector] Connecting from any to /127.0.0.1:12345
      +0001.797 tid:29 TRACE [org.jboss.xnio.nio.tcp.connector] Connection is up (deferred)
      +0001.797 tid:30 INFO [TEST] Server opened
      +0001.798 tid:29 INFO [TEST] Client opened
      +0001.799 tid:30 TRACE [org.jboss.xnio.nio.tcp.channel] Closing TCP socket channel (NIO) <aa37a6> (local: /127.0.0.1:12345, remote: /127.0.0.1:51810)
      +0001.800 tid:30 TRACE [org.jboss.xnio.nio.tcp.server] TCP server accepted connection
      +0002.298 tid:10 TRACE [org.jboss.xnio.nio.tcp.channel] Closing TCP socket channel (NIO) <12b7eea> (local: /127.0.0.1:51810, remote: /127.0.0.1:12345)
      +0002.299 tid:10 TRACE [org.jboss.xnio.nio.tcp.connector] Closing TCP connector (NIO) <99353f>
      +0002.300 tid:10 TRACE [org.jboss.xnio.nio.tcp.server] Closing TCP server (NIO) <76e369>
      +0002.300 tid:10 TRACE [org.jboss.xnio.nio.tcp.server.channel] Closing TCP server channel (NIO) <a4e743> (local: /127.0.0.1:12345)
      +0002.301 tid:31 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@14c194d closed
      +0002.302 tid:32 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@1112783 closed
      +0002.302 tid:33 TRACE [org.jboss.xnio.nio.selector] Selector sun.nio.ch.PollSelectorImpl@1394894 closed

      Process finished with exit code 255

      junit.framework.AssertionFailedError
      at org.jboss.xnio.nio.test.NioTcpTestCase$15.run(NioTcpTestCase.java:471)
      at org.jboss.xnio.nio.test.NioTcpTestCase.doConnectionTest(NioTcpTestCase.java:94)
      at org.jboss.xnio.nio.test.NioTcpTestCase.testServerTcpNastyClose(NioTcpTestCase.java:468)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

              dlloyd@redhat.com David Lloyd
              dlloyd@redhat.com David Lloyd
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: