On Thu, 27 May 2021 00:41:25 GMT, Jie Fu <ji...@openjdk.org> wrote:

>>> if sctp is configured on a linux system would there exist a /proc/net/sctp 
>>> and have an entry in /proc/net/protocols ?
>> 
>> No /proc/net/sctp and no entry in /proc/net/protocols.
>> But I don't think it's the reason since it passed on another machine without 
>> /proc/net/sctp and the entry too.
>> Thanks.
>
>> > if sctp is configured on a linux system would there exist a /proc/net/sctp 
>> > and have an entry in /proc/net/protocols ?
>> 
>> No /proc/net/sctp and no entry in /proc/net/protocols.
>> But I don't think it's the reason since it passed on another machine without 
>> /proc/net/sctp and the entry too.
>> Thanks.
> 
> After `sudo yum install lksctp-tools`, which would install libsctp.so.1, both 
> the machines fail now.
> So @ChrisHegarty is right: the machine in question has the libsctp.so.1 
> library, but the kernel module is not loaded.
> Thanks.

@DamonFool Thanks for checking this, and helping track down the root cause of 
the issue.

The machine configuration is a little unusual (since it has the user-level 
libraries installed, while the kernel module is not loaded). Clearly, to 
workaround the issue, the "sctp" kernel module could be loaded, but that will 
just serve to mask/hide the underlying problem.

The bug is really in the Java_sun_nio_ch_sctp_SctpNet_socket0 native method ( 
SctpNet.c ) - there should be an explicit check for ENOPROTO after calling 
socket(2), throwing UnsupportedOperationException if that is the case.

@DamonFool  I would much prefer to keep the test as it is and fix the 
underlying bug, but this may be more than you want to do? If so, I'll get this 
done myself.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4199

Reply via email to