-
Notifications
You must be signed in to change notification settings - Fork 31.3k
[help wanted] deps: update V8 to 13.4 #57114
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
Conversation
Review requested:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
PS: @targos we need https://chromium-review.googlesource.com/c/v8/v8/+/6276706 to land to get rid of deprecated string WriteUtf8 function. |
It is worth noting that while there are still a few outstanding bugs to deal with, the |
Thanks for the heads up, I've sent a changeset to v8: https://chromium-review.googlesource.com/c/v8/v8/+/6286748 |
FWIW the mksnapshot crash on AIX is known and there's some discussion in https://chromium-review.googlesource.com/c/v8/v8/+/6261390 (that change was originally to try to get the builds building again on AIX while the cause of the crash is investigated). |
374b329
to
ef3e8f3
Compare
#57727 does not fix the zlib-brotli crashes |
I have updated the list in the OP: #57114 (comment)
@nodejs/platform-smartos @nodejs/platform-arm @nodejs/platform-windows @nodejs/build @nodejs/tsc |
@targos -- Reproduced illumos/SmartOS build failure locally, and it's nearly-or-exactly the same failure you're seeing in Jenkins, which I documented specifically earlier in this PR. The generation of The resultant coredumps of last-time and now have slightly different stacks, but perhaps that's explained by code-changes between last time and now:
I am happy to deep-dive assist in fixing this starting next week Monday. Can't offer earlier because it's both a Triton and SmartOS release week here. |
Tonight's $DAYJOB activities went well enough where I compiled with some v8 debugging enabled, mostly around symbol visibility (I should add CTF into the mix, but that's a bit difficult right this moment). ANYWAY, I fond out that the local build (and likely Jenkins) is tripping the assertion at the very end of I don't know enough about v8 itself to know if I'm missing a forest for the trees, however. Stay tuned! |
About this - I've just rerun the failed test job, and it passed, plus I cannot reproduce it locally. It is potentially a flaky test with a higher chance for flakiness than usual, but it doesn't; look like a constant crashing test. |
The function AllocForBrotli prefixes the allocated memory with its size, and returns a pointer to the region after it. This pointer can however no longer be suitably aligned. Correct this by allocating the maximum of the the size of the size_t and the max alignment. On Arm 32bits the size_t is 4 bytes long, but the alignment is 8 for some NEON instructions. When Brotli is compiled with optimizations enabled newer GCC versions will use the NEON instructions and trigger a bus error killing node. see google/brotli#1159
illumos/SmartOS update. It's kinda long. TL;DR ==> Found a spot with . . . So if I configure the build with:
I get a coredump of
I should probably remove Due to multiple reasons my usual suite of debugging tools still fail me here. I'm gonna see if I can attach CTF data to this build and then I can unleash mdb on it. Speaking of debugging tools and mdb, I HAVE run this with illumos-inherited-from-Solaris libumem(3lib) with full debugging and didn't find anything leaky, use-after-free, or other such memory issues. I may use it with full LOGGING to follow all of the memory allocations in ALSO of interest in the build configured per above, I found a link-time warning in the build of
My demanglement on the coredump shows:
This is likely a side-effect of one of the configuration options I picked above; the stock build shows no such link-time warning at the same place. I'll continue with whatever trick I deem appropriate, and report back. |
Original commit message: [execution] Respect isolate stack limit in GetCentralStackView A stack limit can be set for each v8::Isolate. The limit size can be greater than the one specified with --stack-size. `Heap::CollectGarbage` should not crash due to a `CHECK` on `Isolate::IsOnCentralStack()` with an isolate stack limit. Refs: nodejs#57114 Fixed: 400996806 Bug: 42202153 Change-Id: I80d0826fcd6a64261b8d745f8f47aa096bc83fb8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6329659 Commit-Queue: Chengzhong Wu <cwu631@bloomberg.net> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#99228} Refs: v8/v8@c24df23 Co-authored-by: Michaël Zasso <targos@protonmail.com>
I think I understand why we might have a problem in illumos. I put some printfs in the failing function:
So now I can understand why
Was it the intention to assume that the high 16 bits were always 0? That's not the case in the illumos heap allocator for 64-bit processes. We start at the high end of the virutal address space. This code, BTW, is new with this PR. Some diffs showed me this bit in
I'll need to consult some other illumos folks to make sure I understand things, but I believe we allocate heap from the See https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/i86pc/sys/machparam.h I believe the current system in this PR won't work on illumos. |
Yes. I don't think V8 supports any architectures/platforms where that isn't currently the case. I think you could change |
@@ -53,6 +53,11 @@ | |||
'BUILDING_V8_SHARED', # Make V8_EXPORT visible. | |||
], | |||
}], | |||
['node_target_type=="shared_library"', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the convention is using node_shared=="true"
.
Yeah... I'd noticed in the Look at #57753 as I have more details there. Unless the 13.6 PR is not superceding this one? |
I would like the 13.6 PR to supersede this one but I don't know if it will be ready soon enough |
Can you run the CI on that so we can have a similar todo list like this PR? |
I could but I expect the CI to fail all across the board because of the error in node_mksnapshot |
IN THE MEANTIME I will see if my specially-modified illumos parameters (which made it to the same failure place in the 13.6 branch as @targos 's non-illumos builds did) work better with THIS branch. Stay tuned. |
Well well well... on an illumos (yes specifically SmartOS) system with this kernel parameter changed:
I managed to build this branch successfully. I'm going to focus on how to get v8's tagging to work in a world where most/all pointers have 0xffff as their high bits. |
Until the 13.6 bits start working for non-illumos folks, I've gone ahead with THIS branch to run two concurrent experiments. Note both machines are running 20250403 SmartOS, and both are running the 24.4.1 pkgsrc LTS. These are ahead of the old-enough-to-not-have-modern-madvice() PI/kernel change and the 22.4 or 23.4 pkgsrc LTS the agents we currently offer this project (for older node builds) do. The two experiments are: 1.) Using kernel tuning to blank-out the high 16 bits on userland pointers for amd64. This current succeeds in building node, but 2.) Using a stock kernel with USERLIMIT set to 0xfffffc7fffe00000, but with changes in V8 under review from the AIX team here: https://chromium-review.googlesource.com/c/v8/v8/+/6320599 with a couple of extra illumos mods. I'm still working out the kinks in these illumos mods, but my hope is to get it to as far as the kernel-tuned one, if not even further. As I told the V8 folks, clean documentation of what their expectations of pointers are will help all OS vendors either solve them with runtime changes (there are ld(1) tricks that could be used, and if we don't have them yet, we could stand them up), or with feedback to any project (like I'm trying to do now). Will report back with coredump information from the first experiment's |
Test 1 generated a lot of corefiles, but I suspect those were negative-tests of failure paths. The summary of
|
#57753 is now in a similar state. |
Summary of current issues (I need help for all of them):
--shared
build: https://ci.nodejs.org/job/node-test-commit-linux-containered/49785/nodes=ubuntu2204_sharedlibs_shared_x64/consoleNotable changes:
Atomics.pause
@nodejs/v8-update @nodejs/tsc
Supersedes #56959