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

Support running on gz files directly #168

Closed
1 task done
gaborbernat opened this issue Feb 9, 2024 · 2 comments
Closed
1 task done

Support running on gz files directly #168

gaborbernat opened this issue Feb 9, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gaborbernat
Copy link

gaborbernat commented Feb 9, 2024

Is there an existing proposal for this?

  • I have searched the existing proposals

Is your feature request related to a problem?

Core dumps are often automatically archived to save disk space (in my case using the .gz) format. However, pystack does not allow running directly on these files, requiring a raw core dump. This means it introduces an extra manual step of unzipping the core dump before I can use pystack to see the stacktrace.

Describe the solution you'd like

pystack should automate this kind of core dump extraction; it could see the file ends with .gz and call gzip unarchive in a temp file, and run against the temp file. This would be a quality of life improvement.

Alternatives you considered

Keep doing the manual method...

@gaborbernat gaborbernat added the enhancement New feature or request label Feb 9, 2024
@godlygeek godlygeek added the good first issue Good for newcomers label Feb 13, 2024
@godlygeek
Copy link
Contributor

This sounds reasonable to me. It seems reasonable to check whether a file is or isn't a gzip file (not based on its file extension but based on its contents), and if so to extract it to a temp file. Without checking the code, I'm guessing that we probably need a NamedTemporaryFile and can't get by with just a tempfile.TemporaryFile

@pablogsal
Copy link
Member

Fixed by #171

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

No branches or pull requests

3 participants