-
Bug
-
Resolution: Fixed
-
P2
-
13
ADDITIONAL SYSTEM INFORMATION :
Linux 64-bit, Red Hat Enterprise Linux Server release 7.6 (Maipo),
java -version
openjdk version "13" 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Opening a SctpServerChannel always fails in Java 13 (also in Java 14 EA). The same operation works fine on Java 12.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run this class:
import com.sun.nio.sctp.SctpServerChannel;
public class SctpBug {
public static void main(String[] args) {
try (SctpServerChannel serverChannel = SctpServerChannel.open()) {
if (serverChannel.isOpen()) {
System.out.println(" *** SCTP serverChannel is open");
Thread.sleep(1000);
}
}
catch (Exception e) {
System.out.println(" unable to load *** SCTP *** :" + e.getMessage());
}
System.out.println(" *** SCTP serverChannel is closed");
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
*** SCTP serverChannel is open
*** SCTP serverChannel is closed
ACTUAL -
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void sun.nio.ch.sctp.SctpNet.init()'
at jdk.sctp/sun.nio.ch.sctp.SctpNet.init(Native Method)
at jdk.sctp/sun.nio.ch.sctp.SctpNet.<clinit>(SctpNet.java:338)
at jdk.sctp/sun.nio.ch.sctp.SctpServerChannelImpl.<init>(SctpServerChannelImpl.java:97)
at jdk.sctp/com.sun.nio.sctp.SctpServerChannel.open(SctpServerChannel.java:106)
at SctpBug.main(SctpBug.java:8)
---------- BEGIN SOURCE ----------
import com.sun.nio.sctp.SctpServerChannel;
public class SctpBug {
public static void main(String[] args) {
try (SctpServerChannel serverChannel = SctpServerChannel.open()) {
if (serverChannel.isOpen()) {
System.out.println(" *** SCTP serverChannel is open");
Thread.sleep(1000);
}
}
catch (Exception e) {
System.out.println(" unable to load *** SCTP *** :" + e.getMessage());
}
System.out.println(" *** SCTP serverChannel is closed");
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
<none>
FREQUENCY : always
Linux 64-bit, Red Hat Enterprise Linux Server release 7.6 (Maipo),
java -version
openjdk version "13" 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Opening a SctpServerChannel always fails in Java 13 (also in Java 14 EA). The same operation works fine on Java 12.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run this class:
import com.sun.nio.sctp.SctpServerChannel;
public class SctpBug {
public static void main(String[] args) {
try (SctpServerChannel serverChannel = SctpServerChannel.open()) {
if (serverChannel.isOpen()) {
System.out.println(" *** SCTP serverChannel is open");
Thread.sleep(1000);
}
}
catch (Exception e) {
System.out.println(" unable to load *** SCTP *** :" + e.getMessage());
}
System.out.println(" *** SCTP serverChannel is closed");
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
*** SCTP serverChannel is open
*** SCTP serverChannel is closed
ACTUAL -
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void sun.nio.ch.sctp.SctpNet.init()'
at jdk.sctp/sun.nio.ch.sctp.SctpNet.init(Native Method)
at jdk.sctp/sun.nio.ch.sctp.SctpNet.<clinit>(SctpNet.java:338)
at jdk.sctp/sun.nio.ch.sctp.SctpServerChannelImpl.<init>(SctpServerChannelImpl.java:97)
at jdk.sctp/com.sun.nio.sctp.SctpServerChannel.open(SctpServerChannel.java:106)
at SctpBug.main(SctpBug.java:8)
---------- BEGIN SOURCE ----------
import com.sun.nio.sctp.SctpServerChannel;
public class SctpBug {
public static void main(String[] args) {
try (SctpServerChannel serverChannel = SctpServerChannel.open()) {
if (serverChannel.isOpen()) {
System.out.println(" *** SCTP serverChannel is open");
Thread.sleep(1000);
}
}
catch (Exception e) {
System.out.println(" unable to load *** SCTP *** :" + e.getMessage());
}
System.out.println(" *** SCTP serverChannel is closed");
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
<none>
FREQUENCY : always
- relates to
-
JDK-8220738 (sc) Move ServerSocketChannelImpl remaining native method to Net
- Resolved