[ https://issues.apache.org/jira/browse/CASSANDRA-18848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765293#comment-17765293 ]
Ekaterina Dimitrova commented on CASSANDRA-18848: ------------------------------------------------- Committed to https://github.com/apache/cassandra.git 6708499e4c..2b23fc58aa cassandra-5.0 -> cassandra-5.0 830f88d4ab..89065ffa21 trunk -> trunk > GCInspector "Error accessing field of java.nio.Bits" under java17 > ----------------------------------------------------------------- > > Key: CASSANDRA-18848 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18848 > Project: Cassandra > Issue Type: Bug > Components: Observability/Metrics > Reporter: Ekaterina Dimitrova > Assignee: Ekaterina Dimitrova > Priority: Low > Fix For: 5.0.x, 5.x > > > Running under java17, {{GCInspector}} throws the following exception: > {noformat} > DEBUG [main] 2023-09-13 09:35:28,031 GCInspector.java:85 - Error accessing > field of java.nio.Bits > java.lang.reflect.InaccessibleObjectException: Unable to make field private > static final java.util.concurrent.atomic.AtomicLong > java.nio.Bits.TOTAL_CAPACITY accessible: module java.base does not "opens > java.nio" to unnamed module @503d687a > at > java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) > at > java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) > at > java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) > at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) > at > org.apache.cassandra.service.GCInspector.<clinit>(GCInspector.java:80) > at > org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:328) > at > org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:729) > at > org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:853) > INFO [main] 2023-09-13 09:35:28,039 PaxosUncommittedTracker.java:236 - > enabling PaxosUncommittedTracker {noformat} > This is because {{GCInspector}} uses reflection to read the > {{TOTAL_CAPACITY}} from {{{}java.nio.Bits{}}}. Access was restricted > somewhere between 11 and 17. > Note: this is a rather harmless error, as we only look at > {{Bits.totalCapacity}} for metrics collection on how much direct memory is > being used by \{{ByteBuffer}}s. If we fail to read the field, we simply > return -1 for the metric value. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org