Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Zip64 Support in Perfetto #991

Open
yohaigevim opened this issue Jan 20, 2025 · 5 comments
Open

Request for Zip64 Support in Perfetto #991

yohaigevim opened this issue Jan 20, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@yohaigevim
Copy link
Contributor

I came across the following comment in the Perfetto UI source code:

// - Does NOT support zip64, encryption and other advanced zip file features.
// - It is not suitable for security-sensitive contexts. E.g. it doesn't deal
// with zip path traversal attacks (the same file showing up twice with two
// different payloads).

I understand that the current implementation does not support Zip64, and I was wondering if there are any plans to address this limitation in the future. The inability to handle large traces within zip files that require Zip64 support can be restrictive for certain workflows.

Could you please clarify:
Are there any plans to implement Zip64 support in upcoming releases?
If not, are there any recommended approaches or workarounds for handling large traces inside zip files, aside from extracting them manually beforehand?

Thank you for maintaining such an excellent tool, and I look forward to your insights on this!

Best regards,
Yohai

@LalitMaganti
Copy link
Collaborator

There are no plans to support zip64 in the foreseeable future

For workaronds, we also suppose gzip compression and there are no size restrictions so maybe there's a way to convert from zip64 to gzip without decompressing. Certainly you should be able to write some tool or script, not sure if there is some off the shelf solution.

@LalitMaganti
Copy link
Collaborator

Will actually leave this open because this is a fair feature request

@LalitMaganti LalitMaganti reopened this Jan 20, 2025
@LalitMaganti LalitMaganti added the enhancement New feature or request label Jan 20, 2025
@yohaigevim
Copy link
Contributor Author

Thank you for the prompt response!

The suggested workaround of using gzip compression works perfectly for my use case.
Since I already use libarchive, I can directly create gzip files instead of zip files. This resolves the issue for me.

While working with TAR files, I encountered an issue where TAR archives containing nested directories (e.g., created using tar -cf some_folder/) failed to load in the trace processor.
Additionally, there was a lack of support for base-256 encoded size fields in TAR headers, which caused compatibility issues with certain large TAR files.

To address these problems, I’ve submitted a fix to the Android AOSP Gerrit:
https://android-review.googlesource.com/c/platform/external/perfetto/+/3460180

Please let me know if there are any suggestions or adjustments you'd like to see

@LalitMaganti
Copy link
Collaborator

Overall looks great! Thanks for the submission, we'll continue the discussion on the patch and get it landed soon :)

@LalitMaganti
Copy link
Collaborator

https://r.android.com/3460180 has landed. Thanks a lot for the contribution!

I'll leave this bug open for the original request for ZIP64 support but I think this should be a reasonable workaround for anyone else for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants