adding rsockets support into JDK

Lu, Yingqi yingqi.lu at intel.com
Wed Nov 28 21:42:23 UTC 2018


Hi Chris,

I have already updated the version 20 with your changes. I also removed several redundant test cases. The updated version of patch is available at: https://cr.openjdk.java.net/~ylu/8195160.20/

Would you please review the changes especially the changes regarding to the protocol family? This way, we can finalize the CSR soon.

At the meantime, I will look into the IPv6 test cases.

Thanks,
Lucy

>-----Original Message-----
>From: nio-dev [mailto:nio-dev-bounces at openjdk.java.net] On Behalf Of Lu,
>Yingqi
>Sent: Wednesday, November 28, 2018 9:41 AM
>To: Chris Hegarty <chris.hegarty at oracle.com>
>Cc: Aundhe, Shirish <shirish.aundhe at intel.com>; Viswanathan, Sandhya
><sandhya.viswanathan at intel.com>; nio-dev at openjdk.java.net; Kaczmarek,
>Eric <eric.kaczmarek at intel.com>
>Subject: RE: adding rsockets support into JDK
>
>Hi Chris,
>
>Thank you very much for your help here! Your changes look very good to me!
>I will merge your changes into the most recent version of patch that has the
>protocol family added.
>
>Thanks,
>Lucy
>
>>-----Original Message-----
>>From: Chris Hegarty [mailto:chris.hegarty at oracle.com]
>>Sent: Wednesday, November 28, 2018 8:58 AM
>>To: Lu, Yingqi <yingqi.lu at intel.com>
>>Cc: Alan Bateman <Alan.Bateman at oracle.com>; Viswanathan, Sandhya
>><sandhya.viswanathan at intel.com>; nio-dev at openjdk.java.net; Aundhe,
>>Shirish <shirish.aundhe at intel.com>; Kaczmarek, Eric
>><eric.kaczmarek at intel.com>
>>Subject: Re: adding rsockets support into JDK
>>
>>Lucy,
>>
>>> On 23 Nov 2018, at 21:38, Lu, Yingqi <yingqi.lu at intel.com> wrote:
>>>
>>> ...
>>>
>>> I completed the version 19 of the patch at
>>> http://cr.openjdk.java.net/~ylu/8195160.19
>>
>>
>>I encountered a few issues with the catching and handling of
>>ExceptionInInitializerError [1] [2], as well as the fact that since
>>class initialization fails subsequent calls to the factory methods will
>>throw NoClassDefFoundError ( which is not good ).
>>
>>Rather than allow the UnsupportedOperationException to be thrown during
>>class initialization it is better to allow class initialization to
>>complete successfully ( capturing the error ) and then prevent
>>instances of RDMA socket and channel implementations form being
>>constructed. Since the changes are a little involved I created a webrev
>>so that you can more easily see them
>>
>> https://cr.openjdk.java.net/~chegar/rsocket/webrev.19.1/
>>  ( based on webrev .91 )
>>
>>
>>I also think that making RdmaSocketImpl abstract ( and its socket
>>option related methods ) will be cleaner, since it ensures that
>>subclasses will override the methods. I also moved the supported
>>options lists into their appropriate subclass. This is in the webrev
>>too. And updated and existing test to ensure that multiple calls to the factory
>methods behave as expected.
>>
>>-Chris
>>
>>
>>[1] FAILED: jdk/net/RdmaSockets/rsocket/RdmaSocketsTest.java
>>java.lang.NoClassDefFoundError: Could not initialize class
>>jdk.internal.net.rdma.RdmaSocketChannelImpl
>>        at
>>jdk.net/jdk.internal.net.rdma.LinuxRdmaPollSelectorProvider.openSocketC
>>ha
>>nnel(LinuxRdmaPollSelectorProvider.java:53)
>>        at
>>jdk.net/jdk.internal.net.rdma.RdmaPollSelectorProvider.openSocketChanne
>>l(
>>RdmaPollSelectorProvider.java:65)
>>        at
>>jdk.net/jdk.net.RdmaSockets.openSocketChannel(RdmaSockets.java:129)
>>        at RdmaSocketsTest.main(RdmaSocketsTest.java:64)
>>        at
>>java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>>Method)
>>        at
>>java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMe
>>t
>>hodAccessorImpl.java:62)
>>        at
>>java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Dele
>>gat
>>ingMethodAccessorImpl.java:43)
>>        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>>        at
>>com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(
>M
>>ainActionHelper.java:246)
>>        at java.base/java.lang.Thread.run(Thread.java:835)
>>
>>
>>[2] FAILED: jdk/net/RdmaSockets/rsocket/SocketOption/OptionsTest.java
>>FAILED:
>>jdk/net/RdmaSockets/rsocket/SocketOption/UnsupportedOptionsTest.java
>>java.lang.ExceptionInInitializerError
>>        at java.base/java.lang.Class.forName0(Native Method)
>>        at java.base/java.lang.Class.forName(Class.java:325)
>>        at
>>jdk.net/jdk.net.RdmaSocketOptions$PlatformRdmaSocketOptions.newInsta
>n
>>ce(RdmaSocketOptions.java:241)
>>        at
>>jdk.net/jdk.net.RdmaSocketOptions$PlatformRdmaSocketOptions.create(R
>d
>>maSocketOptions.java:256)
>>        at
>>jdk.net/jdk.net.RdmaSocketOptions$PlatformRdmaSocketOptions.<clinit>(R
>d
>>maSocketOptions.java:260)
>>        at
>>jdk.net/jdk.net.RdmaSocketOptions.<clinit>(RdmaSocketOptions.java:118)
>>        at UnsupportedOptionsTest.<clinit>(UnsupportedOptionsTest.java:55)
>>        at
>>java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>>Method)
>>        at
>>java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMe
>>t
>>hodAccessorImpl.java:62)
>>        at
>>java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Dele
>>gat
>>ingMethodAccessorImpl.java:43)
>>        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>>        at
>>com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapp
>e
>>r.java:127)
>>        at java.base/java.lang.Thread.run(Thread.java:835)
>>Caused by: java.lang.UnsupportedOperationException: librdmacm.so.1:
>>cannot open shared object file: No such file or directory
>>        at jdk.net/jdk.net.LinuxRdmaSocketOptions.init(Native Method)
>>        at
>>jdk.net/jdk.net.LinuxRdmaSocketOptions.<clinit>(LinuxRdmaSocketOptions.
>>j
>>ava:51)
>>        ... 13 more


More information about the nio-dev mailing list