Skip to content

Conversation

@MarcelBochtler
Copy link
Contributor

We've observed multiple cases where a zero-byte file is cached, leading to crashes crashes with the error message:

zipfile.BadZipFile: File is not a zip file

I was not able to reproduce this issue reliably enough to identify the root cause. However, adding a check to ensure that the cached file is not empty before using it will mitigate the problem.

@MarcelBochtler MarcelBochtler force-pushed the zero-byte-whl branch 3 times, most recently from 6d09dee to bcf912d Compare October 30, 2025 13:11
Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.com>
We've observed multiple cases where a zero-byte file is cached, leading
to crashes with the error message:

    zipfile.BadZipFile: File is not a zip file

I was not able to reproduce this issue reliably enough to identify the
root cause. However, adding a check to ensure that the cached file is
not empty before using it will mitigate the problem.

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.com>
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcelBochtler LGTM!

The code change should fix the issue if it exists, but a small test is always nice to have in these cases.

@AyanSinhaMahapatra AyanSinhaMahapatra merged commit 2a9f128 into aboutcode-org:main Oct 31, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants