[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593

            Bug ID: 234593
           Summary: java/openjdk8: UnsatisfiedLinkError:
                    sun.nio.ch.FileDispatcherImpl.allocate0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: [hidden email]
          Reporter: [hidden email]
             Flags: maintainer-feedback?([hidden email])
          Assignee: [hidden email]
 Attachment #200740 text/plain
         mime type:

Created attachment 200740
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=200740&action=edit
Test program to reproduce the error

Running the attached test program gives an error:

$ javac Test.java && java Test
Exception in thread "main" java.lang.UnsatisfiedLinkError:
sun.nio.ch.FileDispatcherImpl.allocate0(Ljava/io/FileDescriptor;J)I
        at sun.nio.ch.FileDispatcherImpl.allocate0(Native Method)
        at sun.nio.ch.FileDispatcherImpl.allocate(FileDispatcherImpl.java:84)
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:909)
        at Test.main(Test.java:11)

There is an implementation for allocate0 in
src/solaris/native/sun/nio/ch/FileDispatcherImpl.c. I guess it's only a problem
with the build system.

I'm not 100% sure but I think the program that now throws this error used to
work about a year ago.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

maintainer-feedback requested: [Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
Bugzilla Automation <[hidden email]> has asked freebsd-java mailing list
<[hidden email]> for maintainer-feedback:
Bug 234593: java/openjdk8: UnsatisfiedLinkError:
sun.nio.ch.FileDispatcherImpl.allocate0
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593



--- Description ---
Running the attached test program gives an error:

$ javac Test.java && java Test
Exception in thread "main" java.lang.UnsatisfiedLinkError:
sun.nio.ch.FileDispatcherImpl.allocate0(Ljava/io/FileDescriptor;J)I
        at sun.nio.ch.FileDispatcherImpl.allocate0(Native Method)
        at sun.nio.ch.FileDispatcherImpl.allocate(FileDispatcherImpl.java:84)
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:909)
        at Test.main(Test.java:11)

There is an implementation for allocate0 in
src/solaris/native/sun/nio/ch/FileDispatcherImpl.c. I guess it's only a problem
with the build system.

I'm not 100% sure but I think the program that now throws this error used to
work about a year ago.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593

--- Comment #1 from Stefan Ehmann <[hidden email]> ---
Seems to be a regression in 8u192. openjdk8-8.181.13_1 works fine.

A short note on the test program:
Make sure that the file "foo" does not exist before running the test.

If you test with 8u181 it creates the file with 1 byte. Afterwards, the error
will not occur with 8u192 because the affected code path is only entered if the
file needs to be expanded.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593

Jung-uk Kim <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #2 from Jung-uk Kim <[hidden email]> ---
Created attachment 200746
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=200746&action=edit
A quick fix to fix the runtime error

It looks like the following commit was not correctly merged, i.e.,
jdk/make/mapfiles/libnio/mapfile-bsd:

http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/f64826e5b775

The easiest fix is using the attached patch.  However, the above commit was
reverted later:

https://bugs.openjdk.java.net/browse/JDK-8202261

and fixed differently.

http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/a2361ab40be8

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593

--- Comment #3 from Jung-uk Kim <[hidden email]> ---
(In reply to Jung-uk Kim from comment #2)
I forgot to mention the attached patch replaces
java/openjdk8/files/patch-jdk-make-mapfiles-libnio-mapfile-bsd.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593

--- Comment #4 from Stefan Ehmann <[hidden email]> ---
(In reply to Jung-uk Kim from comment #2)
Can confirm that there is no UnsatisfiedLinkError after applying the patch.
Thanks for the quick reply.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593

--- Comment #5 from Jung-uk Kim <[hidden email]> ---
(In reply to Stefan Ehmann from comment #4)
Yes, the patch fixes the test program.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593

--- Comment #6 from [hidden email] ---
A commit references this bug:

Author: jkim
Date: Fri Jan 18 00:47:16 UTC 2019
New revision: 490617
URL: https://svnweb.freebsd.org/changeset/ports/490617

Log:
  Add a missing symbol in the linker map file.

  PR:           234593

Changes:
  head/java/openjdk8/Makefile
  head/java/openjdk8/files/patch-jdk-make-mapfiles-libnio-mapfile-bsd

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 234593] java/openjdk8: UnsatisfiedLinkError: sun.nio.ch.FileDispatcherImpl.allocate0

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234593

Jung-uk Kim <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Closed
         Resolution|---                         |FIXED

--- Comment #7 from Jung-uk Kim <[hidden email]> ---
I just went ahead and committed the patch.  Thanks!

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"