New issue
Advanced search Search tips

Issue 383340 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 4
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature

Blocked on:
issue 917355
issue 897969
issue 897970

Blocking:
issue 314403



Sign in to add a comment

Make Android ninja build deterministic

Project Member Reported by mar...@chromium.org, Jun 11 2014

Issue description

1. Learn about android build system.
2. ninja -C out/Release clank_unittests
3. ren out out2
4. gclient runhooks
5. ninja -C out/Release clank_unittests

Expected:
Content of out/ and out2/ is byte-for-byte identical.

Actual:
They aren't.

This is specific about Android/ninja/<whatever default compiler>
 

Comment 1 by mar...@chromium.org, Jun 11 2014

Blocking: chromium:314403
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 5 2014

------------------------------------------------------------------
r292848 | maruel@chromium.org | 2014-11-05T15:39:28.367468Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/tools/build/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py?r1=292848&r2=292847&pathrev=292848

Add .apk to compare_build_artifacts.py.

R=sebmarchand@chromium.org
BUG= 383340 

Review URL: https://codereview.chromium.org/703763004
-----------------------------------------------------------------

Comment 3 by mar...@chromium.org, Nov 28 2014

Cc: -sebmarchand@chromium.org mar...@chromium.org
Owner: sebmarchand@chromium.org
Status: Fixed
It was fixed in r292869.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 21 2015

------------------------------------------------------------------
r294932 | sebmarchand@chromium.org | 2015-04-21T22:53:57.463104Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/tools/build/scripts/slave/recipes/swarming/deterministic_build.py?r1=294932&r2=294931&pathrev=294932
   M http://src.chromium.org/viewvc/chrome/trunk/tools/build/scripts/slave/recipes/swarming/deterministic_build.expected/full_chromium_swarm_Android_deterministic_build.json?r1=294932&r2=294931&pathrev=294932

Disable the test isolation on the Android deterministic builder.

test_isolation_mode!=noop is not supported on android so the compile fails.

BUG= 383340 

Review URL: https://codereview.chromium.org/1097423003
-----------------------------------------------------------------
Cc: agrieve@chromium.org
Status: Started (was: Fixed)
The main bot is currently red and has been for a while, suggesting android sheriffs don't watch it:

https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Deterministic%20Android/2937

Need to

1. Add the new files to the whitelist

2. File bugs for them to investigate

3. Talk to android sheriffs and make sure they feel responsible for the release bot, and mark bot as not experimental


The debug bot times out during comparison (https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Deterministic%20Android%20%28dbg%29/2626)


(+agrieve who is an android/infra person and may or may not have any insight on this :-))
Oh, the actual error:

Unexpected files with diffs:

  apks/VrNfcSimulator.apk
  lib.java/chromium_commands.dex.jar


The debug bot doesn't finish loading its output, so less clear what's happening over there.
Blockedon: 897969
Blockedon: 897970
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 25

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

commit d80798db579edc48b03fe101122965e4572cafe5
Author: Nico Weber <thakis@chromium.org>
Date: Thu Oct 25 01:46:42 2018

Update Android deterministic build whitelist.

apks/ChromePublicTest.apk was different in both of the two builds below,
the test apks were different once each.

https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Deterministic%20Android/2948
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Deterministic%20Android/2950

Bug:  897969 , 383340 
Change-Id: I6b55470c5c1507856cbc416bc484b5cc1b5427f8
Reviewed-on: https://chromium-review.googlesource.com/c/1297264
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602567}
[modify] https://crrev.com/d80798db579edc48b03fe101122965e4572cafe5/tools/determinism/deterministic_build_whitelist.pyl

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 29

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

commit 6caaa90989fac7b99060db4fa70da1dcb83fd0df
Author: Andrew Grieve <agrieve@chromium.org>
Date: Thu Nov 29 05:16:22 2018

Cronet: Make jar_src.py zero-out timestamps

Zero'ed timestamps means the build output is the same for each run,
which is generally desireable.

I checked that these two files were the same before/after:
 * cronet_api-src.jar
 * cronet_impl_common_java-src.jar

Where "the same" means they no longer contain directory entries
and also no "META-INF/MANIFEST.MF" file.

Bug:  383340 
Change-Id: I4f644378dc3c33e429010509202011dd7b7f9f95
Reviewed-on: https://chromium-review.googlesource.com/c/1351425
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612049}
[modify] https://crrev.com/6caaa90989fac7b99060db4fa70da1dcb83fd0df/build/android/gyp/util/build_utils.py
[modify] https://crrev.com/6caaa90989fac7b99060db4fa70da1dcb83fd0df/components/cronet/tools/jar_src.py

Status: Fixed (was: Started)
I think this is fixed now?
Blockedon: 917355

Sign in to add a comment