[jira] [Commented] (CASSANDRA-18848) GCInspector "Error accessing field of java.nio.Bits" under java17

2023-09-14 Thread Ekaterina Dimitrova (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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.(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



[jira] [Commented] (CASSANDRA-18848) GCInspector "Error accessing field of java.nio.Bits" under java17

2023-09-14 Thread Ekaterina Dimitrova (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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.(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



[jira] [Commented] (CASSANDRA-18848) GCInspector "Error accessing field of java.nio.Bits" under java17

2023-09-14 Thread Ekaterina Dimitrova (Jira)


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

Ekaterina Dimitrova commented on CASSANDRA-18848:
-

The JDK11 jobs were completed successfully. Starting commit soon 

> 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.(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



[jira] [Commented] (CASSANDRA-18848) GCInspector "Error accessing field of java.nio.Bits" under java17

2023-09-14 Thread Ekaterina Dimitrova (Jira)


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

Ekaterina Dimitrova commented on CASSANDRA-18848:
-

Thank you both for the reviews!
{quote}Make sure to test on ci-cassandra.a.o , just the artifacts job as it 
does the deb/rpm packaging.
{quote}
Pushed the artifacts dev job here - 
[https://ci-cassandra.apache.org/job/Cassandra-devbranch-artifacts/2632/]

JDK 8 expected to fail, JDK11 is still running

> 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.(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



[jira] [Commented] (CASSANDRA-18848) GCInspector "Error accessing field of java.nio.Bits" under java17

2023-09-14 Thread Michael Semb Wever (Jira)


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

Michael Semb Wever commented on CASSANDRA-18848:


Nice work, +1

> 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.(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



[jira] [Commented] (CASSANDRA-18848) GCInspector "Error accessing field of java.nio.Bits" under java17

2023-09-13 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18848:
---

I verified that it does not throw that exception anymore on Java 17 so I am +1 
in that regard. TOTAL_CAPACITY change makes sense to me as well.

> 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.(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



[jira] [Commented] (CASSANDRA-18848) GCInspector "Error accessing field of java.nio.Bits" under java17

2023-09-13 Thread Ekaterina Dimitrova (Jira)


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

Ekaterina Dimitrova commented on CASSANDRA-18848:
-

5.0 Patch PR: https://github.com/apache/cassandra/pull/2683

5.0 JDK17 green CI run: 
https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/2512/workflows/450638d5-873e-4257-824b-0db189236615

Also, tested locally and verified the debug log, no more exceptions are thrown. 
I believe we can safely propagate the patch to trunk and do only local check, 
saving on resources for full CI run.

I also used the opportunity to clean a few lines of dead code JDK8 related. 
TOTAL_CAPACITY had a different name in JDK8 so we were checking for that one in 
case we are on JDK8, but we dropped it already for 5.0+.

[~mck] , do. you mind to review this one? Seems like you worked on 
TOTAL_CAPACITY issue when we were upgrading to JDK11. 

 

> 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.(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