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
Contributor

@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 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.

Loading

@openjdk openjdk bot added the rfr label Jun 22, 2021
@openjdk
Copy link

@openjdk 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.

Loading

@openjdk openjdk bot added the hotspot-gc label Jun 22, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 22, 2021

Webrevs

Loading

@tschatzl
Copy link
Contributor

@tschatzl 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...

Loading

@shipilev
Copy link
Contributor Author

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

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

Loading

Copy link
Member

@walulyai walulyai left a comment

lgtm!

Loading

Copy link
Contributor

@tschatzl tschatzl left a comment

Ship it.

Loading

@openjdk
Copy link

@openjdk 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.

Loading

@openjdk openjdk bot added the ready label Jun 22, 2021
@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Jun 22, 2021

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

Loading

@kimbarrett
Copy link

@kimbarrett kimbarrett commented Jun 22, 2021

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.

Loading

src/hotspot/share/gc/g1/g1CardSetContainers.hpp Outdated Show resolved Hide resolved
Loading
src/hotspot/share/gc/g1/g1CardSetMemory.hpp Show resolved Hide resolved
Loading
Copy link

@kimbarrett kimbarrett left a comment

Much better! Looks good.

Loading

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Jun 22, 2021

Much better! Looks good.

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

Loading

Copy link
Contributor

@tschatzl tschatzl left a comment

Lgtm. Thanks for finding a better alternative.

Loading

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Jun 23, 2021

/integrate

Loading

@openjdk
Copy link

@openjdk 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.

Loading

@openjdk openjdk bot closed this Jun 23, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jun 23, 2021
@openjdk
Copy link

@openjdk 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.

Loading

@shipilev shipilev deleted the JDK-8269120-g1-build-failure branch Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants