rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

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

rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Langer, Christoph
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(LinuxFileSystemProvider.java:46)
        at java.base/sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39)
        at java.base/sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
        at java.base/sun.nio.fs.LinuxFileSystemProvider.<init>(LinuxFileSystemProvider.java:41)
        at java.base/sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.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.java: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(LinuxFileSystemProvider.java:46)
        at java.base/sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39)
        at java.base/sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
        at java.base/sun.nio.fs.LinuxFileSystemProvider.<init>(LinuxFileSystemProvider.java:41)
        at java.base/sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.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>(ImageReaderFactory.java:50)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/sun.net.www.protocol.jrt.JavaRuntimeURLConnection.<clinit>(JavaRuntimeURLConnection.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.checkPermissionToConnect(SystemModuleFinder.java:287)
        at java.base/jdk.internal.module.SystemModuleFinder$ImageModuleReader.<init>(SystemModuleFinder.java:296)
        at java.base/jdk.internal.module.SystemModuleFinder$1.get(SystemModuleFinder.java:245)
        at java.base/jdk.internal.module.SystemModuleFinder$1.get(SystemModuleFinder.java:242)
        at java.base/jdk.internal.module.ModuleReferenceImpl.open(ModuleReferenceImpl.java:83)
        at java.base/jdk.internal.loader.BuiltinClassLoader.createModuleReader(BuiltinClassLoader.java:934)
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1719)
        at java.base/jdk.internal.loader.BuiltinClassLoader.moduleReaderFor(BuiltinClassLoader.java:926)
        at java.base/jdk.internal.loader.BuiltinClassLoader.access$100(BuiltinClassLoader.java:92)
        at java.base/jdk.internal.loader.BuiltinClassLoader$1.run(BuiltinClassLoader.java:356)
        at java.base/jdk.internal.loader.BuiltinClassLoader$1.run(BuiltinClassLoader.java:351)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findMiscResource(BuiltinClassLoader.java:350)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findResources(BuiltinClassLoader.java:311)
        at java.base/jdk.internal.loader.BootLoader.findResources(BootLoader.java:156)
        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.hasNextService(ServiceLoader.java:1082)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.access$1200(ServiceLoader.java:1004)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator$1.run(ServiceLoader.java:1131)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator$1.run(ServiceLoader.java:1130)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.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(SelectorProvider.java:122)
        at java.base/java.nio.channels.spi.SelectorProvider.access$200(SelectorProvider.java:69)
        at java.base/java.nio.channels.spi.SelectorProvider$1.run(SelectorProvider.java:180)
        at java.base/java.nio.channels.spi.SelectorProvider$1.run(SelectorProvider.java:176)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.nio.channels.spi.SelectorProvider.provider(SelectorProvider.java: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)

Reply | Threaded
Open this post in threaded view
|

Re: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Daniel Fuchs
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(LinuxFileSystemProvider.java:46)
>
>         at
> java.base/sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39)
>
>         at
> java.base/sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
>
>         at
> java.base/sun.nio.fs.LinuxFileSystemProvider.<init>(LinuxFileSystemProvider.java:41)
>
>         at
> java.base/sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.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.java: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(LinuxFileSystemProvider.java:46)
>
>         at
> java.base/sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39)
>
>         at
> java.base/sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
>
>         at
> java.base/sun.nio.fs.LinuxFileSystemProvider.<init>(LinuxFileSystemProvider.java:41)
>
>         at
> java.base/sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.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>(ImageReaderFactory.java:50)
>
>         at java.base/java.security.AccessController.doPrivileged(Native
> Method)
>
>         at
> java.base/sun.net.www.protocol.jrt.JavaRuntimeURLConnection.<clinit>(JavaRuntimeURLConnection.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.checkPermissionToConnect(SystemModuleFinder.java:287)
>
>         at
> java.base/jdk.internal.module.SystemModuleFinder$ImageModuleReader.<init>(SystemModuleFinder.java:296)
>
>         at
> java.base/jdk.internal.module.SystemModuleFinder$1.get(SystemModuleFinder.java:245)
>
>         at
> java.base/jdk.internal.module.SystemModuleFinder$1.get(SystemModuleFinder.java:242)
>
>         at
> java.base/jdk.internal.module.ModuleReferenceImpl.open(ModuleReferenceImpl.java:83)
>
>         at
> java.base/jdk.internal.loader.BuiltinClassLoader.createModuleReader(BuiltinClassLoader.java:934)
>
>         at
> java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1719)
>
>         at
> java.base/jdk.internal.loader.BuiltinClassLoader.moduleReaderFor(BuiltinClassLoader.java:926)
>
>         at
> java.base/jdk.internal.loader.BuiltinClassLoader.access$100(BuiltinClassLoader.java:92)
>
>         at
> java.base/jdk.internal.loader.BuiltinClassLoader$1.run(BuiltinClassLoader.java:356)
>
>         at
> java.base/jdk.internal.loader.BuiltinClassLoader$1.run(BuiltinClassLoader.java:351)
>
>         at java.base/java.security.AccessController.doPrivileged(Native
> Method)
>
>         at
> java.base/jdk.internal.loader.BuiltinClassLoader.findMiscResource(BuiltinClassLoader.java:350)
>
>         at
> java.base/jdk.internal.loader.BuiltinClassLoader.findResources(BuiltinClassLoader.java:311)
>
>         at
> java.base/jdk.internal.loader.BootLoader.findResources(BootLoader.java:156)
>
>         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.hasNextService(ServiceLoader.java:1082)
>
>         at
> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.access$1200(ServiceLoader.java:1004)
>
>         at
> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator$1.run(ServiceLoader.java:1131)
>
>         at
> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator$1.run(ServiceLoader.java:1130)
>
>         at java.base/java.security.AccessController.doPrivileged(Native
> Method)
>
>         at
> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.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(SelectorProvider.java:122)
>
>         at
> java.base/java.nio.channels.spi.SelectorProvider.access$200(SelectorProvider.java:69)
>
>         at
> java.base/java.nio.channels.spi.SelectorProvider$1.run(SelectorProvider.java:180)
>
>         at
> java.base/java.nio.channels.spi.SelectorProvider$1.run(SelectorProvider.java:176)
>
>         at java.base/java.security.AccessController.doPrivileged(Native
> Method)
>
>         at
> java.base/java.nio.channels.spi.SelectorProvider.provider(SelectorProvider.java: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)
>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Langer, Christoph
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.

Best regards
Christoph

> -----Original Message-----
> From: Daniel Fuchs [mailto:[hidden email]]
> Sent: Donnerstag, 16. Februar 2017 15:53
> To: Langer, Christoph <[hidden email]>
> Cc: Zeller, Arno <[hidden email]>; Baesken, Matthias
> <[hidden email]>; [hidden email]
> 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)
> >
> >
> >

Reply | Threaded
Open this post in threaded view
|

Re: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Alan Bateman
In reply to this post by Daniel Fuchs
On 16/02/2017 14:52, Daniel Fuchs wrote:

> :
>
> 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.
Right, this is nothing to do with the JMX changes. I think this is
tickled by the recent change from Claes to create the image reader
lazily. I guess the rmid tests might be disabled because it would have
otherwise been seen before now.

-Alan
Reply | Threaded
Open this post in threaded view
|

Re: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Daniel Fuchs
In reply to this post by Langer, Christoph
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:[hidden email]]
>> Sent: Donnerstag, 16. Februar 2017 15:53
>> To: Langer, Christoph <[hidden email]>
>> Cc: Zeller, Arno <[hidden email]>; Baesken, Matthias
>> <[hidden email]>; [hidden email]
>> 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)
>>>
>>>
>>>
>

Reply | Threaded
Open this post in threaded view
|

RE: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Langer, Christoph
The colleagues tell me that it was about two weeks ago. But I guess it's rather a felt experience than a concrete date ;-)

> -----Original Message-----
> From: Daniel Fuchs [mailto:[hidden email]]
> Sent: Donnerstag, 16. Februar 2017 17:02
> To: Langer, Christoph <[hidden email]>; nio-
> [hidden email]
> Cc: Zeller, Arno <[hidden email]>; Baesken, Matthias
> <[hidden email]>; [hidden email]
> Subject: Re: rmid on Unix fails with Exception - maybe aftermath of JDK-
> 8173607 ??
>
> 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:[hidden email]]
> >> Sent: Donnerstag, 16. Februar 2017 15:53
> >> To: Langer, Christoph <[hidden email]>
> >> Cc: Zeller, Arno <[hidden email]>; Baesken, Matthias
> >> <[hidden email]>; [hidden email]
> >> 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)
> >>>
> >>>
> >>>
> >

Reply | Threaded
Open this post in threaded view
|

Re: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Claes Redestad
In reply to this post by Alan Bateman
Yes, verified that reverting to eager initialization of the system image
reader avoids this issue. I guess we need to back this optimization out
and see if we can improve things in the future:

diff -r 32cb9898b630
src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
---
a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
Thu Feb 16 17:05:48 2017 +0100
+++
b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
Thu Feb 16 17:08:12 2017 +0100
@@ -115,12 +115,7 @@
          long t0 = System.nanoTime();

          // system modules (may be patched)
-        ModuleFinder systemModules;
-        if (SystemModules.MODULE_NAMES.length > 0) {
-            systemModules = SystemModuleFinder.getInstance();
-        } else {
-            systemModules = ModuleFinder.ofSystem();
-        }
+        ModuleFinder systemModules = ModuleFinder.ofSystem();

          PerfCounters.systemModulesTime.addElapsedTimeFrom(t0);



/Claes

On 02/16/2017 05:01 PM, Alan Bateman wrote:

> On 16/02/2017 14:52, Daniel Fuchs wrote:
>
>> :
>>
>> 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.
> Right, this is nothing to do with the JMX changes. I think this is
> tickled by the recent change from Claes to create the image reader
> lazily. I guess the rmid tests might be disabled because it would have
> otherwise been seen before now.
>
> -Alan

Reply | Threaded
Open this post in threaded view
|

RE: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Baesken, Matthias
In reply to this post by Langer, Christoph
It started showing up  ~ 5 / 6 th  February  (talking about  openjdk 9  dev ).

Regards, Matthias


> -----Original Message-----
> From: Langer, Christoph
> Sent: Donnerstag, 16. Februar 2017 17:04
> To: Daniel Fuchs <[hidden email]>; [hidden email]
> Cc: Zeller, Arno <[hidden email]>; Baesken, Matthias
> <[hidden email]>; [hidden email]
> Subject: RE: rmid on Unix fails with Exception - maybe aftermath of JDK-
> 8173607 ??
>
> The colleagues tell me that it was about two weeks ago. But I guess it's rather
> a felt experience than a concrete date ;-)
>
> > -----Original Message-----
> > From: Daniel Fuchs [mailto:[hidden email]]
> > Sent: Donnerstag, 16. Februar 2017 17:02
> > To: Langer, Christoph <[hidden email]>; nio-
> > [hidden email]
> > Cc: Zeller, Arno <[hidden email]>; Baesken, Matthias
> > <[hidden email]>; [hidden email]
> > Subject: Re: rmid on Unix fails with Exception - maybe aftermath of JDK-
> > 8173607 ??
> >
> > 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:[hidden email]]
> > >> Sent: Donnerstag, 16. Februar 2017 15:53
> > >> To: Langer, Christoph <[hidden email]>
> > >> Cc: Zeller, Arno <[hidden email]>; Baesken, Matthias
> > >> <[hidden email]>; [hidden email]
> > >> 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)
> > >>>
> > >>>
> > >>>
> > >

Reply | Threaded
Open this post in threaded view
|

Re: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Alan Bateman
In reply to this post by Claes Redestad
Make sense for now, you can also change System.initPhase3 is not trigger
eager initialization. I guess the rmid tests must be disabled as
otherwise this would have been noticed, it's the odd man because it sets
the security manager in its main method rather than on the command line.

-Alan

On 16/02/2017 16:11, Claes Redestad wrote:

> Yes, verified that reverting to eager initialization of the system
> image reader avoids this issue. I guess we need to back this
> optimization out and see if we can improve things in the future:
>
> diff -r 32cb9898b630
> src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
> ---
> a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
> Thu Feb 16 17:05:48 2017 +0100
> +++
> b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
> Thu Feb 16 17:08:12 2017 +0100
> @@ -115,12 +115,7 @@
>          long t0 = System.nanoTime();
>
>          // system modules (may be patched)
> -        ModuleFinder systemModules;
> -        if (SystemModules.MODULE_NAMES.length > 0) {
> -            systemModules = SystemModuleFinder.getInstance();
> -        } else {
> -            systemModules = ModuleFinder.ofSystem();
> -        }
> +        ModuleFinder systemModules = ModuleFinder.ofSystem();
>
>          PerfCounters.systemModulesTime.addElapsedTimeFrom(t0);

Reply | Threaded
Open this post in threaded view
|

Re: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Claes Redestad
Done, filed https://bugs.openjdk.java.net/browse/JDK-8175079 and pushed
a fix which also cleans up the hack in System.initPhase3.

/Claes

On 02/16/2017 05:17 PM, Alan Bateman wrote:

> Make sense for now, you can also change System.initPhase3 is not
> trigger eager initialization. I guess the rmid tests must be disabled
> as otherwise this would have been noticed, it's the odd man because it
> sets the security manager in its main method rather than on the
> command line.
>
> -Alan
>
> On 16/02/2017 16:11, Claes Redestad wrote:
>> Yes, verified that reverting to eager initialization of the system
>> image reader avoids this issue. I guess we need to back this
>> optimization out and see if we can improve things in the future:
>>
>> diff -r 32cb9898b630
>> src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
>> ---
>> a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
>> Thu Feb 16 17:05:48 2017 +0100
>> +++
>> b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
>> Thu Feb 16 17:08:12 2017 +0100
>> @@ -115,12 +115,7 @@
>>          long t0 = System.nanoTime();
>>
>>          // system modules (may be patched)
>> -        ModuleFinder systemModules;
>> -        if (SystemModules.MODULE_NAMES.length > 0) {
>> -            systemModules = SystemModuleFinder.getInstance();
>> -        } else {
>> -            systemModules = ModuleFinder.ofSystem();
>> -        }
>> +        ModuleFinder systemModules = ModuleFinder.ofSystem();
>>
>>          PerfCounters.systemModulesTime.addElapsedTimeFrom(t0);
>

Reply | Threaded
Open this post in threaded view
|

RE: rmid on Unix fails with Exception - maybe aftermath of JDK-8173607 ??

Langer, Christoph
Hi,

great, it works, our rmid issue is gone.

Thanks Claes for the fix and all for the quick help/resolution.

Best regards
Christoph

> -----Original Message-----
> From: Claes Redestad [mailto:[hidden email]]
> Sent: Donnerstag, 16. Februar 2017 17:32
> To: Alan Bateman <[hidden email]>; Daniel Fuchs
> <[hidden email]>; Langer, Christoph <[hidden email]>
> Cc: [hidden email]; Zeller, Arno <[hidden email]>;
> Baesken, Matthias <[hidden email]>
> Subject: Re: rmid on Unix fails with Exception - maybe aftermath of JDK-
> 8173607 ??
>
> Done, filed https://bugs.openjdk.java.net/browse/JDK-8175079 and pushed
> a fix which also cleans up the hack in System.initPhase3.
>
> /Claes
>
> On 02/16/2017 05:17 PM, Alan Bateman wrote:
> > Make sense for now, you can also change System.initPhase3 is not
> > trigger eager initialization. I guess the rmid tests must be disabled
> > as otherwise this would have been noticed, it's the odd man because it
> > sets the security manager in its main method rather than on the
> > command line.
> >
> > -Alan
> >
> > On 16/02/2017 16:11, Claes Redestad wrote:
> >> Yes, verified that reverting to eager initialization of the system
> >> image reader avoids this issue. I guess we need to back this
> >> optimization out and see if we can improve things in the future:
> >>
> >> diff -r 32cb9898b630
> >> src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
> >> ---
> >>
> a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
> >> Thu Feb 16 17:05:48 2017 +0100
> >> +++
> >>
> b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
> >> Thu Feb 16 17:08:12 2017 +0100
> >> @@ -115,12 +115,7 @@
> >>          long t0 = System.nanoTime();
> >>
> >>          // system modules (may be patched)
> >> -        ModuleFinder systemModules;
> >> -        if (SystemModules.MODULE_NAMES.length > 0) {
> >> -            systemModules = SystemModuleFinder.getInstance();
> >> -        } else {
> >> -            systemModules = ModuleFinder.ofSystem();
> >> -        }
> >> +        ModuleFinder systemModules = ModuleFinder.ofSystem();
> >>
> >>          PerfCounters.systemModulesTime.addElapsedTimeFrom(t0);
> >