You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2026/03/06 16:39:00 UTC

[jira] [Updated] (HDDS-14778) ozone-filesystem-hadoop3 shading corrupts protobuf descriptor binary causing InvalidProtocolBufferException with TRACE logging

     [ https://issues.apache.org/jira/browse/HDDS-14778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Doroszlai updated HDDS-14778:
------------------------------------
    Fix Version/s:     (was: 2.2.0)

> ozone-filesystem-hadoop3 shading corrupts protobuf descriptor binary causing InvalidProtocolBufferException with TRACE logging
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-14778
>                 URL: https://issues.apache.org/jira/browse/HDDS-14778
>             Project: Apache Ozone
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Jason O'Sullivan
>            Priority: Major
>
> h3. Problem
> When TRACE logging is enabled, any Ozone client operation via ofs:// fails with:
> {code}
> java.lang.ExceptionInInitializerError
>     at org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.<clinit>
> Caused by: com.google.protobuf.InvalidProtocolBufferException: 
>     Protocol message tag had invalid wire type
>     at com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom
> {code}
> h3. Root Cause
> The io relocation rule in ozonefs-shaded/pom.xml has no <includes> guard, so the shade plugin's startsWith("io") check matches binary protobuf descriptor chunks that happen to start with the bytes "io".
> {code}
> <relocation>
>   <pattern>io</pattern>
>   <shadedPattern>${ozone.shaded.prefix}.io</shadedPattern>
>   <excludes>
>     <exclude>io!netty!*</exclude>
>   </excludes>
> </relocation>
> {code}
> This corrupts the descriptor data stored as string constants in OzoneManagerProtocolProtos.class. When TRACE logging triggers the first access to that class, protobuf fails to parse the corrupted descriptor.
> This is a latent bug — it fires whenever a proto change shifts a descriptor chunk boundary onto bytes starting with "io". The same issue exists for the info, kotlin, picocli, okio, and okhttp3 rules.
> h3. Potential Fix
> Add <includes> to the io rule, consistent with how the org and com rules are already configured:
> {code}
> <relocation>
>   <pattern>io</pattern>
>   <shadedPattern>${ozone.shaded.prefix}.io</shadedPattern>
>   <includes>
>     <include>io.grpc.**.*</include>
>     <include>io.opentelemetry.**.*</include>
>   </includes>
>   <excludes>
>     <exclude>io!netty!*</exclude>
>   </excludes>
> </relocation>
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org