New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 867819 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Unable to do gclient sync on mips64le

Reported by wangqing...@loongson.cn, Jul 26

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3189.0 Safari/537.36

Steps to reproduce the problem:
1.  fetch chromium

What is the expected behavior?

What went wrong?
$ download_from_google_storage --no_resum --extract --no_auth --bucket chromium-fonts -s third_party/test_fonts/test_fonts.tar.gz.sha1
0> Failed to fetch file gs://chromium-fonts/a22de844e32a3f720d219e3911c3da3478039f89 for third_party/test_fonts/test_fonts.tar.gz, skipping. [Err: /home/loongson/work/depot_tools/vpython: line 42: /home/loongson/work/depot_tools/.cipd_bin/vpython: No such file or directory
]
Failed to fetch file gs://chromium-fonts/a22de844e32a3f720d219e3911c3da3478039f89 for third_party/test_fonts/test_fonts.tar.gz. [Err: /home/loongson/work/depot_tools/vpython: line 42: /home/loongson/work/depot_tools/.cipd_bin/vpython: No such file or directory
]
Downloading 1 files took 127.688353 second(s)

Did this work before? N/A 

Chrome version: 62.0.3189.0  Channel: n/a
OS Version: OS X 10.13.2
Flash Version: 

running ./cpid from depot_tools on mips64 and occur errors as follows:
$ ./cipd
./cipd: line 111: ./.cipd_client: cannot execute binary file
selfupdate failed: run `CIPD_HTTP_USER_AGENT_PREFIX=depot_tools/962f0d9f21567cb97223c940ba5b1dc7db7ce75b/manual ./.cipd_client selfupdate -version 'git_revision:521b9b64770d3b43a221b1e2bd277687616adacf'` to diagnose

./cipd: line 133: /home/loongson/work/depot_tools/.cipd_client: cannot execute binary file
./cipd: line 133: /home/loongson/work/depot_tools/.cipd_client: 

$ file .cipd_client
.cipd_client: ELF 64-bit MSB executable, MIPS, MIPS-III version 1 (SYSV), statically linked, with debug_info, not stripped
.cipd_client is MIPS-III not MIPS64 rel2
 
 Issue 867817  has been merged into this issue.
Components: -Platform>DevTools Build
Cc: vadimsh@chromium.org iannucci@chromium.org
Components: -Build Infra>Platform>CIPD
I'm not sure which part of this your asking for help with (all of the issues)?
cipd is a Go binary cross-compiled using GOOS=linux GOARCH=mips64. I don't know enough about mips to say why it doesn't work.
Can we verify that the cipd bootstrap in depot_tools fetched the mips64 version and not the mips version? It's possible it doesn't know how to generate the platform correctly in the bash script. See the //depot_tools/cipd script.
it looks like it's looking at $UNAME:

    mips*)
    ARCH=$UNAME

What's $UNAME on your machine?
er... whats

  uname -m | tr '[:upper:]' '[:lower:]'

on your machine :)
also RE: vpython, the python wheels it downloads are cross-compiled for mips64, but it's similarly a best-effort scenario, we don't actually have any mips64 machines which use them. If you run into trouble with vpython, you can set:

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

(which is checked by https://chromium.googlesource.com/chromium/tools/depot_tools/+/master/vpython)

And then just install any missing python wheels to your system python (or a python virtualenv, as you like). The list of python wheels chromium will try to grab are listed here:

  https://chromium.googlesource.com/chromium/src.git/+/master/.vpython
Ah, vadim pointed out that we ONLY have a cipd client for `GOOS=linux GOARCH=mips64` for mips. If the bootstrap script is downloading anything at all, it's downloading that version.

I think the best thing to do would be for you to figure out which GOOS/GOARCH values produce working go builds on your platform. If you have a package manger with go in it, try running:

cat > file.go <<EOF
package main
import "runtime"
import "fmt"
func main() {
  fmt.Println("GOOS", runtime.GOOS)
  fmt.Println("GOARCH", runtime.GOARCH)
}
EOF
go run file.go

And see what it prints out.
comment #7.  mips64
comment #9.
[loongson@localhost ~]$ go run file.go 
GOOS linux
GOARCH mips64le

Thanks!
Do you have plans to add a cipd client for `GOOS=linux GOARCH=mips64le` for mips?

If I provide support, then what do I need to provide?

Thanks!
Owner: vadimsh@chromium.org
Status: Assigned (was: Unconfirmed)
Summary: Unable to do gclient sync on mips64le (was: Unable to do gclient sync on mips64)
Yeah, we'll add mips64le support. It is relatively simple.

It will be two stages:
1. Start cross-compiling binaries for mips64le (https://chromium-review.googlesource.com/c/infra/infra/+/1157563).
2. Deploy new versions to depot_tools (this will happen later this week, but you'll be able to start experimenting earlier by modifying https://chromium.googlesource.com/chromium/tools/depot_tools/+/master/cipd_client_version and https://chromium.googlesource.com/chromium/tools/depot_tools/+/master/cipd_manifest.txt locally to supply git_revision:... of versions that have mips64le variant. I'll provide concrete details once (1) lands and builders build the new version).
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 1

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/38969c0b6e125aef2f91251ba373557af9ed154e

commit 38969c0b6e125aef2f91251ba373557af9ed154e
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Wed Aug 01 00:59:17 2018

[cipd] Build all packages that we build for mips64 also for mips64le.

R=iannucci@chromium.org
BUG= 867819 

Change-Id: I9bba2fc5213d9021b998fbd672040d3635e19880
Reviewed-on: https://chromium-review.googlesource.com/1157563
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>

[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/README.md
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/vpython.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/luci-auth.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/cipd_client.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/build.py
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/recipes/README.recipes.md
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/logdog_butler.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/prpc.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/vpython-native.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/led.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/kitchen.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/recipes/recipes/infra_continuous.py
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/logdog_annotee.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/luci_machine_tokend.yaml
[modify] https://crrev.com/38969c0b6e125aef2f91251ba373557af9ed154e/build/packages/git.yaml

Thanks!

I‘m trying to cross-compile the cipd_client binary for mips64le in infra and
familiar with the build process inside at now.


mips64le packages have been built.

Please apply this patch locally and resolve the TODO in 'cipd' script (detection of mips64le vs mips64 using nothing but standard Linux tools): https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1157909

To test it, just run "./cipd help". It will try to bootstrap the cipd client and eventually (probably) fail, since it will install 'mips64' instead of 'mips64le'. Thus the TODO.

Once you fixed the TODO, please send the patch for 'cipd' script for review to me and iannucci@chromium.org. See https://chromium.googlesource.com/chromium/tools/depot_tools/#contributing (you may also need to sign Contributor License Agreement first if you haven't done this before, otherwise Gerrit won't allow you to upload the patch, see https://www.chromium.org/developers/contributing-code#TOC-Legal-stuff).

pull .cipd_client from: https://chrome-infra-packags.appspot.com/client?platform=linux-mips64le&version=git_revision:b95687a07fc680eb1fe0e8d8f976167e22b53bb9

but the .cipd_client also is:
.cipd_client: ELF 64-bit LSB executable, MIPS, MIPS-III version 1 (SYSV), statically linked, with debug_info, not stripped

Are you sure is mips64le packages?
All I can say it was built on Linux amd64 host with GOOS=linux and GOARCH=mips64le.

Here's some indirect confirmation: https://gist.github.com/vadimsht/85faeaa7489f55f7de500aa7f0fa889d

Here's more:
https://gist.github.com/vadimsht/faf1fc280e341e30cce3b7801b589485

I have no idea why it doesn't work :( 

Can you upload somewhere (e.g. attach a file to the comment here) a binary built by Go on your mips64 machine, so I can examine it and maybe try to figure out how to cross-compile into such format?
Nothing, I just found that the binary format is the same as the previous MIPS64,But it can run on mips64le.

I fixed the TODO, and pull a patch: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1159545

Can you look at it?
Project Member

Comment 20 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/82bb756217cd542205ee89d87bc0f17e2bce52b0

commit 82bb756217cd542205ee89d87bc0f17e2bce52b0
Author: Wang Qing <wangqing-hf@loongson.cn>
Date: Fri Aug 03 21:45:46 2018

[cipd] Detect mips64le vs mips64.

Bug:  867819 
Change-Id: Iff107adb7efe366c5ab58f5221c1b9bf3ebb7d5f
Reviewed-on: https://chromium-review.googlesource.com/1159545
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>

[modify] https://crrev.com/82bb756217cd542205ee89d87bc0f17e2bce52b0/cipd

Project Member

Comment 21 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bdaec059bc5edb610602669c61985402e8b321fe

commit bdaec059bc5edb610602669c61985402e8b321fe
Author: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Fri Aug 03 23:42:12 2018

Roll src/third_party/depot_tools 29b7b99e5d9f..82bb756217cd (1 commits)

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/29b7b99e5d9f..82bb756217cd


git log 29b7b99e5d9f..82bb756217cd --date=short --no-merges --format='%ad %ae %s'
2018-08-03 wangqing-hf@loongson.cn [cipd] Detect mips64le vs mips64.


Created with:
  gclient setdep -r src/third_party/depot_tools@82bb756217cd

The AutoRoll server is located here: https://depot-tools-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:867819 
TBR=agable@chromium.org

Change-Id: I79597c067ff1691bc025b43a2d9c2499d5be98cb
Reviewed-on: https://chromium-review.googlesource.com/1162801
Reviewed-by: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#580705}
[modify] https://crrev.com/bdaec059bc5edb610602669c61985402e8b321fe/DEPS

Project Member

Comment 22 by bugdroid1@chromium.org, Aug 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/333617bc86fef3ec7b4612d35eba8a36f531a86a

commit 333617bc86fef3ec7b4612d35eba8a36f531a86a
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Tue Aug 07 20:46:38 2018

[cipd] Bump versions of all CIPD packages + add mips(64)le platform support.

New packages are built using SHA256 as instance ID (instead of SHA1).

R=iannucci@chromium.org
BUG=821194,  867819 ,  813782 

Change-Id: I61cf71386975725f7f63097eeb62f094ff50e396
Reviewed-on: https://chromium-review.googlesource.com/1165598
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>

[modify] https://crrev.com/333617bc86fef3ec7b4612d35eba8a36f531a86a/cipd_client_version
[modify] https://crrev.com/333617bc86fef3ec7b4612d35eba8a36f531a86a/PRESUBMIT.py
[modify] https://crrev.com/333617bc86fef3ec7b4612d35eba8a36f531a86a/cipd_manifest.txt

Project Member

Comment 23 by bugdroid1@chromium.org, Aug 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e431b5849d58bd38cb65a33d05af7691deafc6d1

commit e431b5849d58bd38cb65a33d05af7691deafc6d1
Author: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Wed Aug 08 02:48:27 2018

Roll src/third_party/depot_tools 2ebf9fdade33..735f71d95bcb (2 commits)

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/2ebf9fdade33..735f71d95bcb


git log 2ebf9fdade33..735f71d95bcb --date=short --no-merges --format='%ad %ae %s'
2018-08-08 hinoka@google.com [recipe_modules] Copy over windows_sdk from infra.git
2018-08-07 vadimsh@chromium.org [cipd] Bump versions of all CIPD packages + add mips(64)le platform support.


Created with:
  gclient setdep -r src/third_party/depot_tools@735f71d95bcb

The AutoRoll server is located here: https://depot-tools-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG=chromium:821194, chromium:867819 , chromium:813782 
TBR=agable@chromium.org

Change-Id: I59662e6c61ccb156e85b00733e6c1e4668c703b1
Reviewed-on: https://chromium-review.googlesource.com/1166343
Reviewed-by: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#581448}
[modify] https://crrev.com/e431b5849d58bd38cb65a33d05af7691deafc6d1/DEPS

Status: Fixed (was: Assigned)
I think this is fixed now (to the extend it could be fixed, i.e. all go binaries used by depot_tools are cross-compiled to mips64le and available).

Sign in to add a comment