You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "shylaja kokoori (Jira)" <ji...@apache.org> on 2022/11/04 17:58:00 UTC

[jira] [Commented] (CASSANDRA-17884) Test failure: o.a.c.repair.RepairJobTest.testNoTreesRetainedAfterDifference

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

shylaja kokoori commented on CASSANDRA-17884:
---------------------------------------------

Thanks for your help Ekaterina, posting summary of conversation we had here

 
 # Issue I have seen so far with this test is when MemoryMeter tries to access fields from JDK internal classes like com.sun.*, jdk.internal.* etc. There is a commit in jamm [https://github.com/jbellis/jamm/commit/33d78c1035211e5f9e69ad9247f3a0f6ef75c923] (Ekaterina pointed me to) addressing this specific issue, but it does not seem to filter out all the JDK internal classes.
 # Also there might be a timing issue involved here. When I step into the code using IntelliJ and look at the values of the variables (adding latency), occurrence of the failure is delayed.

 

Still trying to figure out when the iteration in MemoryMeter.addFieldChildren should terminate.

Avoiding access to these internal functions will help JDK11. Foreign function interface available as part of project Panama maybe another option, in later JDK versions, to get the object size.

> Test failure: o.a.c.repair.RepairJobTest.testNoTreesRetainedAfterDifference
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17884
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17884
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/unit
>            Reporter: Andres de la Peña
>            Assignee: shylaja kokoori
>            Priority: Normal
>             Fix For: 4.0.x, 4.1.x, 4.x
>
>
> The unit test {{org.apache.cassandra.repair.RepairJobTest#testNoTreesRetainedAfterDifference}} seems to be slightly flaky at least in 4.0. We haven't seen it failing on Butler, but after [a failure on a patch branch|https://app.circleci.com/pipelines/github/jacek-lewandowski/cassandra/281/workflows/e6094c00-b611-4772-9772-205f4c76ecba/jobs/2126/tests], this repeated run shows a 0.28% flakiness:
> * https://app.circleci.com/pipelines/github/adelapena/cassandra/2076/workflows/8adbfe99-afb5-43af-84ad-43df2a2a86e2/jobs/20816/tests
> * https://app.circleci.com/pipelines/github/adelapena/cassandra/2076/workflows/e550d8c2-7c35-4326-bd95-6909978d344b/jobs/20817/tests
> {code}
> java.lang.reflect.InaccessibleObjectException: Unable to make field private jdk.internal.platform.cgroupv1.SubSystem$MemorySubSystem jdk.internal.platform.cgroupv1.Metrics.memory accessible: module java.base does not "opens jdk.internal.platform.cgroupv1" to unnamed module @157853da
> 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)
> 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)
> 	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:176)
> 	at java.base/java.lang.reflect.Field.setAccessible(Field.java:170)
> 	at org.github.jamm.MemoryMeter.addFieldChildren(MemoryMeter.java:330)
> 	at org.github.jamm.MemoryMeter.measureDeep(MemoryMeter.java:269)
> 	at org.apache.cassandra.utils.ObjectSizes.measureDeep(ObjectSizes.java:216)
> 	at org.apache.cassandra.repair.RepairJobTest.testNoTreesRetainedAfterDifference(RepairJobTest.java:271)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> {code}
> Flakiness is really low but the failure is clearly reproducible in j11.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org