Skip to content

deps: backport V8 upstream fix for loong64 opcode 209#63731

Open
Javonne-liu wants to merge 1 commit into
nodejs:mainfrom
Javonne-liu:fix-loong64-v8-opcode-209
Open

deps: backport V8 upstream fix for loong64 opcode 209#63731
Javonne-liu wants to merge 1 commit into
nodejs:mainfrom
Javonne-liu:fix-loong64-v8-opcode-209

Conversation

@Javonne-liu

@Javonne-liu Javonne-liu commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Fixes: #63721

LoongArch64 CI is in a failed state (https://ci.nodejs.org/job/node-test-commit-loongarch64/nodes=clfs23-64/1031/)

Always reproduces on LoongArch64 when executing the make out/doc/api/addons.html command.

Error Log:

[loongarch@90 node]$ make out/doc/api/addons.html
npm warn cli npm v11.16.0 does not support Node.js v27.0.0-pre. This version of npm supports the following node versions: `^20.17.0 || >=22.9.0`. You can find the latest version at https://nodejs.org/.

added 369 packages, and audited 371 packages in 10s

142 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
mkdir -p out/doc/api
cp -r doc/api out/doc
AssembleArchSelect Unimplemented arch_opcode is : 209
UNIMPLEMENTED code_generator_loong64: AssembleArchSelect at line 4732


#
# Fatal error in , line 0
# unimplemented code
#
#
#
#FailureMessage Object: 0x7fffee5105c0
----- Native stack trace -----

 1: 0x5555571b1748  [/home/loongarch/liujh/node/node]
 2: 0x5555596649f0 V8_Fatal(char const*, ...) [/home/loongarch/liujh/node/node]
 3: 0x555559d00344  [/home/loongarch/liujh/node/node]
 4: 0x55555a075db0  [/home/loongarch/liujh/node/node]
 5: 0x55555a0776bc  [/home/loongarch/liujh/node/node]
 6: 0x555559813558  [/home/loongarch/liujh/node/node]
 7: 0x55555981efd8  [/home/loongarch/liujh/node/node]
 8: 0x55555979c5c4  [/home/loongarch/liujh/node/node]
 9: 0x55555803e38c  [/home/loongarch/liujh/node/node]
10: 0x55555804feb4  [/home/loongarch/liujh/node/node]
11: 0x555558051b00  [/home/loongarch/liujh/node/node]
12: 0x5555588ac85c  [/home/loongarch/liujh/node/node]
13: 0x5555571b2774  [/home/loongarch/liujh/node/node]
14: 0x7fffeff7a454  [/usr/lib64/libc.so.6]
15: 0x7fffeffff8cc  [/usr/lib64/libc.so.6]
make: *** [Makefile:886: out/doc/api/addons.html] Error 133

This has been fixed in the latest commit for the v8 loong64 architecture.
(Ref: https://chromium-review.googlesource.com/c/v8/v8/+/7801520).
review.googlesource.com/c/v8/v8/+/7801520)。
I verified this locally by patching deps/v8. With the patch applied, make out/doc/api/addons.html runs successfully and the crash is completely resolved.

Origin commit message:

    [loong64][compiler] Extend Word64Select instruction functionality
    
    Change-Id: Iba762777642d2d2d3aa904f9afc1e9005139992e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7801520
    Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
    Commit-Queue: Liu Yu <liuyu@loongson.cn>
    Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
    Auto-Submit: Liu Yu <liuyu@loongson.cn>
    Cr-Commit-Position: refs/heads/main@{#107619}

Refs: v8/v8@c4d06ba

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Jun 3, 2026
@Javonne-liu Javonne-liu force-pushed the fix-loong64-v8-opcode-209 branch 3 times, most recently from 3db807e to d51bfac Compare June 3, 2026 09:21
@Renegade334

Copy link
Copy Markdown
Member

@Javonne-liu Javonne-liu force-pushed the fix-loong64-v8-opcode-209 branch from d51bfac to dcf6977 Compare June 10, 2026 06:16
Original commit message:

    [loong64][compiler] Extend Word64Select instruction functionality

    Change-Id: Iba762777642d2d2d3aa904f9afc1e9005139992e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7801520
    Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
    Commit-Queue: Liu Yu <liuyu@loongson.cn>
    Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
    Auto-Submit: Liu Yu <liuyu@loongson.cn>
    Cr-Commit-Position: refs/heads/main@{#107619}

Refs: v8/v8@c4d06ba
Co-authored-by: liujiahui <liujiahui@loongson.cn>
@Javonne-liu Javonne-liu force-pushed the fix-loong64-v8-opcode-209 branch from dcf6977 to 136cba3 Compare June 10, 2026 10:01
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Renegade334

Copy link
Copy Markdown
Member

We don't run V8 CI on loong64, but presumably make doc-only now runs OK for you on the PR branch?

@Renegade334 Renegade334 added the loong64 Issues and PRs related to the loong64 architecture. label Jun 10, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Javonne-liu

Copy link
Copy Markdown
Contributor Author

We don't run V8 CI on loong64, but presumably make doc-only now runs OK for you on the PR branch?我们没有在 loong64 上运行 V8 CI,但想必现在在 PR 分支上 make doc-only 操作对您来说没问题了吧?

Thank you so much for the guidance and for reviewing this!@Renegade334
I have updated the PR following the recommended git node v8 backport process.
I manually verified it locally. The doc build (make out/doc/api/addons.html) runs smoothly and completes successfully on my loong64 machine.

[loongarch@90 node]$ make out/doc/api/addons.html
npm warn cli npm v11.16.0 does not support Node.js v27.0.0-pre. This version of npm supports the following node versions: `^20.17.0 || >=22.9.0`. You can find the latest version at https://nodejs.org/.

added 369 packages, and audited 371 packages in 10s

142 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
mkdir -p out/doc/api
cp -r doc/api out/doc
[loongarch@90 node]$ make out/doc/api/addons.html
make: 'out/doc/api/addons.html' is up to date.

Really appreciate your patience and help!

@kuangxingye-design

This comment has been minimized.

@Renegade334 Renegade334 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. loong64 Issues and PRs related to the loong64 architecture. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LoongArch64] Execution crash: V8 Fatal error "AssembleArchSelect Unimplemented arch_opcode is : 209"

5 participants