bazel: Truncated TAR archive error during decompressing tar file

Description of the bug:

Context: https://github.com/bazelbuild/bazel/issues/20090#issuecomment-1819279500

Which category does this issue belong to?

External Dependency

What’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Can be reproduced on macOS with the same repo as https://github.com/bazelbuild/bazel/issues/20090#issue-1982707352

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What’s the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

About this issue

  • Original URL
  • State: open
  • Created 7 months ago
  • Comments: 16 (13 by maintainers)

Most upvoted comments

@FrancoisPoinsot since the root cause lies in commons-compress, there is little we can do in Bazel without a upstream fix. I’ll have to downgrade this to P2 and remove it as a release blocker for 7.0

I can confirm this is an issue, but having spent a fair chunk of time trying to understand the TAR format, I can only deduce that the issue stems from somewhere within the Apache Commons compress library. In any case, this wouldn’t be a 7.0.0 regression; I’m pretty sure that we never supported sparse TARs. So I’m inclined to treat this as a “soft blocker” – that is, if all non-soft blockers are resolved, we should release 7.0.0 and look to maybe resolve this in a patch release.

could there be an actual problem with the tar file?

GNU tar extracts the file just fine, so I’d say this is some feature disparity in the Java library.

@bazel-io fork 7.0.0