rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??
Daniel Fuchs
daniel.fuchs at oracle.com
Thu Feb 16 16:02:15 UTC 2017
On 16/02/17 15:22, Langer, Christoph wrote:
> Hi Daniel,
>
> thanks for your hints - I should probably have seen that myself if I would have had a more thorough look...
>
> I'm cc-ing nio-dev, maybe somebody has an idea. I probably won't be able to analyze this short term.
No problem. Do you know when that started showing up?
best regards,
-- daniel
>
> Best regards
> Christoph
>
>> -----Original Message-----
>> From: Daniel Fuchs [mailto:daniel.fuchs at oracle.com]
>> Sent: Donnerstag, 16. Februar 2017 15:53
>> To: Langer, Christoph <christoph.langer at sap.com>
>> Cc: Zeller, Arno <arno.zeller at sap.com>; Baesken, Matthias
>> <matthias.baesken at sap.com>; core-libs-dev at openjdk.java.net
>> Subject: Re: rmid on Unix fails with Exception - maybe aftermath of JDK-
>> 8173607 ??
>>
>> Hi Christoph,
>>
>> It looks like one of the dreaded class initialization cycle
>> issues.
>>
>> If you look at the stack trace, you will see that
>> UnixNativeDispatcher.<clinit>:609
>> calls System.loadLibrary at line 611
>> which later down the road calls the
>> native UnixNativeDispatcher.getcwd command
>> from sun.nio.fs.UnixFileSystem.<init>
>>
>> But at this point UnixNativeDispatcher has not
>> finished initializing: we're still trying to load
>> the nio lib...
>>
>> I don't think this has anything to do with JDK-8173607.
>> JDK-8173607 just splitted the JMX RMI Connector out of
>> java.management - and rmid has nothing to do with JMX.
>>
>> rmid doesn't depend on either java.management or
>> java.management.rmi, and I don't see anything
>> on the exception path that would involve either
>> of these modules.
>> So I suspect the culprit is probably elsewhere.
>>
>> best regards,
>>
>> -- daniel
>>
>>
>>
>> On 16/02/17 13:53, Langer, Christoph wrote:
>>> Hi Daniel,
>>>
>>>
>>>
>>> when starting "rmid" from current builds on Linux (and probably other
>>> Unix platforms as well) we are currently getting the exception below.
>>>
>>>
>>>
>>> It looks as if on that path libnio was not loaded and hence we're
>>> getting an UnsatisfiedLinkError. In UnixNativeDispatcher.java one can
>>> find a static initialization block which should do that, however, it
>>> needs elevated access. Maybe rmid is missing a permission for that?
>>>
>>>
>>>
>>> Any thoughts?
>>>
>>>
>>>
>>> Thanks & best regards
>>>
>>> Christoph
>>>
>>>
>>>
>>>
>>>
>>> ...>/jdk9-build-dir/images/jdk/bin/rmid
>>>
>>> Exception in thread "main" java.lang.UnsatisfiedLinkError:
>>> sun.nio.fs.UnixNativeDispatcher.getcwd()[B
>>>
>>> at java.base/sun.nio.fs.UnixNativeDispatcher.getcwd(Native Method)
>>>
>>> at
>>> java.base/sun.nio.fs.UnixFileSystem.<init>(UnixFileSystem.java:66)
>>>
>>> at
>>> java.base/sun.nio.fs.LinuxFileSystem.<init>(LinuxFileSystem.java:39)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSyste
>> mProvider.java:46)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSyste
>> mProvider.java:39)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.
>> java:56)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.LinuxFileSystemProvider.<init>(LinuxFileSystemProvide
>> r.java:41)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemPr
>> ovider.java:41)
>>>
>>> at
>>> java.base/java.io.FilePermission.<clinit>(FilePermission.java:206)
>>>
>>> at
>>>
>> java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:899)
>>>
>>> at java.base/java.io.File.exists(File.java:815)
>>>
>>> at java.base/java.lang.ClassLoader$2.run(ClassLoader.java:2513)
>>>
>>> at java.base/java.lang.ClassLoader$2.run(ClassLoader.java:2510)
>>>
>>> at java.base/java.security.AccessController.doPrivileged(Native
>>> Method)
>>>
>>> at
>>> java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2509)
>>>
>>> at
>>> java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2478)
>>>
>>> at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:873)
>>>
>>> at java.base/java.lang.System.loadLibrary(System.java:1818)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.UnixNativeDispatcher$1.run(UnixNativeDispatcher.java
>> :611)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.UnixNativeDispatcher$1.run(UnixNativeDispatcher.java
>> :609)
>>>
>>> at java.base/java.security.AccessController.doPrivileged(Native
>>> Method)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.UnixNativeDispatcher.<clinit>(UnixNativeDispatcher.jav
>> a:609)
>>>
>>> at
>>> java.base/sun.nio.fs.UnixFileSystem.<init>(UnixFileSystem.java:66)
>>>
>>> at
>>> java.base/sun.nio.fs.LinuxFileSystem.<init>(LinuxFileSystem.java:39)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSyste
>> mProvider.java:46)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSyste
>> mProvider.java:39)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.
>> java:56)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.LinuxFileSystemProvider.<init>(LinuxFileSystemProvide
>> r.java:41)
>>>
>>> at
>>>
>> java.base/sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemPr
>> ovider.java:41)
>>>
>>> at java.base/java.nio.file.FileSystems.<clinit>(FileSystems.java:91)
>>>
>>> at java.base/java.nio.file.Paths.get(Paths.java:84)
>>>
>>> at
>>>
>> java.base/jdk.internal.jimage.ImageReaderFactory.<clinit>(ImageReaderFact
>> ory.java:50)
>>>
>>> at java.base/java.security.AccessController.doPrivileged(Native
>>> Method)
>>>
>>> at
>>>
>> java.base/sun.net.www.protocol.jrt.JavaRuntimeURLConnection.<clinit>(Jav
>> aRuntimeURLConnection.java:59)
>>>
>>> at
>>>
>> java.base/sun.net.www.protocol.jrt.Handler.openConnection(Handler.java:
>> 42)
>>>
>>> at java.base/java.net.URL.openConnection(URL.java:1049)
>>>
>>> at
>>>
>> java.base/jdk.internal.module.SystemModuleFinder$ImageModuleReader.c
>> heckPermissionToConnect(SystemModuleFinder.java:287)
>>>
>>> at
>>>
>> java.base/jdk.internal.module.SystemModuleFinder$ImageModuleReader.<
>> init>(SystemModuleFinder.java:296)
>>>
>>> at
>>>
>> java.base/jdk.internal.module.SystemModuleFinder$1.get(SystemModuleFi
>> nder.java:245)
>>>
>>> at
>>>
>> java.base/jdk.internal.module.SystemModuleFinder$1.get(SystemModuleFi
>> nder.java:242)
>>>
>>> at
>>>
>> java.base/jdk.internal.module.ModuleReferenceImpl.open(ModuleReferen
>> ceImpl.java:83)
>>>
>>> at
>>>
>> java.base/jdk.internal.loader.BuiltinClassLoader.createModuleReader(Builtin
>> ClassLoader.java:934)
>>>
>>> at
>>>
>> java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Concu
>> rrentHashMap.java:1719)
>>>
>>> at
>>>
>> java.base/jdk.internal.loader.BuiltinClassLoader.moduleReaderFor(BuiltinCla
>> ssLoader.java:926)
>>>
>>> at
>>>
>> java.base/jdk.internal.loader.BuiltinClassLoader.access$100(BuiltinClassLoad
>> er.java:92)
>>>
>>> at
>>>
>> java.base/jdk.internal.loader.BuiltinClassLoader$1.run(BuiltinClassLoader.jav
>> a:356)
>>>
>>> at
>>>
>> java.base/jdk.internal.loader.BuiltinClassLoader$1.run(BuiltinClassLoader.jav
>> a:351)
>>>
>>> at java.base/java.security.AccessController.doPrivileged(Native
>>> Method)
>>>
>>> at
>>>
>> java.base/jdk.internal.loader.BuiltinClassLoader.findMiscResource(BuiltinCla
>> ssLoader.java:350)
>>>
>>> at
>>>
>> java.base/jdk.internal.loader.BuiltinClassLoader.findResources(BuiltinClassLo
>> ader.java:311)
>>>
>>> at
>>>
>> java.base/jdk.internal.loader.BootLoader.findResources(BootLoader.java:15
>> 6)
>>>
>>> at
>>> java.base/java.lang.ClassLoader.getResources(ClassLoader.java:1430)
>>>
>>> at
>>> java.base/java.lang.ClassLoader.getResources(ClassLoader.java:1428)
>>>
>>> at
>>>
>> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextServi
>> ce(ServiceLoader.java:1082)
>>>
>>> at
>>>
>> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.access$1200(
>> ServiceLoader.java:1004)
>>>
>>> at
>>>
>> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator$1.run(Servic
>> eLoader.java:1131)
>>>
>>> at
>>>
>> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator$1.run(Servic
>> eLoader.java:1130)
>>>
>>> at java.base/java.security.AccessController.doPrivileged(Native
>>> Method)
>>>
>>> at
>>>
>> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(Ser
>> viceLoader.java:1133)
>>>
>>> at
>>> java.base/java.util.ServiceLoader$1.hasNext(ServiceLoader.java:1163)
>>>
>>> at
>>> java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1258)
>>>
>>> at
>>>
>> java.base/java.nio.channels.spi.SelectorProvider.loadProviderAsService(Sele
>> ctorProvider.java:122)
>>>
>>> at
>>>
>> java.base/java.nio.channels.spi.SelectorProvider.access$200(SelectorProvide
>> r.java:69)
>>>
>>> at
>>>
>> java.base/java.nio.channels.spi.SelectorProvider$1.run(SelectorProvider.jav
>> a:180)
>>>
>>> at
>>>
>> java.base/java.nio.channels.spi.SelectorProvider$1.run(SelectorProvider.jav
>> a:176)
>>>
>>> at java.base/java.security.AccessController.doPrivileged(Native
>>> Method)
>>>
>>> at
>>>
>> java.base/java.nio.channels.spi.SelectorProvider.provider(SelectorProvider.j
>> ava:175)
>>>
>>> at java.base/java.lang.System.inheritedChannel(System.java:276)
>>>
>>> at java.rmi/sun.rmi.server.Activation$2.run(Activation.java:1960)
>>>
>>> at java.rmi/sun.rmi.server.Activation$2.run(Activation.java:1958)
>>>
>>> at java.base/java.security.AccessController.doPrivileged(Native
>>> Method)
>>>
>>> at java.rmi/sun.rmi.server.Activation.main(Activation.java:1957)
>>>
>>>
>>>
>
More information about the nio-dev
mailing list