Apache9 commented on PR #7869:
URL: https://github.com/apache/hbase/pull/7869#issuecomment-4015214079

   Seems the failures are because of recursively class loading...
   
   While loading CodedInputStream we need to to ByteString and then ByteString 
needs CodedInputStream, and finally cause we call some methods in 
CodedInputStream before it is initialized and we gotten an NPE.
   
   This is the stacktrace
   ```
   java.lang.NullPointerException: Cannot load from int array because 
"org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream$1.$SwitchMap$com$google$protobuf$CodedInputStream$VarintExperiment"
 is null at 
org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:126)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:91)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:86)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.Internal.<clinit>(Internal.java:368)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.ByteString.<clinit>(ByteString.java:74)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.WireFormat$JavaType.<clinit>(WireFormat.java:66)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.WireFormat$FieldType.<clinit>(WireFormat.java:87)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream$1.<clinit>(CodedInp
 utStream.java:346) at 
org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:126)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:91)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:134)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:168)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:180)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:185)
 at 
org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:25)
 at 
org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos$RandomRowFilter.parseFrom(FilterProtos.java:11684)
 at 
org.apache.hadoop.hbase.filter.RandomRowFilter.parseFrom(RandomRowFilter.java:119)
 at org.apache.hadoop.hbase.filter.TestRandomRowFilt
 er.serializationTest(TestRandomRowFilter.java:95) at 
org.apache.hadoop.hbase.filter.TestRandomRowFilter.testSerialization(TestRandomRowFilter.java:78)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:569) at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
 at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
 at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
 at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) 
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
  at 
org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
 at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at 
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at 
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at 
org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at 
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
 at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   ```
   
   In TestRandomRowFilter, this can be fixed by adding a 
`System.out.println(ByteString.EMPTY);`.
   
   Since the VarintExperiment enum does not take affect in our code as we will 
never change it, I prefer we just change the implementation of 
CodedInputStream.newInstance to not use it. Let's see if this can fix the 
problem for us.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to