[ 
https://issues.apache.org/jira/browse/CASSANDRA-18848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765296#comment-17765296
 ] 

Ekaterina Dimitrova commented on CASSANDRA-18848:
-------------------------------------------------

[~smiklosovic], I have to apologize to you! There is a typo in your name in the 
commit message, and I did not notice it before committing it. "I" and "o" are 
next to each other on the keyboard... 

I will be more careful in the future!

> 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-alpha2, 5.1
>
>
> 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

Reply via email to