John,

Is this with the current develop branch of Geode or a previous release. Develop 
does not use reflections anymore in the BufferPool. If there is a specific 
version you are locked into we could look at backporting this to a patch 
release.

See https://github.com/apache/geode/pull/6207

-Jake


On May 5, 2021, at 9:19 AM, John Blum 
<jb...@vmware.com<mailto:jb...@vmware.com>> wrote:

Hi Dan-

Thanks for the tip.  I can certainly give that a try and see what results I get.

It is quite possibly a problem for non-internal JDK, or even non-JDK 
[protected] classes as well.

I ran into a similar problems inside of SDG itself, which turned out to be an 
old Java bug, which did not occur in Java 15, 14 or even 11 that we have tested 
on, but resurfaced in 16.

FYR: 
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8227415<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.java.com%2Fbugdatabase%2Fview_bug.do%3Fbug_id%3D8227415&data=04%7C01%7Cjabarrett%40vmware.com%7C938f29460c3243d18be508d90fe1956d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637558283827165906%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dRsjzg58u2Osou%2BPmBQfNd%2B4J1UwyJ3%2BqfXH6kKU6k4%3D&reserved=0>

Essentially, SDG failed due to:

Caused by: java.lang.IllegalAccessError: class 
org.springframework.data.gemfire.config.annotation.AbstractCacheConfiguration$$Lambda$634/0x0000000800f1fa50
 tried to access protected method 'boolean 
org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport.hasValue(java.lang.Number)

And...

(org.springframework.data.gemfire.config.annotation.AbstractCacheConfiguration$$Lambda$634/0x0000000800f1fa50
 and 
org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
 are in unnamed module of loader 'app')

SDG's o.s.d.g.config.annotation.AbstractCacheConfiguration class extends the 
o.s.d.g.config.annotation.support.AbstractAnnotationConfigSupport class.  These 
classes are in a SDG named module.  So, I am not sure I agree with Java, or at 
least fully understand in this case, but it seems Java 16 may have added 
additional restrictions.

Anyway, I not trying to say SDG is not in error  or that Java is necessarily 
wrong, but there is a definitively a difference between Java 15 and 16 and that 
this problem seems to stretch beyond Java (internal) types, FYI.

Regards,
John


________________________________
From: Dan Smith <dasm...@vmware.com<mailto:dasm...@vmware.com>>
Sent: Wednesday, May 5, 2021 9:05 AM
To: user@geode.apache.org<mailto:user@geode.apache.org> 
<user@geode.apache.org<mailto:user@geode.apache.org>>
Subject: Re: JDK 16 Support?

You might be able to work around this for the moment using something like 
--add-opens java.base/java.nio=ALL-UNNAMED when you start the JVM.

I do agree we should not be using these internal JDK classes for our buffer 
pool. Maybe someone who knows more about that code can share why we are doing 
this.

-Dan
________________________________
From: John Blum <jb...@vmware.com<mailto:jb...@vmware.com>>
Sent: Wednesday, May 5, 2021 7:57 AM
To: geode <d...@geode.apache.org<mailto:d...@geode.apache.org>>; 
user@geode.apache.org<mailto:user@geode.apache.org> 
<user@geode.apache.org<mailto:user@geode.apache.org>>
Subject: JDK 16 Support?

What is the plan to support Java 16 for Apache Geode?  Timeframe?

Running Apache Geode on a Java 16 Runtime produces errors like the following:


- org.apache.geode.InternalGemFireException: unable to retrieve underlying byte 
buffer
-  at 
org.apache.geode.internal.net.BufferPool.getPoolableBuffer(BufferPool.java:346)
-  at 
org.apache.geode.internal.net.BufferPool.releaseBuffer(BufferPool.java:310)
-  at 
org.apache.geode.internal.net.BufferPool.releaseSenderBuffer(BufferPool.java:213)
-  at org.apache.geode.internal.tcp.MsgStreamer.release(MsgStreamer.java:100)
-  at 
org.apache.geode.internal.tcp.MsgStreamer.writeMessage(MsgStreamer.java:256)
-  at 
org.apache.geode.distributed.internal.direct.DirectChannel.sendToMany(DirectChannel.java:306)
-  at 
org.apache.geode.distributed.internal.direct.DirectChannel.sendToOne(DirectChannel.java:182)
-  at 
org.apache.geode.distributed.internal.direct.DirectChannel.send(DirectChannel.java:511)
-  at 
org.apache.geode.distributed.internal.DistributionImpl.directChannelSend(DistributionImpl.java:346)
-  at 
org.apache.geode.distributed.internal.DistributionImpl.send(DistributionImpl.java:291)
-  at 
org.apache.geode.distributed.internal.ClusterDistributionManager.sendViaMembershipManager(ClusterDistributionManager.java:2050)
-  at 
org.apache.geode.distributed.internal.ClusterDistributionManager.sendOutgoing(ClusterDistributionManager.java:1978)
-  at 
org.apache.geode.distributed.internal.ClusterDistributionManager.sendMessage(ClusterDistributionManager.java:2015)
-  at 
org.apache.geode.distributed.internal.ClusterDistributionManager.putOutgoing(ClusterDistributionManager.java:1083)
-  at 
org.apache.geode.distributed.internal.StartupMessage.process(StartupMessage.java:279)
-  at 
org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:376)
-  at 
org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:441)
-  at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
-  at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
-  at 
org.apache.geode.distributed.internal.ClusterOperationExecutors.runUntilShutdown(ClusterOperationExecutors.java:441)
-  at 
org.apache.geode.distributed.internal.ClusterOperationExecutors.doWaitingThread(ClusterOperationExecutors.java:410)
-  at 
org.apache.geode.logging.internal.executors.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:119)
-  at java.base/java.lang.Thread.run(Thread.java:831)
- Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make 
public java.lang.Object java.nio.DirectByteBuffer.attachment() accessible: 
module java.base does not "opens java.nio" to unnamed module @40f9161a
-  at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
-  at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
-  at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
-  at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
-  at 
org.apache.geode.internal.net.BufferPool.getPoolableBuffer(BufferPool.java:343)
-  ... 22 common frames omitted
- 2021-04-30 14:57:13,638  INFO ributed.internal.membership.gms.Services: 606 - 
received leave request from 
10.99.199.28(CacheNotUsingSharedConfigurationIntegrationTest:29149)<v1>:41001 
for 
10.99.199.28(CacheNotUsingSharedConfigurationIntegrationTest:29149)<v1>:41001
- 2021-04-30 14:57:13,640  INFO ributed.internal.membership.gms.Services: 617 - 
JoinLeave.processMessage(LeaveRequestMessage) invoked.  isCoordinator=true; 
isStopping=false; cancelInProgress=false
- 2021-04-30 14:57:13,647 ERROR xecutors.LoggingUncaughtExceptionHandler:  92 - 
Uncaught exception in thread Thread[P2P message reader for 
10.99.199.28(CacheNotUsingSharedConfigurationIntegrationTest:29149)<v1>:41001 
shared unordered uid=1 local port=53039 remote port=64063,10,main]
- org.apache.geode.InternalGemFireException: unable to retrieve underlying byte 
buffer
-  at 
org.apache.geode.internal.net.BufferPool.getPoolableBuffer(BufferPool.java:346)
-  at 
org.apache.geode.internal.net.BufferPool.releaseBuffer(BufferPool.java:310)
-  at 
org.apache.geode.internal.net.BufferPool.releaseReceiveBuffer(BufferPool.java:217)
-  at 
org.apache.geode.internal.tcp.Connection.releaseInputBuffer(Connection.java:1512)
-  at org.apache.geode.internal.tcp.Connection.run(Connection.java:1495)
-  at java.base/java.lang.Thread.run(Thread.java:831)
- Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make 
public java.lang.Object java.nio.DirectByteBuffer.attachment() accessible: 
module java.base does not "opens java.nio" to unnamed module @40f9161a
-  at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
-  at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
-  at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
-  at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
-  at 
org.apache.geode.internal.net.BufferPool.getPoolableBuffer(BufferPool.java:343)
-  ... 5 common frames omitted
- 2021-04-30 14:57:13,651 ERROR xecutors.LoggingUncaughtExceptionHandler:  92 - 
Uncaught exception in thread Thread[P2P handshake reader@53e57a03-1,5,main]
- org.apache.geode.InternalGemFireException: unable to retrieve underlying byte 
buffer
-  at 
org.apache.geode.internal.net.BufferPool.getPoolableBuffer(BufferPool.java:346)
-  at 
org.apache.geode.internal.net.BufferPool.releaseBuffer(BufferPool.java:310)
-  at 
org.apache.geode.internal.net.BufferPool.releaseReceiveBuffer(BufferPool.java:217)
-  at 
org.apache.geode.internal.tcp.Connection.releaseInputBuffer(Connection.java:1512)
-  at org.apache.geode.internal.tcp.Connection.run(Connection.java:1495)
-  at java.base/java.lang.Thread.run(Thread.java:831)
- Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make 
public java.lang.Object java.nio.DirectByteBuffer.attachment() accessible: 
module java.base does not "opens java.nio" to unnamed module @40f9161a
-  at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
-  at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
-  at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
-  at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
-  at 
org.apache.geode.internal.net.BufferPool.getPoolableBuffer(BufferPool.java:343)
-  ... 5 common frames omitted

Regards,

-John

Reply via email to