maintainer-feedback requested: [Bug 241317] java/openjdk8: unsatisfied link of getmntonname0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Oct 17 20:45:24 UTC 2019


Bugzilla Automation <bugzilla at FreeBSD.org> has asked freebsd-java mailing list
<java at FreeBSD.org> for maintainer-feedback:
Bug 241317: java/openjdk8: unsatisfied link of getmntonname0
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241317



--- Description ---
Since the latest update of openjdk8 (openjdk8-8.232.09.1) german/mediathekview
broke: clicking on a download button gives no reaction in the GUI and an
exception like this (shortened to the relevant part, because java):

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError:
sun.nio.fs.BsdNativeDispatcher.getmntonname0(J)[B
	at sun.nio.fs.BsdNativeDispatcher.getmntonname0(Native Method)
	at
sun.nio.fs.BsdNativeDispatcher.getmntonname(BsdNativeDispatcher.java:61)
	at sun.nio.fs.BsdFileStore.findMountEntry(BsdFileStore.java:67)
	at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:65)
	at sun.nio.fs.BsdFileStore.<init>(BsdFileStore.java:40)
	at
sun.nio.fs.BsdFileSystemProvider.getFileStore(BsdFileSystemProvider.java:55)
	at
sun.nio.fs.BsdFileSystemProvider.getFileStore(BsdFileSystemProvider.java:39)
	at
sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:368)
	at java.nio.file.Files.getFileStore(Files.java:1461)
	at
mediathek.gui.dialog.DialogAddDownload.getFreeDiskSpace(DialogAddDownload.java:
268)

Poking around jdk/src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java it
appears that indeed getmntonname0() is declared "native", but there are no
provisions to load a suitable library for that method. The other
NativeDispatchers call System.loadLibrary("nio"), which would make a lot of
sense here, too - a "NativeDispatcher" should at least have some access to the
library it is dispatching to.

Attached is a patch (to be dropped into files/) which implements the same
System.loadLibrary() logic with it's wrappers in BsdNativeDispatcher.java. This
still passes poudriere and fixes mediathekview for me. I've not reported this
upstream, as I'm not even sure which upstream to report to (and I'd dread to go
through the submit-a-trivial-patch dance with the-company-which-swallowed-Sun).

I'm debugging a JDK - what am I doing with my live?


More information about the freebsd-java mailing list