DataUseMeasurementTest.UserNotUserTest is failing on CrWinClangLLD64 tester |
|||||
Issue descriptionStarted in one of these two builds: https://build.chromium.org/p/chromium.fyi/builders/CrWinClangLLD64%20tester/builds/1340 https://build.chromium.org/p/chromium.fyi/builders/CrWinClangLLD64%20tester/builds/1341 Trigger is likely https://codereview.chromium.org/2462983003 or https://codereview.chromium.org/2491733002 DataUseMeasurementTest.UserNotUserTest (run #1): [ RUN ] DataUseMeasurementTest.UserNotUserTest ../../base/test/histogram_tester.cc(77): error: Value of: 0 Expected: count Which is: 1 Histogram "DataUse.TrafficSize.System.Downstream.Foreground.NotCellular" does not exist. ../../base/test/histogram_tester.cc(77): error: Value of: 0 Expected: count Which is: 1 Histogram "DataUse.TrafficSize.System.Upstream.Foreground.NotCellular" does not exist. ../../base/test/histogram_tester.cc(77): error: Value of: 0 Expected: count Which is: 2 Histogram "DataUse.MessageSize.Suggestions" does not exist. ../../base/test/histogram_tester.cc(174): error: Value of: actual_count Actual: 0 Expected: expected_count Which is: 1 Histogram "DataUse.TrafficSize.User.Downstream.Foreground.NotCellular" does not have the right total number of samples (1). It has (0). [ FAILED ] DataUseMeasurementTest.UserNotUserTest (2 ms) The test only fails on this one bot, which kind of suggests that this might maybe be an LLD issue?
,
Nov 28 2016
hans: I wonder if this is due to LTO?
,
Nov 28 2016
That bot doesn't do LTO builds (it's not setting is_official_build), so it must be something else
,
Nov 28 2016
Sorry. I missed this bug. I do not see any possible issue.
,
Dec 12 2016
Repros in a local release component build, but not in a debug component build. Probably some ICF thing similar to bug 635943 ?
,
Dec 12 2016
Here's the problem. DataUseMeasurementTest calls SetUserData() on a request either with key UserRequestUserDAtaForTesting::kUserDataKey or with data_use_measurement::DataUseUserDataKey::kUserDataKey. If the former key is used, that request is considered a "user request", else it's considered a "service request".
The first constant is defined like so:
class UserRequestUserDataForTesting : public base::SupportsUserData::Data,
public URLRequestClassifier {
public:
static const void* const kUserDataKey;
...
};
// static
const void* const UserRequestUserDataForTesting::kUserDataKey =
&UserRequestUserDataForTesting::kUserDataKey;
The second constant:
class DataUseUserData : public base::SupportsUserData::Data {
public:
...
static const void* const kUserDataKey;
};
// static
const void* const DataUseUserData::kUserDataKey =
&DataUseUserData::kUserDataKey;
(https://cs.chromium.org/chromium/src/components/data_use_measurement/core/data_use_user_data.cc?sq=package:chromium&dr=CSs&rcl=1481559468&l=37)
It looks like lld ICFs these two kUserDataKeys together. Changing the first kUserDataKeyDefinition to
const int kRandom = 42;
const void* const UserRequestUserDataForTesting::kUserDataKey = &kRandom;
makes the test pass.
Merging these feels a bit aggressive to me, and bugs like this are probably difficult to diagnose for people who haven't seen this type of bug before. Should I just land the change I described above? Do we feel good with people having to debug something like this every now and then in the future?
,
Dec 12 2016
I think from the point of view of ICF, doing this makes sense, but I guess that most people expect that ICF merges only functions, so we probably should only functions.
,
Dec 12 2016
https://codereview.chromium.org/2565173005/
,
Dec 12 2016
This is the second time I've seen LLD's ICF of readonly data break user code, so I think we need to power it down. There's a reason link.exe doesn't do this.
,
Dec 13 2016
Do we have any numbers on how much ICF'ing ro data saves?
,
Dec 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/501fb6dbe391965bd11219475fcb1980491312f4 commit 501fb6dbe391965bd11219475fcb1980491312f4 Author: thakis <thakis@chromium.org> Date: Tue Dec 13 01:23:35 2016 Make DataUseMeasurementTest.UserNotUserTest pass with lld/win. BUG= 668207 TBR=rnk Review-Url: https://codereview.chromium.org/2565173005 Cr-Commit-Position: refs/heads/master@{#437977} [modify] https://crrev.com/501fb6dbe391965bd11219475fcb1980491312f4/components/data_use_measurement/core/data_use_measurement_unittest.cc
,
Dec 13 2016
https://build.chromium.org/p/chromium.fyi/builders/CrWinClangLLD64%20tester \o/ |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by thakis@chromium.org
, Nov 23 2016