8355047: SA fails to discover JDK libraries for Linux core files #25861
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Linux core files contain absolute paths to all libraries that were loaded in memory at the time the core dump was taken. If the file paths do not match the ones present on the machine where SA runs, loading the core file requires setting SA_ALTROOT and copying additional binaries (ld-linux, possibly others).
We can do better than that; we know the path to the executable file on the SA machine, and the core dump contains the path to the executable file on the original machine. Based on the two locations, we can rewrite the paths in the core dump to corresponding paths on the SA machine.
The code added in this PR reads all file paths in the NT_FILE section, and tries to match them to the executable file name passed on the command line with the
--exe
parameter. Once a matching path is found, the common suffix is stripped, and the differing prefixes are used to remap the paths to other JDK files.Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25861/head:pull/25861
$ git checkout pull/25861
Update a local copy of the PR:
$ git checkout pull/25861
$ git pull https://git.openjdk.org/jdk.git pull/25861/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25861
View PR using the GUI difftool:
$ git pr show -t 25861
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25861.diff