Skip to content

tools/zstpak: name file in error message#713

Merged
christos68k merged 2 commits intomainfrom
zstpack-error
Aug 20, 2025
Merged

tools/zstpak: name file in error message#713
christos68k merged 2 commits intomainfrom
zstpack-error

Conversation

@florianl
Copy link
Copy Markdown
Member

If coredump tests fail because of a file with an unexected format, we get the following error:

failed to open coredump file reader: failed to open local file: file doesn't appear to be in zstpak format (bad magic)

Enrich the returned error message with the file name, to help debug this issue. Now it looks like this:

failed to open coredump file reader: failed to open local file: modulecache/09d5bc25045e77dd69e76304b8babc5b0bc85abda959a8c65cd3a3d9b471bdd0: file doesn't appear to be in zstpak format (bad magic)

If coredump tests fail because of a file with an unexected format, we get the following error:
```
failed to open coredump file reader: failed to open local file: file doesn't appear to be in zstpak format (bad magic)
```
Enrich the returned error message with the file name, to help debug this issue. Now it looks like this:
```
failed to open coredump file reader: failed to open local file: modulecache/09d5bc25045e77dd69e76304b8babc5b0bc85abda959a8c65cd3a3d9b471bdd0: file doesn't appear to be in zstpak format (bad magic)
```
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@florianl florianl requested review from a team as code owners August 20, 2025 07:30
Comment thread tools/zstpak/lib/zstpak.go Outdated
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@christos68k christos68k merged commit c36473d into main Aug 20, 2025
28 checks passed
@christos68k christos68k deleted the zstpack-error branch August 20, 2025 21:17
gnurizen pushed a commit to parca-dev/opentelemetry-ebpf-profiler that referenced this pull request Sep 30, 2025
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
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.

3 participants