-
Notifications
You must be signed in to change notification settings - Fork 166
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
Update compiler on Linux s390x #3630
Comments
FWIW I'm always up for upgrading compilers anywhere 😄 |
@richardlau is the V8 code with the bug already in existing release lines or if not, likely to be backported ? |
Current V8 in Node.js uses V8's custom |
Ok so the question is if we need to have a new gcc for Node.js 22 or Node.js 23, right? |
Thinking about it, we do often pull in a version of v8 after 22 is cut, so it may not be easy to know that until close to the LTS promotion. It may be best to assume it will be needed for 22 so that we don't need to update compilers after 22 is cut. |
Another s390x gcc bug has been identified, this time in gcc 12 and 13 when c++20 is enabled:
This one currently doesn't affect Node.js because we haven't landed nodejs/node#45427. We are working with the RH team that looks after the gcc-toolsets to get the fix into gcc-toolsets (preferably 12) once upstream gcc have backported the fixes. I'm about to open a PR to Ansible installation of gcc-toolsets 12 and 13 onto our RHEL 8 machines. This will make those compilers available on the machine so we can run test builds, etc. We can then make any required |
For tracking Bug 113960 being backported to gcc-toolset-12: https://issues.redhat.com/browse/RHEL-29952 |
To avoid a compiler bug in gcc, use gcc-toolset-12 on rhel8-s390x. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Refs: #3630
To avoid a compiler bug in gcc, use gcc-toolset-12 on rhel8-s390x. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Refs: #3630
To avoid a compiler bug in gcc, use gcc-toolset-12 on rhel8-s390x. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Refs: #3630
I just tried running our V8 CI on rhel8-s390x for
17:37:32 /opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/char_traits.h:431:56: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
17:37:32 431 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
17:37:32 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ From @miladfarca:
For the gn patch, we can possibly roll forwards to main (or at least to a later commit). We pinned before for compatibility for Node.js 14 -- #3335 is open to unpin or update since Node.js 14 is no longer supported. |
To avoid a compiler bug in gcc, use gcc-toolset-12 on rhel8-s390x. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Refs: nodejs#3630
Opened #3659 to roll forward gn and use gcc-toolset-12 on rhel8-s390x. |
To avoid a compiler bug in gcc, use gcc-toolset-12 on rhel8-s390x. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Refs: #3630
To avoid a compiler bug in gcc, use gcc-toolset-12 on rhel8-s390x. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Refs: nodejs#3630
To avoid a compiler bug in gcc, use gcc-toolset-12 on rhel8-s390x. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Refs: #3630
I've merged #3659. It contains a temporary patch to one of the libstdc++ header files for gcc-toolset-12 while we wait for the RPM to be updated (current estimate we were given is "around May"). I'll keep this issue open to remind us to revert 9c149d0 when the fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113960 makes it into gcc-toolset-12. |
gcc-toolset-12 now contains the fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113960. |
@miladfarca has found that there is a nasty gcc bug on s390x with
std::optional has_value()
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355) during review of https://chromium-review.googlesource.com/c/v8/v8/+/5246687 (where V8 is proposing to drop their customv8::base::Optional
forstd::optional
).While the upstream gcc bug has supposedly been fixed in gcc 10.5.0, that isn't available via
dnf
on RHEL 8 asgcc-toolset-10
was "retired" in November 2022 (FWIWgcc-toolset-11
is also considered "retired"), which probably means it is unlikely to get updates (we'll check): https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycleWhat we know so far:
A quick scan of the Node.js codebase shows we are already using
std::optional
outside of V8, although I don't know if we're hitting the bug with those usages.So we're probably going to have to move to at least
gcc-toolset-12
for Linux on s390x, and the only question is when and whether we make the switch for existing release lines to be on the safe side. Switching togcc-toolset-12
should be safe from a runtime compatibility perspective as the code will still be linked against the glibc and libstdc++ versions in base RHEL 8.The text was updated successfully, but these errors were encountered: