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

8269120: Build failure with GCC 6.3.0 after JDK-8017163 #4551

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Jun 22, 2021

One of my CI servers that carry GCC 6.3.0 fails after JDK-8017163 with:

In file included from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1CardSetFreeMemoryTask.hpp:29:0,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1CollectedHeap.hpp:31,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/heapRegion.inline.hpp:31,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp:30,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1AllocRegion.cpp:26:
/home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1CardSetMemory.hpp:203:54: error: template argument 2 is invalid
   typedef LockFreeStack<G1CardSetContainer, &next_ptr> NodeStack;
                                                      ^

I believe the cause is that next_ptr is the member of template<class Elem> class G1CardSetAllocator, so this confuses the compiler. For a fix, I moved the typedef to G1CardSetContainer, which is not templated.

Additional testing:

  • GCC 6.3.0 build now works
  • Linux x86_64 fastdebug tier1 passes

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8269120: Build failure with GCC 6.3.0 after JDK-8017163

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4551/head:pull/4551
$ git checkout pull/4551

Update a local copy of the PR:
$ git checkout pull/4551
$ git pull https://git.openjdk.java.net/jdk pull/4551/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4551

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4551.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 22, 2021

👋 Welcome back shade! 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 Jun 22, 2021
@openjdk
Copy link

openjdk bot commented Jun 22, 2021

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

  • hotspot-gc

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-gc hotspot-gc-dev@openjdk.org label Jun 22, 2021
@mlbridge
Copy link

mlbridge bot commented Jun 22, 2021

Webrevs

@tschatzl
Copy link
Contributor

tschatzl commented Jun 22, 2021

What platform is still on GCC 6.3.0? It has been released in December 21, 2016 and actually the whole release series is apparently "no longer supported" according to the GNU homepage (link). I kind of understand supporting still supported compilers, but officially unsupported ones with the last release 3 years ago (which is 6.5.0 btw)?

Not having looked into the change too much, but there might be more similar trouble when implementing JDK-8267834 when the JDK 17 release trouble dies down a bit, as G1CardSetAllocator and BufferNode::Allocator will be merged again...

@shipilev
Copy link
Member Author

What platform is still on GCC 6.3.0? It has been released in December 21, 2016 and actually the whole release series is apparently "no longer supported" according to the GNU homepage (link). I kind of understand supporting still supported compilers, but officially unsupported ones with the last release 3 years ago?

Debian 9 "stretch" ships with GCC 6.3.0 [1], and it is supported until 2022 [2]. Plenty of servers (including some of my CI nodes) run it.

[1] https://packages.debian.org/search?keywords=gcc
[2] https://wiki.debian.org/LTS

Copy link
Member

@walulyai walulyai left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Ship it.

@openjdk
Copy link

openjdk bot commented Jun 22, 2021

@shipilev 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:

8269120: Build failure with GCC 6.3.0 after JDK-8017163

Reviewed-by: iwalulya, tschatzl, kbarrett

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 3 new commits pushed to the master branch:

  • 0c693e2: 8268290: Improve LockFreeQueue<> utility
  • 33c23a1: 8264941: Remove CodeCache::mark_for_evol_deoptimization() method
  • 18a1dd2: 8269031: linux x86_64 check for binutils 2.25 or higher after 8265783

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Jun 22, 2021
@shipilev
Copy link
Member Author

Is this kind of move trivial? In other words, do we want to wait for anyone else to chime in?

@kimbarrett
Copy link

I'm looking at it. I don't much like it, and have some other suggestions that you may or may not have already tried. I don't have ready access to gcc6, so hard to experiment.

Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

Much better! Looks good.

@shipilev
Copy link
Member Author

Much better! Looks good.

Cool. Just checking: this looks trivial to you, right? I'd like to make CIs happier tonight.

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Lgtm. Thanks for finding a better alternative.

@shipilev
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 23, 2021

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

  • a5e4307: 8269134: Remove sparsePRT.inline.hpp after JDK-8017163
  • 17daf32: 8269138: Move typeArrayOop.inline.hpp include to vectorSupport.cpp
  • 36d82b6: 8268858: Determine register pressure automatically by the number of available registers for allocation
  • ae3eedc: 8268727: Remove unused slowpath locking method in OptoRuntime
  • cd678a3: 8268368: Adopt cast notation for JavaThread conversions
  • b6cfca8: Merge
  • 35e4c27: 8268404: [TESTBUG] tools/jpackage/windows/WinInstallerIconTest.java failed "AssertionError: Failed: Check icon"
  • dc12cb7: 8267652: c2 loop unrolling by 8 results in reading memory past array
  • 578c55b: 8267399: C2: java/text/Normalizer/ConformanceTest.java test failed with assertion
  • 8fa2520: 8268888: Upstream 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken
  • ... and 9 more: https://git.openjdk.java.net/jdk/compare/2e639dd34a4342de6e1b9470448d66ef89c4bd52...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 23, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 23, 2021
@openjdk
Copy link

openjdk bot commented Jun 23, 2021

@shipilev Pushed as commit 6237630.

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

@shipilev shipilev deleted the JDK-8269120-g1-build-failure branch July 2, 2021 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated
4 participants