Skip to content

ProGuard fails due to missing hadoop-shaded-protobuf_3_25 on 4.x releases #1075

@tlopesPT

Description

@tlopesPT

ProGuard is working fine with our basic rules up to the 3.1.2 release.
Updating to any release higher than that breaks ProGuard preverification, both for the shaded and unshaded releases, e.g. 4.0.0 or 4.3.0-unshaded.

Preverifying...
error[1004]: proguard.evaluation.exception.IncompleteClassHierarchyException
  --> org/apache/hadoop/ipc/Server$Connection : processOneRpc(Ljava/nio/ByteBuffer;)V at return
200 |     aload v5
202 |     invokevirtual #285
205 |     invokestatic #174
208 |     aload_0 v0
209 |     aload v6
211 |     invokespecial #9
214 |     return
    |     ^^^^^^ Can't find common super class of [org.apache.hadoop.ipc.protobuf.RpcHeaderProtos$RpcRequestHeaderProto] (with 1 known super classes: org.apache.hadoop.ipc.protobuf.RpcHeaderProtos$RpcRequestHeaderProto and 1 unknown classes: org.apache.hadoop.thirdparty.protobuf.GeneratedMessageV3) and [org.apache.hadoop.ipc.RpcServerException] (with 6 known super classes: org.apache.hadoop.ipc.RpcException, java.lang.Exception, org.apache.hadoop.ipc.RpcServerException, java.lang.Object, java.io.IOException, java.lang.Throwable)                                                                          
Variables: [P0:P0:Lorg/apache/hadoop/ipc/Server$Connection;!][P1:P1:Ljava/nio/ByteBuffer;][29:i][35:i][8:E104,M5:Ljava/lang/Object;][22:M16:Lorg/apache/hadoop/ipc/protobuf/RpcHeaderProtos$RpcRequestHeaderProto;][empty:empty]

The issue seems to be related with the deprecated org.apache.hadoop.thirdparty.protobuf.GeneratedMessageV3 class
https://github.com/protocolbuffers/protobuf/blob/6af119088affa46e1d03c4bf228d2e030d53b3aa/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java#L30

But I could not pin down the root cause, any ideas?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions