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

JDK-8311285: report some fontconfig related environment variables in hs_err file #14767

Closed
wants to merge 2 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Jul 4, 2023

There are a number of important environment variables influencing how fontconfig works.
See for example
https://man.archlinux.org/man/fonts-conf.5
Some of them should be added to the list of reported environment variables in hs_err file because e.g. a bad setting for some of them can even lead sometimes to crashes.


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-8311285: report some fontconfig related environment variables in hs_err file (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14767

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 4, 2023

👋 Welcome back mbaesken! 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 openjdk bot added the rfr Pull request is ready for review label Jul 4, 2023
@openjdk
Copy link

openjdk bot commented Jul 4, 2023

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

  • hotspot

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 hotspot hotspot-dev@openjdk.org label Jul 4, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 4, 2023

Webrevs

@@ -106,6 +106,9 @@ static const char* env_list[] = {
"JAVA_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH",
"PATH", "USERNAME",

// UNIX platforms, fontconfig related
Copy link
Member

Choose a reason for hiding this comment

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

The XDG values are not specifically fontconfig related.

@@ -106,6 +106,9 @@ static const char* env_list[] = {
"JAVA_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH",
"PATH", "USERNAME",

// UNIX platforms, fontconfig related
"XDG_CACHE_HOME", "XDG_CONFIG_HOME", "FC_LANG",
Copy link
Member

Choose a reason for hiding this comment

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

This seems a very limited selection - why only these three? (And I find it hard to imagine how these particular ones might lead to crashes - FONTCONFIG_USE_MMAP seems much more interesting in that regard).

@MBaesken
Copy link
Member Author

MBaesken commented Jul 5, 2023

Hi David , FONTCONFIG_USE_MMAP sounds interesting, I saw this too in the list of environment variables. Should I add this one?

And I find it hard to imagine how these particular ones might lead to crashes

Shared cache home directory (in a shared HOME shared between different hosts) was causing a lot of trouble and leading to crashes rather often in our AIX tests. So this one is interesting for sure.

@dholmes-ora
Copy link
Member

Hi David , FONTCONFIG_USE_MMAP sounds interesting, I saw this too in the list of environment variables. Should I add this one?

It seems more useful, at first glance, than the others :)

I find it hard to know where to draw the line here. Over time you could end up eventually adding everything. Would it be better to dump the entire environment to a file along-side the hs_err file?

@MBaesken
Copy link
Member Author

MBaesken commented Jul 6, 2023

Hi David,

Would it be better to dump the entire environment to a file along-side the hs_err file?

I am fine with this idea.
However I am not sure if this is the policy of the OpenJDK. If you print everything, maybe some application dependent variables show up as well that have nothing to do with the JVM at all. For example in my environment on my Windows laptop, there would be environment variables about OneDrive and about Perforce SCM, not sure if we want to print those.

@dholmes-ora
Copy link
Member

Yes I guess dumping the whole environment is a bit too extreme. As it is we have to be cautious about what external information we capture in the hs_err log.

Copy link
Contributor

@RealCLanger RealCLanger left a comment

Choose a reason for hiding this comment

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

This looks like useful additions, I'd also vote for adding FONTCONFIG_USE_MMAP.

@openjdk
Copy link

openjdk bot commented Jul 7, 2023

@MBaesken This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8311285: report some fontconfig related environment variables in hs_err file

Reviewed-by: clanger, stuefe

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 27 new commits pushed to the master branch:

  • 92ca670: 8310170: Use sp's argument to improve performance of outputStream::indent and remove SP_USE_TABS
  • 25cbe85: 8310550: Adjust references to rt.jar
  • 848abd2: 8311511: Improve description of NativeLibrary JFR event
  • 6485b7d: 6875229: Wrong placement of icons in JTabbedPane in Nimbus
  • 27de536: 8311581: Remove obsolete code and comments in TestLVT.java
  • e848d94: 8310923: Refactor Currency tests to use JUnit
  • 0c86c31: 8302351: "assert(!JavaThread::current()->is_interp_only_mode() || !nm->method()->is_continuation_enter_intrinsic() || ContinuationEntry::is_interpreted_call(return_pc)) failed: interp_only_mode but not in enterSpecial interpreted entry" in fixup_callers_callsite
  • ec7da91: 8240567: MethodTooLargeException thrown while creating a jlink image
  • 97e99f0: 8311087: PhiNode::wait_for_region_igvn should break early
  • 7173c30: 8307766: Linux: Provide the option to override the timer slack
  • ... and 17 more: https://git.openjdk.org/jdk/compare/711cddd899048236bbc3c0aa7e4ac0fc8aebe4d2...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 7, 2023
Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

LGTM, modulo David's advice (remove the comment, add FONTCONFIG_USE_MMAP).

Cheers, Thomas

@MBaesken
Copy link
Member Author

MBaesken commented Jul 7, 2023

Hi Thomas and Christoph, thanks for the reviews !
I removed the comment, added FONTCONFIG_USE_MMAP.

/integrate

@openjdk
Copy link

openjdk bot commented Jul 7, 2023

Going to push as commit 0ef03f1.
Since your change was applied there have been 27 commits pushed to the master branch:

  • 92ca670: 8310170: Use sp's argument to improve performance of outputStream::indent and remove SP_USE_TABS
  • 25cbe85: 8310550: Adjust references to rt.jar
  • 848abd2: 8311511: Improve description of NativeLibrary JFR event
  • 6485b7d: 6875229: Wrong placement of icons in JTabbedPane in Nimbus
  • 27de536: 8311581: Remove obsolete code and comments in TestLVT.java
  • e848d94: 8310923: Refactor Currency tests to use JUnit
  • 0c86c31: 8302351: "assert(!JavaThread::current()->is_interp_only_mode() || !nm->method()->is_continuation_enter_intrinsic() || ContinuationEntry::is_interpreted_call(return_pc)) failed: interp_only_mode but not in enterSpecial interpreted entry" in fixup_callers_callsite
  • ec7da91: 8240567: MethodTooLargeException thrown while creating a jlink image
  • 97e99f0: 8311087: PhiNode::wait_for_region_igvn should break early
  • 7173c30: 8307766: Linux: Provide the option to override the timer slack
  • ... and 17 more: https://git.openjdk.org/jdk/compare/711cddd899048236bbc3c0aa7e4ac0fc8aebe4d2...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 7, 2023
@openjdk openjdk bot closed this Jul 7, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 7, 2023
@openjdk
Copy link

openjdk bot commented Jul 7, 2023

@MBaesken Pushed as commit 0ef03f1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
4 participants