update_engine failing in asan builders |
||||||
Issue descriptionhttps://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8928127837649543328 update_engine-0.0.3-r3298: [0;31m[ FAILED ] [m2 tests, listed below: update_engine-0.0.3-r3298: [0;31m[ FAILED ] [mUpdateAttempterTest.SetRollbackHappenedRollback update_engine-0.0.3-r3298: [0;31m[ FAILED ] [mUpdateAttempterTest.RollbackMetricsRollbackSuccess update_engine-0.0.3-r3298: update_engine-0.0.3-r3298: 2 FAILED TESTS update_engine-0.0.3-r3298: [INFO:testrunner.cc(51)] unittest return value: 1 update_engine-0.0.3-r3298: Error: /var/cache/portage/chromeos-base/update_engine/out/Default/update_engine_unittests: failed with exit code 1 update_engine-0.0.3-r3298: Error: the test leaked process sleep with pid 76 (it was forcefully killed)
,
Dec 4
I think this is the same symptom of crbug.com/905704 (I verified). Assigning this to chowes@ to mark it as fixed once their changes landed. @chowes: you can check this by running: sudo FEATURES=test USE=asan emerge update_engine and makeing sure it passes with no error.
,
Dec 5
The errors: update_engine-0.0.3-r3298: [0;32m[ OK ] [mUpdateAttempterTest.ResetRollbackHappenedEnterprise (2 ms) update_engine-0.0.3-r3298: [0;32m[ RUN ] [mUpdateAttempterTest.SetRollbackHappenedRollback update_engine-0.0.3-r3298: [INFO:update_attempter.cc(996)] Processing Done. update_engine-0.0.3-r3298: [ERROR:delta_performer.cc(1784)] prefs->SetInt64(kPrefsUpdateStateNextOperation, kUpdateStateOperationInvalid) failed. update_engine-0.0.3-r3298: [INFO:update_attempter.cc(1053)] DLC successfully installed, no reboot needed. update_engine-0.0.3-r3298: ../../../../../../../tmp/portage/chromeos-base/update_engine-0.0.3-r3298/work/update_engine-0.0.3/aosp/system/update_engine/update_attempter_unittest.cc:1416: Failure update_engine-0.0.3-r3298: Actual function call count doesn't match EXPECT_CALL(*fake_system_state_.mock_payload_state(), SetRollbackHappened(true))... update_engine-0.0.3-r3298: Expected: to be called once update_engine-0.0.3-r3298: Actual: never called - unsatisfied and active update_engine-0.0.3-r3298: [0;31m[ FAILED ] [mUpdateAttempterTest.SetRollbackHappenedRollback (1 ms) This should have been fixed by https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1359109/.
,
Dec 5
ah, there might be something more about it:
TEST_F(UpdateAttempterTest, SetRollbackHappenedRollback) {
attempter_.install_plan_.reset(new InstallPlan);
attempter_.install_plan_->is_rollback = true;
EXPECT_CALL(*fake_system_state_.mock_payload_state(),
SetRollbackHappened(true))
.Times(1);
attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess);
}
This test is not calling Rollback function so is_install is not set to be false. So the unit test needs to be fixed.
Let me take this over.
,
Dec 5
But don't we set it to false in the ctor?
,
Dec 5
also this is not producible on a build without asan (otherwise CQ will fail), this is probably a bug in gtest (testing object not being reconstructed each time a test fixture is running) or llvm compiler itself.
,
Dec 5
I can reproduce it with: sudo FEATURES=test USE=asan emerge update_engine
,
Dec 5
yes but update_attempter is reused (ctor is called once at the beginning) across fixtures (is_install is set to true at one point) due to an unknown bug...
,
Dec 5
sure, amd64-generic-asan can also reproduce this reliably.
,
Dec 5
re #8 that that is not true, THe update attempter is initialized for each test fixture. Actually I think this bug is already resolved with Colin's fixing the ctor initialization. re #6. This is WAI. The asan builders are separated builders that are different with normal builders and are not run in the CQ because they are slow. That is why once in a while asan builders fail and we have to fix the root cause :)
,
Dec 5
Colin's fix is irrelevant to this bug. My point: there is a bug outside of update_engine that causes update_engine_unittest to behave differently with asan or not.
,
Dec 5
then probably we should not fix update_engine since it's not its problem in the first place. :) assigning back to toolchain team for further triaging cause I suspect this may cause other test regression as well. so let's fix them all by rooting cause this.
,
Dec 5
well, collin's fix, fixed the issue on my build :) so I'm not really sure what else could be going on here ;-)
,
Dec 5
When I ran it locally the test didn't seem to respect my local changes (I cherry picked an old commit and the problem persisted, with logging that didn't exist). xiaochu suggested it might be an issue with specifying a different flag after running setup_board? Anyway, can we run these tests on a trybot to be sure? On Tue, Dec 4, 2018, 17:27 ahassani via monorail < monorail+v2.3083992306@chromium.org wrote:
,
Dec 5
check it here: https://cros-goldeneye.corp.google.com/chromeos/legoland/builderHistory?buildConfig=amd64-generic-asan&buildBranch=master it is still RED!
,
Dec 5
It probably hasn't run since the fix went in though right? On Tue, Dec 4, 2018, 17:34 xiaochu via monorail < monorail+v2.3576894634@chromium.org wrote:
,
Dec 5
the last RED run is at 2018-12-04 15:36
,
Dec 5
ah, that builder is running release branch it looks like:R73-11345.0.0-b3191852 instead of ToT. So let's wait to see. still it doesn't explain why the unittest only fails on asan builders.
,
Dec 5
It is red, but there could be other packages failing too? if you would've looked at the logs you'd see that mostly shill unittests are failing (and some other packages). there is no sign the update_engine is failing. We would know that for sure other packages have successfully fixed. But if the local unittests with asan are passing, we can close this bug. it can be reopened if it persists.
,
Dec 5
Thanks, looks like last runs of asan and ubsan builders do not have update_engine failing anymore. Note that R73-11345.0.0-b3191852 is a build on the master branch (I don't know how the numbers are generated but R72 is the current beta branch). https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8928025921888873008 https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8928028330239177232 |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by manojgupta@chromium.org
, Dec 4