Skip to content

8339355: Test build/AbsPathsInImage.java fails configure with --enable-ccache #25811

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Jun 14, 2025

Hi all,

The debuginfo file will not ship to customers generally, so I think it's not necessary to check the debuginfo files contains absolutive path or not. And I can't find why the debuginfo file always contains workspace path info with --enable-ccache configure option.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8339355: Test build/AbsPathsInImage.java fails configure with --enable-ccache (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25811/head:pull/25811
$ git checkout pull/25811

Update a local copy of the PR:
$ git checkout pull/25811
$ git pull https://git.openjdk.org/jdk.git pull/25811/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 25811

View PR using the GUI difftool:
$ git pr show -t 25811

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25811.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 14, 2025

👋 Welcome back syan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 14, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 14, 2025
@openjdk
Copy link

openjdk bot commented Jun 14, 2025

@sendaoYan The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Jun 14, 2025
@mlbridge
Copy link

mlbridge bot commented Jun 14, 2025

Webrevs

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do expect the debuginfo files to be reproducible and hence free of absolute paths. This was implemented in https://bugs.openjdk.org/browse/JDK-8284437, where -fdebug-prefix-map was one of the mitigations applied. I would start my investigation with trying to understand why that option isn't working, or being applied, when you build with --enable-ccache.

@sendaoYan
Copy link
Member Author

sendaoYan commented Jun 16, 2025

We do expect the debuginfo files to be reproducible and hence free of absolute paths. This was implemented in https://bugs.openjdk.org/browse/JDK-8284437, where -fdebug-prefix-map was one of the mitigations applied. I would start my investigation with trying to understand why that option isn't working, or being applied, when you build with --enable-ccache.

Thanks @erikj79

I can not find the root cause how does the debuginfo files contains the absolute paths.

Take java.debuginfo example, this file generate by objcopy --only-keep-debug build/ccache/support/modules_cmds/java.base/java build/ccache/support/modules_cmds/java.base/java.debuginfo, the source file build/ccache/support/modules_cmds/java.base/java contains absolute path string DW_AT_comp_dir /hygonjdk/yansendao/git/jdk shows as below:

> dwarfdump build/ccache/support/modules_cmds/java.base/java | grep DW_AT_comp_dir
                    DW_AT_comp_dir              /hygonjdk/yansendao/git/jdk
                    DW_AT_comp_dir              /hygonjdk/yansendao/git/jdk

The file build/ccache/support/modules_cmds/java.base/java linked from libjli.so and main.o, and the main.o already contains DW_AT_comp_dir absolute path when enable ccache. I can't find the difference between with ccache and without ccache when generate main.o

@erikj79
Copy link
Member

erikj79 commented Jun 16, 2025

In a bug comment you said that adding -fdebug-prefix-map worked around most of them, but in the example you added the option using --with-extra-cflags. This option is supposed to be added automatically anyway, so you observing a difference when explicitly adding the flag leads me to believe there is some difference in options when you enable ccache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants