Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Seán Coffey
s like a great piece of modern concurrent Java coding :) Well done! +1 Best regards Christoph -Original Message- From: Chris Hegarty [mailto:chris.hega...@oracle.com] Sent: Freitag, 23. Juni 2017 15:28 To: Seán Coffey ; Langer, Christoph Cc: net-dev Subject: Re: RFR : 8182672: Java

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Mark Sheppard
82672: Java 8u121 on Linux intermittently returns null for MAC address On 23/06/17 10:56, Seán Coffey wrote: Thanks to Christoph, Vyom and Mark for the reviews. I've improved the testcase as per feedback. Hope this meets all requests : http://cr.openjdk.java.net/~coffeys/webrev.818267

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Vyom Tewari
Hi Chris, test looks good, one minor comment can be ignored, in failing case it print stack and "Exception in thread "main" java.lang.RuntimeException: Failed" both. I can see main is declared to throw Exception. Is is possible to throw exception instead of printing trace or pass this except

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Seán Coffey
rrent Java coding :) Well done! +1 Best regards Christoph -Original Message- From: Chris Hegarty [mailto:chris.hega...@oracle.com] Sent: Freitag, 23. Juni 2017 15:28 To: Seán Coffey ; Langer, Christoph Cc: net-dev Subject: Re: RFR : 8182672: Java 8u121 on Linux intermittently returns

RE: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Langer, Christoph
dev > Subject: Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null > for > MAC address > > > > On 23/06/17 10:56, Seán Coffey wrote: > > Thanks to Christoph, Vyom and Mark for the reviews. > > > > I've improved the testcas

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Chris Hegarty
On 23/06/17 10:56, Seán Coffey wrote: Thanks to Christoph, Vyom and Mark for the reviews. I've improved the testcase as per feedback. Hope this meets all requests : http://cr.openjdk.java.net/~coffeys/webrev.8182672.jdk10.v2/webrev/ The change looks good. Sean and I did a live coding sessi

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Vyom Tewari
0:17 To: Vyom Tewari ; net-dev Subject: Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address Hi Vyom, thanks for testing. Null is a valid value for some interfaces. I've excluded the loopback interface from being testing. Perhaps there's other issues at pla

RE: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Langer, Christoph
when it comes > to an exception, the thread name could be mentioned, too. > > > > Best regards > > Christoph > > > >> -----Original Message----- > >> From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of > >> Seán Coffey > >&

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-23 Thread Seán Coffey
ev Subject: Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address Hi Vyom, thanks for testing. Null is a valid value for some interfaces. I've excluded the loopback interface from being testing. Perhaps there's other issues at play here. We know that

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-22 Thread Vyom Tewari
Hi Sean, i debug the failure and it look like you need to modify your test and make it more robust. As Christoph suggested first call "getHardwareAddress" and check if is not null then only iterate 100 time. This way your test will run on any platform and one minor comment make your global v

RE: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-22 Thread Langer, Christoph
g, 22. Juni 2017 20:17 > To: Vyom Tewari ; net-dev d...@openjdk.java.net> > Subject: Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null > for > MAC address > > Hi Vyom, > > thanks for testing. Null is a valid value for some interfaces. I've &g

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-22 Thread Mark Sheppard
Hi Sean, main change looks fine - it sorts the reported problem. ran your test against jdk8 152 and a recent jdk9 builds to verify that your test failure occurs. The failure is seen, together with an additional (intermittent) exception: java.net.SocketException: No such device (ioctl(SIOCGIF

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-22 Thread Seán Coffey
Hi Vyom, thanks for testing. Null is a valid value for some interfaces. I've excluded the loopback interface from being testing. Perhaps there's other issues at play here. We know that getHardwareAddress() can throw SocketException if I/O fails. For this particular scenario we're not interes

RE: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-22 Thread Langer, Christoph
> From: Seán Coffey [mailto:sean.cof...@oracle.com] > Sent: Donnerstag, 22. Juni 2017 18:29 > To: OpenJDK Network Dev list ; Langer, > Christoph > Subject: RFR : 8182672: Java 8u121 on Linux intermittently returns null for > MAC address > > JDK 10 fix required to correct a ra

Re: RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-22 Thread Vyom Tewari
Hi Sean, with your patch as well your test case is failing on my laptop(Ubuntu16.04), when i tried to run on jdk8 i am getting below error. java.net.SocketException: No such device (ioctl(SIOCGIFHWADDR) failed) at java.net.NetworkInterface.getMacAddr0(Native Method) at java.net.Netwo

RFR : 8182672: Java 8u121 on Linux intermittently returns null for MAC address

2017-06-22 Thread Seán Coffey
JDK 10 fix required to correct a race issue in NetworkInterface. I don't believe the ifreq struct needs to be static in any case. New auto unit testcase also. I propose to skip this fix for JDK 9 and fix in an update release for that family. I also plan to port this to jdk8u-dev. https://bugs.