Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8309063

java/nio/channels/DatagramChannel/Loopback.java fails with jtreg test timeout

    XMLWordPrintable

Details

    • x86_64
    • linux

    Description

      IPv6 only environment OL9 x64 IPV6 only configured environment

      test result: Error. Agent error: java.lang.Exception: Agent 23 timed out with a timeout of 1200 seconds; check console log for any additional details

      This is run agentvm mode hence test diagnostic output is missing. Test is stuck in multicast receive

      "AgentVMThread" #38 [139654] prio=5 os_prio=0 cpu=22.00ms elapsed=1212.34s allocated=271K defined_classes=25 tid=0x00007f8a1439b9e0 nid=139654 runnable [0x00007f89fc29c000]
         java.lang.Thread.State: RUNNABLE
      at sun.nio.ch.DatagramChannelImpl.receive0(java.base@21-ea/Native Method)
      at sun.nio.ch.DatagramChannelImpl.receiveIntoNativeBuffer(java.base@21-ea/DatagramChannelImpl.java:789)
      at sun.nio.ch.DatagramChannelImpl.receive(java.base@21-ea/DatagramChannelImpl.java:773)
      at sun.nio.ch.DatagramChannelImpl.receive(java.base@21-ea/DatagramChannelImpl.java:577)
      at Loopback.test(Loopback.java:129)
      at Loopback.main(Loopback.java:83)
      at java.lang.invoke.LambdaForm$DMH/0x00000001000c0000.invokeStatic(java.base@21-ea/LambdaForm$DMH)
      at java.lang.invoke.LambdaForm$MH/0x0000000100141800.invoke(java.base@21-ea/LambdaForm$MH)
      at java.lang.invoke.Invokers$Holder.invokeExact_MT(java.base@21-ea/Invokers$Holder)
      at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@21-ea/DirectMethodHandleAccessor.java:154)
      at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@21-ea/DirectMethodHandleAccessor.java:103)
      at java.lang.reflect.Method.invoke(java.base@21-ea/Method.java:578)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.lang.Thread.runWith(java.base@21-ea/Thread.java:1605)
      at java.lang.Thread.run(java.base@21-ea/Thread.java:1592)

      loopback receive not effective

                  // -- IP_MULTICAST_LOOP enabled --

                  assertTrue(dc.getOption(IP_MULTICAST_LOOP), "IP_MULTICAST_LOOP not enabled");
                  System.out.println("IP_MULTICAST_LOOP enabled");

                  // send datagram to multicast group
                  System.out.format("send %s -> %s%n", dc.getLocalAddress(), target);
                  ByteBuffer src = ByteBuffer.wrap("hello".getBytes("UTF-8"));
                  dc.send(src, target);

                  // receive datagram sent to multicast group
                  ByteBuffer dst = ByteBuffer.allocate(100);
                  int senderPort;
                  do {
                      dst.clear();
                      SocketAddress sender = dc.receive(dst);
                      System.out.format("received %s from %s%n", dst, sender);
                      senderPort = ((InetSocketAddress) sender).getPort();
                  } while (senderPort != localPort);
                  dst.flip();
                  assertTrue(dst.remaining() == src.capacity(), "Unexpected message size");

      Attachments

        Activity

          People

            msheppar Mark Sheppard
            msheppar Mark Sheppard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: