Skip to content

V8 CI failing on x64 #4462

Description

@richardlau

Consistently failing since https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=benchmark-ubuntu2404-intel-64,v8test=v8test/7350/console yesterday morning.

e.g. https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=benchmark-ubuntu2404-intel-64,v8test=v8test/7353/console

10:36:47 + PATH=/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/depot_tools:/home/iojs/build/workspace/node-test-commit-v8-linux/depot_tools:/home/iojs/venv/bin:/home/iojs/nghttp2/src:/home/iojs/wrk:/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ninja -C out.gn/x64.release/ -j 14 d8 cctest inspector-test
10:36:47 python3_bin_reldir.txt not found. need to initialize depot_tools by
10:36:47 running gclient, update_depot_tools or ensure_bootstrap.
10:36:49 make: *** [Makefile:319: v8] Error 1

Activity

  1. richardlau commented on Sep 9, 2026

    @richardlau
    MemberAuthor
  2. richardlau commented on Sep 9, 2026

    @richardlau
    MemberAuthor

    Might be related to https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/8333927.

    We use

    export 'VPYTHON_BYPASS=manually managed python not supported by chrome operations'
    

    but the above CL has switched fetch and ninja from vpython to the hemetic sealed Python from depot-tools,

    We can also try removing the depot_tools override from https://github.com/nodejs/node/blob/fd6682c8713e0f8c348ffb427ad48ce20378b150/tools/v8/fetch_deps.py#L27-L28

  3. richardlau commented on Sep 9, 2026

    @richardlau
    MemberAuthor

    We can also try removing the depot_tools override from https://github.com/nodejs/node/blob/fd6682c8713e0f8c348ffb427ad48ce20378b150/tools/v8/fetch_deps.py#L27-L28

    I tried removing and separately also rolling forward the override, but those have not fixed the issue.

    I suspect the issue is that because we use VPYTHON_BYPASS we don't pull down the hermetic sealed Python from depot-tools, but https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/8333927 assumes it is there. That CL broke upstream V8 builds on ppc64(le) and s390x which @miladfarca fixed in https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/8367685 but that doesn't affect the general VPYTHON_BYPASS case and has no effect on x64.

  4. richardlau commented on Sep 9, 2026

    @richardlau
    MemberAuthor

    I took a copy of the job and removed (commented out)

    export 'VPYTHON_BYPASS=manually managed python not supported by chrome operations'
    

    but this hasn't fixed the CI either (including with the override rolled forward) (and it breaks ppc64/s390x as expected as it cannot find binaries for those).
    https://ci.nodejs.org/job/richardlau-node-test-commit-v8-linux/781/nodes=benchmark-ubuntu2404-intel-64,v8test=v8test/console

  5. richardlau commented on Sep 15, 2026

    @richardlau
    MemberAuthor

    Interesting datapoint, https://ci.nodejs.org/job/node-test-commit-v8-linux/7371/ for the 22.23.3 proposal has passed (i.e. Node.js 22 does not appear to be affected).

  6. richardlau commented on Sep 16, 2026

    @richardlau
    MemberAuthor

    Ran more builds for the staging branches for comparison:

    branch failing
    main yes
    v26.x-staging yes
    v24.x-staging no
    v22.x-staging no
  7. richardlau commented on Sep 16, 2026

    @richardlau
    MemberAuthor

    So to recap,

    So I think we have two options:

    1. Try to use the hermetic Python from Google. We have never used it and are not pulling it down in the job/Node.js scripts. I don't know what is missing to pull it down and use it on x64.
    2. Try to patch depot_tools ourselves so that we can continue to use external Python. Short term maybe we can carry that patch in Node.js but I'd prefer if we could upstream something.

    I've opened a draft nodejs/node#66070 that patches the python-bin/python3 wrapper in deps/v8/depot_tools:

    diff --git a/tools/v8/node_common.py b/tools/v8/node_common.py
    index f873065c1df..ae40d91f0f9 100755
    --- a/tools/v8/node_common.py
    +++ b/tools/v8/node_common.py
    @@ -6,6 +6,7 @@
     # for py2/py3 compatibility
     from __future__ import print_function
    
    +import fileinput
     import os
     import pipes
     import shutil
    @@ -40,6 +41,16 @@ def EnsureDepotTools(v8_path, fetch_if_not_exist):
       depot_tools = _Get(v8_path)
       assert depot_tools is not None
       print("Using depot tools in %s" % depot_tools)
    +  # Patch python3 wrapper to not depend on Google's hermetic Python.
    +  for line in fileinput.input(files=(os.path.join(depot_tools, "python-bin", "python3")),inplace=True):
    +    sys.stdout.write(line)
    +    if "DEPOT_TOOLS=$(dirname \"$0\")/.." in line:
    +      sys.stdout.write("""
    +if [[ $VPYTHON_BYPASS == \"manually managed python not supported by chrome operations\" ]]
    +then
    +  exec python3 \"$@\"
    +fi
    +""")
       return depot_tools
    
     def UninitGit(v8_path):

    I'm wondering if this patch to the wrapper might be accepted upstream in depot_tools (cc @miladfarca / @nodejs/v8-update )?

    I've previously tested a much simpler change that extended https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/8367685 to also add x86_64 which worked but presumably would not be accepted upstream.

    diff --git a/tools/v8/node_common.py b/tools/v8/node_common.py
    index f873065c1df..c0e567441cb 100755
    --- a/tools/v8/node_common.py
    +++ b/tools/v8/node_common.py
    @@ -6,6 +6,7 @@
     # for py2/py3 compatibility
     from __future__ import print_function
    
    +import fileinput
     import os
     import pipes
     import shutil
    @@ -40,6 +41,9 @@ def EnsureDepotTools(v8_path, fetch_if_not_exist):
       depot_tools = _Get(v8_path)
       assert depot_tools is not None
       print("Using depot tools in %s" % depot_tools)
    +  for line in fileinput.input(files=(os.path.join(depot_tools, "python-bin", "python3")),inplace=True):
    +    line = line.replace("powerpc64le", "powerpc64le | x86_64")
    +    sys.stdout.write(line)
       return depot_tools
    
     def UninitGit(v8_path):

    One question I do not have the answer for at the moment is why the v22.x/v24.x builds continue to work but the v26.x/main ones (including v26.0.0) do not . All of those should be pulling the same depot_tools in deps/v8/depot_tools because we do not specify branches/commit shas in tools/v8/node_common.py.

  8. richardlau commented on Sep 18, 2026

    @richardlau
    MemberAuthor

    Well there's a new complication.

    From @aduh95,

    FYI I've tried nodejs/node#66070 with nodejs/node#65891 in https://ci.nodejs.org/job/node-test-commit-v8-linux/7380/nodes=benchmark-ubuntu2404-intel-64,v8test=v8test/, but it shows

    Error: Command 'git -c color.ui=never checkout --quiet --end-of-options 25c29f04c9127e1ca09e6c1181f74850aa7f118b' returned non-zero  exit status 1 in ./v8/third_party/libpfm4
    error: pathspec '--end-of-options' did not match any file(s) known to git
    

    Would that indicate an incompatible version of git? --end-of-options was added in https://gitlab.com/git-scm/git/-/blob/HEAD/Documentation/RelNotes/2.44.0.adoc

    AFAICT use of --end-of-options has come from https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/8401307. On our V8 CI this is causing the Ubuntu 24.04 x64 build to fail but the RHEL 8 ppc64le and s390x builds still work, which appear to be due to the version of git installed.

    From the CI I ran for nodejs/node#66070, which was before depot_tools adopted --end-of-options,

    17:55:55 git update is recommended.
    17:55:55 Installed git version is 2.43.0;
    17:55:55 depot_tools recommends version 2.46.0 or later.
    17:55:55 Disable this warning by setting the GCLIENT_SUPPRESS_GIT_VERSION_WARNING
    17:55:55 environment variable to 1.
    
    17:58:00 git update is recommended.
    17:58:00 Installed git version is 2.43.7;
    17:58:00 depot_tools recommends version 2.46.0 or later.
    17:58:00 Disable this warning by setting the GCLIENT_SUPPRESS_GIT_VERSION_WARNING
    17:58:00 environment variable to 1.
    

    so the version of git on Ubuntu 24.04 is slightly older than the one in RHEL 8, but both are less than the depot_tools recommended version. We may need to track separately updating the machines we run the V8 CI on (both Ubuntu 26.04 and RHEL 9 have later versions of git than the recommended git 2.46.0), but for now I'm going to experiment with how we're checking out depot_tools in the job.

    I think we can eliminate the checkout of depot_tools in depot_tools (in the workspace root). My plan is to try:

    1. Have the job clone into deps/v8/depot_tools which is where the second clone (from the scripts in tools/v8) would be.
    2. Checkout the version of depot_tools according to:
      a. Any override in tools/v8/fetch_deps.py (see deps: V8: override depot_tools version node#62344). (Incidentally I think we can remove the override on main/v26.x now.)
      b. deps/v8/DEPS

    EnsureDepotTools() from tools/v8/node_common.py would find the existing gclient.py in deps/v8/depot_tools and reuse that without doing a fresh clone.

  9. richardlau commented on Sep 18, 2026

    @richardlau
    MemberAuthor

    Added this to the job:

    git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git deps/v8/depot_tools
    # find the commit sha from any override, or from V8's DEPS.
    DEPOT_TOOLS_VERSION=$(awk '/depot_tools\.git/ { split($NF, arr, "@"); print arr[2] }' tools/v8/fetch_deps.py | tr -d [[:punct:]])
    if [ -z "${DEPOT_TOOLS_VERSION}" ]; then
      DEPOT_TOOLS_VERSION=$(awk '/depot_tools\.git/ { print $NF }' deps/v8/DEPS | tr -d [[:punct:]])
    fi
    git -C deps/v8/depot_tools checkout ${DEPOT_TOOLS_VERSION}
    

    Test runs:

  10. richardlau commented on Sep 18, 2026

    @richardlau
    MemberAuthor

    a. Any override in tools/v8/fetch_deps.py (see deps: V8: override depot_tools version node#62344). (Incidentally I think we can remove the override on main/v26.x now.)

    Opened nodejs/node#66110 to remove the override. While it's not directly affecting the problems in this issue, it might cause complications for future V8 updates if we're overriding (i.e. pinning) to older versions of depot_tools.

  11. miladfarca commented on Sep 24, 2026

    @miladfarca
    Contributor

    Created a CL to add an env variable for bypassing hermetic python: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/8434299
    Once it land you can do DEPOT_TOOLS_BOOTSTRAP_PYTHON3=0 fetch v8.

  12. miladfarca commented on Sep 25, 2026

    @miladfarca
    Contributor

    Cl has now landed.

  13. richardlau commented on Sep 30, 2026

    @richardlau
    MemberAuthor

    I've set

    export DEPOT_TOOLS_BOOTSTRAP_PYTHON3=0
    

    in the V8 job.

    I've tested in https://ci.nodejs.org/job/richardlau-node-test-commit-v8-linux/788/nodes=benchmark-ubuntu2404-intel-64,v8test=v8test/console without the change from #4462 (comment) (so we use the HEAD of depot_tools).

    I have left the change from #4462 (comment) in node-test-commit-v8-linux (in addition to setting the environment variable) to avoid any other future surprises (at least until we test later versions of V8).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions