New issue
Advanced search Search tips

Issue 596345 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 495204



Sign in to add a comment

vs_toolchain.py update broken again on OS X

Project Member Reported by thakis@chromium.org, Mar 21 2016

Issue description

________ running '/usr/bin/python src/build/vs_toolchain.py update' in '/Users/thakis/src/chrome'
Calculating hash of toolchain in vs_files/a3796183a9fc4d22a687c5212b9c76dbd136d70d. Please wait...
Windows toolchain out of date or doesn't exist, updating (Pro)...
  current_hashes: 8a919de3ef39c334696f9b602dce130e582d1e58
  desired_hash: a3796183a9fc4d22a687c5212b9c76dbd136d70d
Copying gs://chrome-wintoolchain/a3796183a9fc4d22a687c5212b9c76dbd136d70d.zip...
Downloading ...D9f/a3796183a9fc4d22a687c5212b9c76dbd136d70d.zip: 199.57 MiB/199.57 MiB    
Downloading ...D9f/a3796183a9fc4d22a687c5212b9c76dbd136d70d.zip: 199.57 MiB/199.57 MiB    
Downloading ...D9f/a3796183a9fc4d22a687c5212b9c76dbd136d70d.zip: 199.57 MiB/199.57 MiB    
Downloading ...D9f/a3796183a9fc4d22a687c5212b9c76dbd136d70d.zip: 199.57 MiB/199.57 MiB    
Extracting /var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/tmp2umD9f/a3796183a9fc4d22a687c5212b9c76dbd136d70d.zip...
Calculating hash of toolchain in vs_files/a3796183a9fc4d22a687c5212b9c76dbd136d70d. Please wait...
Got wrong hash after pulling a new toolchain. Wanted 'a3796183a9fc4d22a687c5212b9c76dbd136d70d', got one of '8a919de3ef39c334696f9b602dce130e582d1e58'.
Traceback (most recent call last):
  File "src/build/vs_toolchain.py", line 371, in <module>
    sys.exit(main())
  File "src/build/vs_toolchain.py", line 367, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "src/build/vs_toolchain.py", line 329, in Update
    subprocess.check_call(get_toolchain_args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '/Users/thakis/src/depot_tools/win_toolchain/get_toolchain_if_necessary.py', '--output-json', '/Users/thakis/src/chrome/src/build/win_toolchain.json', 'a3796183a9fc4d22a687c5212b9c76dbd136d70d', '--force']' returned non-zero exit status 1
Error: Command '/usr/bin/python src/build/vs_toolchain.py update' returned non-zero exit status 1 in /Users/thakis/src/chrome
Hook '/usr/bin/python src/build/vs_toolchain.py update' took 214.62 secs



(I think I saw a similar error on my Windows box two days ago?)
 

Comment 1 by thakis@chromium.org, Mar 21 2016

Probably the 2015 update + https://codereview.chromium.org/1639623002

Comment 2 by thakis@chromium.org, Mar 21 2016

Status: WontFix (was: Untriaged)
I had SetEnv.cmd open in a vim window, so

src/depot_tools/win_toolchain/vs_files/a3796183a9fc4d22a687c5212b9c76dbd136d70d/win_sdk/bin/.SetEnv.cmd.swp

existed, and that confused the hash computation. I bet the same thing happened on my windows box.
The hash calculation is quite fragile unfortunately and can be thrown off by any little temporary file. windbg has been known to drop symbol files in there which causes problems. A more robust method would be nice.
We exclude (used to exclude?) hidden, system, etc. Adding a few more things that are not-important would be fine I think. (*.swp, startswith('.'), etc.)
I suspect we need to white-list the files that we want to hash, rather than black-listing the files we don't want to hash. The creativity that users can exhibit in dropping down incorrect files is impressive.

Or, perhaps the toolchain should contain a manifest file which is just a list of its contents. That would tell us what to hash and would also let us say exactly what unexpected files were found.

Sign in to add a comment