JDK-8235169 : java/nio/channels/DatagramChannel/ManySenders.java failing on Ubuntu18.04
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 14
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-12-02
  • Updated: 2019-12-05
  • Resolved: 2019-12-05
Related Reports
Duplicate :  
Relates :  
Description
NetworkInterface.getByInetAddress(lh) returns null, leading to this NPE:

STDERR:
java.lang.NullPointerException
	at ManySenders.main(ManySenders.java:52)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:832)

JavaTest Message: Test threw exception: java.lang.NullPointerException
JavaTest Message: shutting down test

Comments
java/nio/channels/DatagramChannel/ManySourcesAndTargets.java passed on my Ubuntu18.04 machine. Thanks Alan for fixing it.
05-12-2019

The changes for JDK-8235193 have been pushed to jdk/jdk. Would you mind re-testing as I suspect we can close this issue now.
04-12-2019

This test has been significantly updated as part of JDK-8235193. It's okay to fix the test in advance if really needed.
02-12-2019

Aleksej will sponsor this change.
02-12-2019

Hi Alan, I had tried to subscribe the nio-dev list, but it will take some time. I think your solution is much better. So I just re-assigned this task to you. Hope you wouldn't mind it. Thanks a lot.
02-12-2019

I've attached a patch to this bug that will at least test the addresses plumbed to the loopback interface when local host is configured with an address that can't be found by NetworkInterface.getInetAddress. This will keep the test consistent with the original code and avoid skipping the test completely.
02-12-2019

RFR: https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-December/063741.html
02-12-2019