New issue
Advanced search Search tips

Issue 779668 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 1
Type: Bug



Sign in to add a comment

BuildTime.InThePast fails in base_unittests on fuchsia arm64

Project Member Reported by scottmg@chromium.org, Oct 30 2017

Issue description

Time::Now is 0, possibly due to running on non-kvm qemu.

[00007.244] 02590.02617> [ RUN      ] BuildTime.InThePast
[00007.245] 02590.02617> ../../base/build_time_unittest.cc:29: Failure
[00007.245] 02590.02617> Expected: (base::GetBuildTime()) < (base::Time::Now()), actual: 2017-10-01 05:00:00.000 UTC vs 1970-01-01 00:00:07.111 UTC
[00007.245] 02590.02617> ../../base/build_time_unittest.cc:30: Failure
[00007.245] 02590.02617> Expected: (base::GetBuildTime()) < (base::Time::NowFromSystemTime()), actual: 2017-10-01 05:00:00.000 UTC vs 1970-01-01 00:00:07.116 UTC
[00007.245] 02590.02617> [  FAILED  ] BuildTime.InThePast (10 ms)
[00007.246] 02590.02617> [1/1] BuildTime.InThePast (10 ms)
[00007.248] 02590.02617> 1 test failed:
[00007.248] 02590.02617>     BuildTime.InThePast (../../base/build_time_unittest.cc:28)

 

Comment 1 by w...@chromium.org, Oct 30 2017

Labels: -Pri-3 M-64 Pri-1
Bumping priority, since this seems Extremely Bad. :)
I think it's relatively not-so-bad. TimeTicks is working fine (i.e. it's 7.111s, which is consistent with a boot time of zero) but the initial retrieval is wrong.

Comment 3 by w...@chromium.org, Oct 30 2017

Re #2: The two are different clocks, though; TimeTicks is ticks-since-boot, while Time is wall-clock time.  Are you saying that Time starts at zero but then increases in line w/ TimeTicks, though?
Booting zircon arm64 qemu (in Fuchsia tree), I see this:

[00000.000] 00000.00000> arm generic timer freq 62500000 Hz
[00000.011] 00000.00000> cntpct_per_ns: 00000000.1000000000000000
[00000.011] 00000.00000> ns_per_cntpct: 00000010.0000000000000000
[00000.011] 00000.00000> test_time_conversion_check_result:265: FAIL, off by 72057594037927936

which seems likely related.
Hm, that might not be relevant after all. It's trying to see if converting a zx_time of 1ULL<<60 can be converted to a cntpct value, but it's getting truncated due to the size. I think it this case the test is wrong.

But it is a little concerning since it probably means we're using a codepath that's not much used.


ZX-1317 upstream.
The summary of the upstream bug is that there's no RTC integration on real or qemu ARM yet, so zx_time_get(ZX_CLOCK_UTC) is equivalent to zx_time_get(ZX_CLOCK_MONOTONIC) (i.e. Time::Now() == TimeTicks::Now()).

Other than the test, I imagine this would affect TLS for cert validation (?), and potentially other protocols that need to coordinate with a server.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 30 2017

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

commit 7c466ad1b46ec7b3be6d33cb5280a996c3741d47
Author: Wez <wez@chromium.org>
Date: Mon Oct 30 21:55:33 2017

Enable base_unittests on Fuchsia/ARM64 bots.

This requires filtering out some tests:
- Some PartitionAllocTests which fail under ARM64, and were just
  being skipped under x64.
- BuildTime.InThePast which current fails under ARM64.

Bug:  772031 , 779645,  779668 
Change-Id: Ic764f276d8298bf309c815af6b60eed4ea5d3c4f
Reviewed-on: https://chromium-review.googlesource.com/744315
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512637}
[modify] https://crrev.com/7c466ad1b46ec7b3be6d33cb5280a996c3741d47/testing/buildbot/chromium.fyi.json
[modify] https://crrev.com/7c466ad1b46ec7b3be6d33cb5280a996c3741d47/testing/buildbot/filters/fuchsia.base_unittests.filter

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 31 2017

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

commit 37843401d0f4b5bad0ce6b3bf337f32bcd4d5de4
Author: Scott Graham <scottmg@chromium.org>
Date: Tue Oct 31 07:23:50 2017

Roll Fuchsia SDK to f6dffb2fee82a21900fc3a00261dc5844901ea9e

Includes https://fuchsia-review.googlesource.com/c/zircon/+/80476 which
should make time work on ARM64.

Bug:  779668 
Change-Id: I1488b2e595f6f2f0159ed6662f31dc6f8ef8f2d1
TBR: kmarshall@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/746027
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512770}
[modify] https://crrev.com/37843401d0f4b5bad0ce6b3bf337f32bcd4d5de4/DEPS

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 31 2017

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

commit d9d096e359a07d6bb087aa0e3743eb1a21c31fcb
Author: Scott Graham <scottmg@chromium.org>
Date: Tue Oct 31 18:24:18 2017

fuchsia: Re-enable BuildTime.InThePast, works on arm64 now

Bug:  779668 
Change-Id: If23ef86c79f73581b3330f8fa5d020212f74c518
Reviewed-on: https://chromium-review.googlesource.com/747201
Commit-Queue: Scott Graham <scottmg@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512879}
[modify] https://crrev.com/d9d096e359a07d6bb087aa0e3743eb1a21c31fcb/testing/buildbot/filters/fuchsia.base_unittests.filter

Status: Fixed (was: Started)

Sign in to add a comment