Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232097

(sctp) SctpNet.init() results in java.lang.UnsatisfiedLinkError

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2
    • Resolution: Unresolved
    • Affects Version/s: 13
    • Fix Version/s: 14
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      13
    • CPU:
      x86_64
    • OS:
      linux

      Description

      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


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: