Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. making strato related tests concurrent as they are timing out on CI at this point 2. adding syncronized to Hotspot snapshot method as it is not thread safe. in particular when we lookup GC name we call PerfStringCounter that calls super PerfByteArrayCounter that resets buffer position to 0. if called concurrently one thread will read the counter resetting position to buffer length and we get BufferUnderflow i.e. race condition https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/master/src/java.management/share/classes/sun/management/counter/perf/PerfByteArrayCounter.java#L53 https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/master/src/java.management/share/classes/sun/management/counter/perf/PerfStringCounter.java#L64 Stack trace: https://ton.pdxa.twitter.com/scoot/prod_d70f787a-276c-4db8-7e76-36016e1ef442_08fbec44-75f9-482d-7f87-b240c9af3c1e/stdlog ``` generated columnDescs match generated ops(com.twitter.strato.config.compile_tests.ColumnDescTest) java.nio.BufferUnderflowException at java.base/java.nio.DirectByteBuffer.get(DirectByteBuffer.java:294) at java.base/java.nio.ByteBuffer.get(ByteBuffer.java:770) at java.management/sun.management.counter.perf.PerfByteArrayCounter.byteArrayValue(PerfByteArrayCounter.java:57) at java.management/sun.management.counter.perf.PerfStringCounter.stringValue(PerfStringCounter.java:64) at java.management/sun.management.counter.perf.PerfStringCounter.getValue(PerfStringCounter.java:58) 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) at com.twitter.jvm.Hotspot.$anonfun$getGc$5(Hotspot.scala:90) at scala.Option.map(Option.scala:230) at com.twitter.jvm.Hotspot.$anonfun$getGc$4(Hotspot.scala:90) at com.twitter.jvm.Hotspot.$anonfun$getGc$4$adapted(Hotspot.scala:89) at scala.Option.flatMap(Option.scala:271) at com.twitter.jvm.Hotspot.$anonfun$getGc$2(Hotspot.scala:89) at com.twitter.jvm.Hotspot.$anonfun$getGc$2$adapted(Hotspot.scala:88) at scala.Option.flatMap(Option.scala:271) at com.twitter.jvm.Hotspot.getGc(Hotspot.scala:88) at com.twitter.jvm.Hotspot.snap(Hotspot.scala:149) at com.twitter.strato.config.loading.ConfigResourceMonitoring$.collect(ConfigResourceMonitoring.scala:55) at com.twitter.strato.config.loading.CompiledStratoCatalog.<init>(CompiledStratoCatalog.scala:56) at com.twitter.strato.config.loading.CompiledStratoCatalog$.apply(CompiledStratoCatalog.scala:493) at com.twitter.strato.test.config.ConfigTestCatalog$$anon$1.mkConfigCatalog(ConfigTestCatalog.scala:333) at com.twitter.strato.test.config.ConfigTestCatalog$.apply(ConfigTestCatalog.scala:159) at com.twitter.strato.test.config.StratoConfigSuite.mkCatalog(StratoConfigSuite.scala:164) at com.twitter.strato.config.compile_tests.ColumnDescTest.$anonfun$new$1(ColumnDescTest.scala:18) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) at com.twitter.servo.testing.prop.PropertySuite.$anonfun$test$1(PropertySuite.scala:71) ``` Differential Revision: https://phabricator.twitter.biz/D1188541
- Loading branch information