adding rsockets support into JDK

Chris Hegarty chris.hegarty at oracle.com
Sat Dec 8 09:39:23 UTC 2018


I would like to summarise a few issues that have been encountered when
reviewing and testing.

- An issue in the Linux rdma-core implementation has been found and
  reported [1][2]. It is not immediately clear how to reasonably
  workaround this issue, or if/when it will be acknowledged and/or
  fixed.

- It has become apparent that mixing blocking and non-blocking
  connect/accept operations, in the same thread, may cause issues. For
  example, attempting to setup a connected-socket on the same host by
  issuing a non-blocking connect followed by a blocking accept, will
  just hang and not make progress [3]. Upon further enquiries it appears
  that the programming model for rsocket is a subtly different than that
  of the regular Berkeley sockets ( at least for the connection
  handshake ). It is not immediately clear how to reasonably workaround
  this issue ( it's not a bug in rdma-core, but more a fundamental part
  of its thread-less operation ).

-Chris

[1] https://marc.info/?l=linux-rdma&m=154418100500796&w=2
[2] https://cr.openjdk.java.net/~chegar/rsocket/testNonBlocking_raccept.c
[3] https://cr.openjdk.java.net/~chegar/rsocket/testBlocking_raccept.c

> On 5 Dec 2018, at 17:03, Lu, Yingqi <yingqi.lu at intel.com> wrote:
> 
> Hi Chris,
>  
> That totally explains it! Thank you for the help! I already applied the patch locally.
>  
> I am waiting for more feedback before doing version 25 of the patch.
>  
> Thanks,
> Lucy
>   <>
>  <>From: Chris Hegarty [mailto:chris.hegarty at oracle.com] 
> Sent: Wednesday, December 5, 2018 6:39 AM
> To: Lu, Yingqi <yingqi.lu at intel.com>
> Cc: Brian Burkhalter <brian.burkhalter at oracle.com>; 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
>  
> Lucy,
> 
> 
> On 5 Dec 2018, at 05:15, Lu, Yingqi <yingqi.lu at intel.com <mailto:yingqi.lu at intel.com>> wrote:
> ...
>  
> 3.      I took a look at the first issue you found regarding to socket channel read does not return EOF at the end. I found that issue might not related to the current patch. I tested regular TCP socket channel with both JDK11 and current trunk and I saw the exact same issue.
>  
> I should have spotted this earlier! The test creates a buffer with just
> enough space for the expected message. When the complete message has
> been received, the read method will return 0 since there is not enough
> space in the buffer, even though the only remaining data to read is
> EOF. I fixed this in the test and added a few more assertions for the
> shutdown states.
>  
>   https://cr.openjdk.java.net/~chegar/rsocket/webrev.24.1/ <https://cr.openjdk.java.net/~chegar/rsocket/webrev.24.1/>
>   
> -Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20181208/ddbbfe9a/attachment.html>


More information about the nio-dev mailing list