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

Retrieve JVM and native-image crash logs that may occur at build time #404

Open
dmikusa opened this issue Jun 19, 2024 · 0 comments
Open
Labels
type:bug A general bug

Comments

@dmikusa
Copy link
Contributor

dmikusa commented Jun 19, 2024

Expected Behavior

When the JVM or native-image crash, the may write crash log files (i.e. hs_err_pid%d.log files). As a developer, you need to be able to see these files to debug the problem.

Current Behavior

Because this happens at build time, you cannot mount a volume and write the crash logs to that file. The files are written to the local disk, the local disk goes away after the crash and the logs are gone forever.

Possible Solution

The buildpack should create a temporary directory for these crash logs and then instruct the JVM and native-image to write crash logs to this location. If one of these processes returns a non-zero exit code, the buildpack should check the crash log location for crash log files. If it finds them, then it should write the contents to STDOUT (the files are text files) so it's available to the developer.

Steps to Reproduce

It is difficult to reproduce as you need the JVM/native-image to crash.

Motivations

Debug logs are important to understand problems.

@dmikusa dmikusa added the type:bug A general bug label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant