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

Stefan Miklosovic commented on CASSANDRA-19780:
-----------------------------------------------

[CASSANDRA-19780 
5.0|https://github.com/instaclustr/cassandra/tree/CASSANDRA-19780]
{noformat}
java11_pre-commit_tests                         
  ✓ j11_build                                        4m 27s
  ✓ j11_cqlsh_dtests_py311                           9m 46s
  ✓ j11_cqlsh_dtests_py311_vnode                     9m 26s
  ✓ j11_cqlsh_dtests_py38                            7m 54s
  ✓ j11_cqlsh_dtests_py38_vnode                      7m 41s
  ✓ j11_cqlshlib_cython_tests                        7m 16s
  ✓ j11_cqlshlib_tests                               6m 35s
  ✓ j11_dtests                                      34m 18s
  ✓ j11_dtests_latest                                36m 4s
  ✓ j11_dtests_vnode                                35m 43s
  ✓ j11_jvm_dtests                                  23m 49s
  ✓ j11_jvm_dtests_latest_vnode                      14m 4s
  ✓ j11_simulator_dtests                             3m 52s
  ✓ j11_unit_tests                                  15m 52s
  ✓ j11_utests_latest                               15m 26s
  ✓ j11_utests_oa                                   15m 52s
  ✓ j11_utests_system_keyspace_directory            15m 21s
  ✓ j17_cqlsh_dtests_py311                           5m 55s
  ✓ j17_cqlsh_dtests_py311_vnode                     6m 32s
  ✓ j17_cqlsh_dtests_py38                            5m 54s
  ✓ j17_cqlsh_dtests_py38_vnode                      6m 22s
  ✓ j17_cqlshlib_cython_tests                        7m 21s
  ✓ j17_cqlshlib_tests                               6m 37s
  ✓ j17_dtests                                       32m 5s
  ✓ j17_dtests_latest                                34m 1s
  ✓ j17_dtests_vnode                                 34m 5s
  ✓ j17_jvm_dtests                                  23m 34s
  ✓ j17_jvm_dtests_latest_vnode                      14m 2s
  ✓ j17_unit_tests                                  14m 25s
  ✓ j17_utests_latest                               13m 31s
  ✓ j17_utests_oa                                   14m 13s
java11_separate_tests                            
{noformat}

[java11_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/4514/workflows/5cd9cc4b-9082-4892-9b22-cfbd1f6093e4]


> Illegal access warning logs visible on bin/tools invocations
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-19780
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19780
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/Tools
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 5.x
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> There is discrepancy between what opens we have for tools under Java 17 and 
> what we open under Java 11.
> For example this does not emit any warnings when we are on Java 17:
> {code:java}
> ./tools/bin/auditlogviewer /tmp/diagnostics -f {code}
> But it does emit these warnings when we are on Java 11
> {code:java}
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access using Lookup on 
> net.openhft.chronicle.core.Jvm 
> (file:/tmp/apache-test/apache-cassandra-5.0-rc1-SNAPSHOT/lib/chronicle-core-2.23.36.jar)
>  to class java.lang.reflect.AccessibleObject
> WARNING: Please consider reporting this to the maintainers of 
> net.openhft.chronicle.core.Jvm
> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations
> WARNING: All illegal access operations will be denied in a future 
> release{code}
> When I compared what that tool runs with on Java 17 and Java 11, I see this:
>  
> Java 17
> {code:java}
> --add-exports java.base/jdk.internal.misc=ALL-UNNAMED 
> --add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED 
> --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED 
> --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED 
> --add-exports java.sql/java.sql=ALL-UNNAMED 
> --add-exports java.base/java.lang.ref=ALL-UNNAMED 
> --add-exports jdk.unsupported/sun.misc=ALL-UNNAMED 
> --add-opens java.base/java.lang.module=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.ref=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.math=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.module=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED 
> --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED 
> --add-opens java.base/sun.nio.ch=ALL-UNNAMED 
> --add-opens java.base/java.io=ALL-UNNAMED 
> --add-opens java.base/java.lang=ALL-UNNAMED 
> --add-opens java.base/java.lang.reflect=ALL-UNNAMED 
> --add-opens java.base/java.util=ALL-UNNAMED 
> --add-opens java.base/java.nio=ALL-UNNAMED 
> --add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED 
> --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED 
> --add-opens jdk.compiler/com.sun.tools.javac=ALL-UNNAMED {code}
> For Java 11
> {code:java}
> --add-exports java.base/jdk.internal.misc=ALL-UNNAMED 
> --add-exports java.base/jdk.internal.ref=ALL-UNNAMED 
> --add-exports java.base/sun.nio.ch=ALL-UNNAMED 
> --add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED 
> --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED 
> --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED 
> --add-exports java.sql/java.sql=ALL-UNNAMED 
> --add-opens java.base/java.lang.module=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.ref=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.math=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.module=ALL-UNNAMED 
> --add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED 
> --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED {code}
> The difference is that we are not exporting this for Java 11
> {code:java}
> --add-opens java.base/sun.nio.ch=ALL-UNNAMED 
> --add-opens java.base/java.io=ALL-UNNAMED 
> --add-opens java.base/java.lang=ALL-UNNAMED 
> --add-opens java.base/java.lang.reflect=ALL-UNNAMED 
> --add-opens java.base/java.util=ALL-UNNAMED 
> --add-opens java.base/java.nio=ALL-UNNAMED 
> --add-opens java.base/java.lang.reflect=ALL-UNNAMED {code}
> For Java 17, we explicitly add only these which are not applicable for 11 
> (check the end of tools/bin/cassandra.in.sh)
> {code:java}
> --add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED
> --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
> --add-opens jdk.compiler/com.sun.tools.javac=ALL-UNNAMED  {code}
>  
> So, what I propose is that we add the missing opens to cassandra.in.sh for 
> Java 11.
> Even better, I would add this to conf/jvm11-clients.options



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to