Skip to content

Consider printing out error code and message when failing to open a coredump file #225

@hw-dv

Description

@hw-dv

Is there an existing proposal for this?

  • I have searched the existing proposals

Is your feature request related to a problem?

First, I'm happy using PyStack, kudos to the team!

I have an issue when using "pystack core" feature. For example,

(venv) my-box1 [ ~ ]$ pystack core /var/lib/systemd/coredump/core.inchart.42086.63a8a64cc96043f397c16e4a3e4b7f5e.3748542.1743519347000000 /export/apps/python/3.10/bin/python3
💀 Engine error: Failed to open ELF file /var/lib/systemd/coredump/core.inchart.42086.63a8a64cc96043f397c16e4a3e4b7f5e.3748542.1743519347000000 💀

The related code is here.

Since it might have various reasons when failing to open a file, eg, invalid permission, file not found, etc. It would be great if the errno and/or generic_category could be shown in the console, so that users can find out the reason immediately. Thank you for considering this enhancement!

Describe the solution you'd like

(venv) my-box1 [ ~ ]$ pystack core /var/lib/systemd/coredump/core.inchart.42086.63a8a64cc96043f397c16e4a3e4b7f5e.3748542.1743519347000000 /export/apps/python/3.10/bin/python3
💀 Engine error: Failed to open ELF file /var/lib/systemd/coredump/core.inchart.42086.63a8a64cc96043f397c16e4a3e4b7f5e.3748542.1743519347000000. Error code: 13 - Permission denied 💀

Alternatives you considered

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions