Problems building chrome on Mac - gclient sync fails

514 views
Skip to first unread message

Pete Williamson

unread,
Aug 11, 2023, 11:45:10 AM8/11/23
to Chromium-dev
gclient sync keeps failing for me - how do I get past this?  (error text below)

Context / what I've tried:
I'm setting up to build chrome on my MacBook.  I've tried it from home over my home WiFi and at the office over work WiFi, and even wired at the office.  I've tried both fetch chrome and fetch chromium, they both seem to fail the same way.  After each failure, I cleaned out the src directory and removed any files starting with .gclient before trying again.  I've tried pre-creating the chromium/src directory, and also without pre-creating it.

I'm following the instructions here and here.

As best I can tell, gclient sync is determining that a some directories are bad, and moving them to _bad_scm, and then it eventually errors out.  It seems suspicious that I get a FATAL error early on, but then the process continues for another hour or so before giving up.

I tried searching on moma and public facing google, but none of the hits seemed similar to me.

Here is the output when it fails, I've marked parts in red that seem suspicious to me:
This is from a run on my home network

petewil ~/Source/chromium$ fetch chromium

Running: gclient root

Running: gclient config --spec 'solutions = [

  {

    "name": "src",

    "url": "https://chromium.googlesource.com/chromium/src.git",

    "managed": False,

    "custom_deps": {},

    "custom_vars": {},

  },

]

'

Updating depot_tools...

update 3435fce1653aa1d611c2834901561be7e6ccfab0@1686192619@/Users/petewil/Source/depot_tools/.cipd_bin/compiler_proxy -> 3435fce1653aa1d611c2834901561be7e6ccfab0@1686192619@/Users/petewil/Source/depot_tools/.cipd_bin/compiler_proxy, skip restart

Running: gclient sync

Updating depot_tools...

update 3435fce1653aa1d611c2834901561be7e6ccfab0@1686192619@/Users/petewil/Source/depot_tools/.cipd_bin/compiler_proxy -> 3435fce1653aa1d611c2834901561be7e6ccfab0@1686192619@/Users/petewil/Source/depot_tools/.cipd_bin/compiler_proxy, skip restart


________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /Users/petewil/Source/chromium/_gclient_src_kvo8fgsf' in '/Users/petewil/Source/chromium'

Cloning into '/Users/petewil/Source/chromium/_gclient_src_kvo8fgsf'...

error: RPC failed; HTTP 499 curl 56 Recv failure: Connection reset by peer

fatal: expected 'packfile'

1>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src.git" "/Users/petewil/Source/chromium/_gclient_src_kvo8fgsf"' in /Users/petewil/Source/chromium failed; will retry after a short nap...


________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /Users/petewil/Source/chromium/_gclient_src_kvo8fgsf' in '/Users/petewil/Source/chromium' attempt 2 / 2

Cloning into '/Users/petewil/Source/chromium/_gclient_src_kvo8fgsf'...

error: RPC failed; curl 56 Recv failure: Connection reset by peer

fatal: expected 'packfile'

1>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src.git" "/Users/petewil/Source/chromium/_gclient_src_kvo8fgsf"' in /Users/petewil/Source/chromium failed; will retry after a short nap...

Syncing projects: 100% ( 1/ 1) src

src (ERROR)

----------------------------------------

[0:00:00] Started.

[0:00:29] 

Traceback (most recent call last):

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 1207, in _Clone

    self._Run(clone_cmd,

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 1553, in _Run

    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 715, in CheckCallAndFilter

    raise subprocess2.CalledProcessError(

subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /Users/petewil/Source/chromium/_gclient_src_kvo8fgsf' returned non-zero exit status 128 in /Users/petewil/Source/chromium

[3:08:14] _____ Conflicting directory found in /Users/petewil/Source/chromium/src. Moving to /Users/petewil/Source/chromium/_bad_scm/srci91mdayq.

----------------------------------------



Warnings:

Conflicting directory /Users/petewil/Source/chromium/src moved to /Users/petewil/Source/chromium/_bad_scm/srci91mdayq.

Traceback (most recent call last):

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 683, in update

    self._Clone(revision, url, options)

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 1207, in _Clone

    self._Run(clone_cmd,

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 1553, in _Run

    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 715, in CheckCallAndFilter

    raise subprocess2.CalledProcessError(

subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /Users/petewil/Source/chromium/_gclient_src_kvo8fgsf' returned non-zero exit status 128 in /Users/petewil/Source/chromium


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/Users/petewil/.vpython-root/238ef0/lib/python3.8/shutil.py", line 791, in move

    os.rename(src, real_dst)

FileNotFoundError: [Errno 2] No such file or directory: '/Users/petewil/Source/chromium/src' -> '/Users/petewil/Source/chromium/_bad_scm/srci91mdayq/src'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/Users/petewil/Source/depot_tools/metrics.py", line 301, in print_notice_and_exit

    yield

  File "/Users/petewil/Source/depot_tools/gclient.py", line 3748, in <module>

    sys.exit(main(sys.argv[1:]))

  File "/Users/petewil/Source/depot_tools/gclient.py", line 3734, in main

    return dispatcher.execute(OptionParser(), argv)

  File "/Users/petewil/Source/depot_tools/subcommand.py", line 252, in execute

    return command(parser, args[1:])

  File "/Users/petewil/Source/depot_tools/gclient.py", line 3252, in CMDsync

    ret = client.RunOnDeps('update', args)

  File "/Users/petewil/Source/depot_tools/gclient.py", line 2145, in RunOnDeps

    work_queue.flush(revision_overrides,

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 1016, in flush

    reraise(e[0], e[1], e[2])

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 70, in reraise

    raise value

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 1093, in run

    self.item.run(*self.args, **self.kwargs)

  File "/Users/petewil/Source/depot_tools/gclient.py", line 1117, in run

    self._got_revision = self._used_scm.RunCommand(command, options, args,

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 128, in RunCommand

    return getattr(self, command)(options, args, file_list)

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 580, in wrapper

    return_val = f(*args)

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 686, in update

    self._DeleteOrMove(options.force)

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 203, in _DeleteOrMove

    shutil.move(self.checkout_path, dest_path)

  File "/Users/petewil/.vpython-root/238ef0/lib/python3.8/shutil.py", line 811, in move

    copy_function(src, real_dst)

  File "/Users/petewil/.vpython-root/238ef0/lib/python3.8/shutil.py", line 435, in copy2

    copyfile(src, dst, follow_symlinks=follow_symlinks)

  File "/Users/petewil/.vpython-root/238ef0/lib/python3.8/shutil.py", line 264, in copyfile

    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:

FileNotFoundError: [Errno 2] No such file or directory: '/Users/petewil/Source/chromium/src'


Subprocess failed with return code 1.

petewil ~/Source/chromium$ 





Here is the output from a wired connection to google corpnet

petewil ~/Source/chromium$ fetch chrome

Running: gclient root

Running: gclient config --spec 'solutions = [

  {

    "name": "src",

    "url": "https://chromium.googlesource.com/chromium/src.git",

    "managed": False,

    "custom_deps": {},

    "custom_vars": {'"'"'checkout_src_internal'"'"': True},

  },

]

'

Updating depot_tools...

update 3435fce1653aa1d611c2834901561be7e6ccfab0@1686192619@/Users/petewil/Source/depot_tools/.cipd_bin/compiler_proxy -> 3435fce1653aa1d611c2834901561be7e6ccfab0@1686192619@/Users/petewil/Source/depot_tools/.cipd_bin/compiler_proxy, skip restart

Running: gclient sync

Updating depot_tools...

update 3435fce1653aa1d611c2834901561be7e6ccfab0@1686192619@/Users/petewil/Source/depot_tools/.cipd_bin/compiler_proxy -> 3435fce1653aa1d611c2834901561be7e6ccfab0@1686192619@/Users/petewil/Source/depot_tools/.cipd_bin/compiler_proxy, skip restart


________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /Users/petewil/Source/chromium/_gclient_src_hdz8d0oh' in '/Users/petewil/Source/chromium'

Cloning into '/Users/petewil/Source/chromium/_gclient_src_hdz8d0oh'...

remote: Finding sources: 100% (5188/5188)

error: RPC failed; curl 56 Recv failure: Network is down 22.00 KiB/s 

error: 35646 bytes of body are still expected

fetch-pack: unexpected disconnect while reading sideband packet

fatal: early EOF

fatal: fetch-pack: invalid index-pack output

1>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src.git" "/Users/petewil/Source/chromium/_gclient_src_hdz8d0oh"' in /Users/petewil/Source/chromium failed; will retry after a short nap...


________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /Users/petewil/Source/chromium/_gclient_src_hdz8d0oh' in '/Users/petewil/Source/chromium' attempt 2 / 2

Cloning into '/Users/petewil/Source/chromium/_gclient_src_hdz8d0oh'...

error: RPC failed; curl 56 Recv failure: Operation timed out

fatal: expected 'packfile'

1>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src.git" "/Users/petewil/Source/chromium/_gclient_src_hdz8d0oh"' in /Users/petewil/Source/chromium failed; will retry after a short nap...

Syncing projects: 100% ( 1/ 1) src

src (ERROR)

----------------------------------------

[0:00:00] Started.

[0:00:43] 

Traceback (most recent call last):

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 1207, in _Clone

    self._Run(clone_cmd,

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 1553, in _Run

    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 715, in CheckCallAndFilter

    raise subprocess2.CalledProcessError(

subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /Users/petewil/Source/chromium/_gclient_src_hdz8d0oh' returned non-zero exit status 128 in /Users/petewil/Source/chromium

[2:14:06] _____ Conflicting directory found in /Users/petewil/Source/chromium/src. Moving to /Users/petewil/Source/chromium/_bad_scm/srcvbqx4qel.

----------------------------------------



Warnings:

Conflicting directory /Users/petewil/Source/chromium/src moved to /Users/petewil/Source/chromium/_bad_scm/srcvbqx4qel.

Traceback (most recent call last):

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 683, in update

    self._Clone(revision, url, options)

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 1207, in _Clone

    self._Run(clone_cmd,

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 1553, in _Run

    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 715, in CheckCallAndFilter

    raise subprocess2.CalledProcessError(

subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /Users/petewil/Source/chromium/_gclient_src_hdz8d0oh' returned non-zero exit status 128 in /Users/petewil/Source/chromium


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/Users/petewil/.vpython-root/238ef0/lib/python3.8/shutil.py", line 791, in move

    os.rename(src, real_dst)

FileNotFoundError: [Errno 2] No such file or directory: '/Users/petewil/Source/chromium/src' -> '/Users/petewil/Source/chromium/_bad_scm/srcvbqx4qel/src'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/Users/petewil/Source/depot_tools/metrics.py", line 301, in print_notice_and_exit

    yield

  File "/Users/petewil/Source/depot_tools/gclient.py", line 3746, in <module>

    sys.exit(main(sys.argv[1:]))

  File "/Users/petewil/Source/depot_tools/gclient.py", line 3732, in main

    return dispatcher.execute(OptionParser(), argv)

  File "/Users/petewil/Source/depot_tools/subcommand.py", line 252, in execute

    return command(parser, args[1:])

  File "/Users/petewil/Source/depot_tools/gclient.py", line 3250, in CMDsync

    ret = client.RunOnDeps('update', args)

  File "/Users/petewil/Source/depot_tools/gclient.py", line 2145, in RunOnDeps

    work_queue.flush(revision_overrides,

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 1016, in flush

    reraise(e[0], e[1], e[2])

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 70, in reraise

    raise value

  File "/Users/petewil/Source/depot_tools/gclient_utils.py", line 1093, in run

    self.item.run(*self.args, **self.kwargs)

  File "/Users/petewil/Source/depot_tools/gclient.py", line 1117, in run

    self._got_revision = self._used_scm.RunCommand(command, options, args,

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 128, in RunCommand

    return getattr(self, command)(options, args, file_list)

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 580, in wrapper

    return_val = f(*args)

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 686, in update

    self._DeleteOrMove(options.force)

  File "/Users/petewil/Source/depot_tools/gclient_scm.py", line 203, in _DeleteOrMove

    shutil.move(self.checkout_path, dest_path)

  File "/Users/petewil/.vpython-root/238ef0/lib/python3.8/shutil.py", line 811, in move

    copy_function(src, real_dst)

  File "/Users/petewil/.vpython-root/238ef0/lib/python3.8/shutil.py", line 435, in copy2

    copyfile(src, dst, follow_symlinks=follow_symlinks)

  File "/Users/petewil/.vpython-root/238ef0/lib/python3.8/shutil.py", line 264, in copyfile

    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:

FileNotFoundError: [Errno 2] No such file or directory: '/Users/petewil/Source/chromium/src'


Subprocess failed with return code 1.


Nico Weber

unread,
Aug 11, 2023, 11:51:21 AM8/11/23
to pet...@google.com, Chromium-dev
What's the output of `which git`, `file $(which git)`, and `git --version`?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/fdbedb92-9fc8-410c-8bcc-3479a409d7ccn%40chromium.org.

Pete Williamson

unread,
Aug 11, 2023, 1:31:08 PM8/11/23
to Nico Weber, Chromium-dev

petewil ~/Source/chromium$ which git

/usr/local/git/current/bin/git

petewil ~/Source/chromium$ git --version

git version 2.41.0.640.ga95def55d0-goog

petewil ~/Source/chromium$ 

Pete Williamson

unread,
Aug 11, 2023, 1:31:27 PM8/11/23
to Nico Weber, Chromium-dev

petewil ~/Source/chromium$ file $(which git)

/usr/local/git/current/bin/git: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]

/usr/local/git/current/bin/git (for architecture x86_64): Mach-O 64-bit executable x86_64

/usr/local/git/current/bin/git (for architecture arm64): Mach-O 64-bit executable arm64

petewil ~/Source/chromium$ 

Pete Williamson

unread,
Aug 11, 2023, 1:50:57 PM8/11/23
to Nico Weber, Chromium-dev
Since you asked about git, I thought my path might also be interesting - it looks like depot_tools is first on the path

petewil ~/Source/chromium$ env | grep PATH

PATH=/Users/petewil/Source/depot_tools:/usr/local/git/git-google/bin:/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin

Pete Williamson

unread,
Aug 22, 2023, 1:38:02 PM8/22/23
to Nico Weber, Chromium-dev
Gclient sync is still failing for me - Any suggestions on how to debug this?
Reply all
Reply to author
Forward
0 new messages