New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 867815 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

filesystem_verifier_action_unittest enters infinite loop

Project Member Reported by nya@chromium.org, Jul 26

Issue description

This CQ run timed out in UnitTest stage:
https://luci-milo.appspot.com/buildbot/chromeos/cave-paladin/4347

Its log is filled with huge number of the following line:

...
update_engine-0.0.3-r3229: [INFO:filesystem_verifier_action_unittest.cc(73)] Waiting for Cleanup() to be called.
update_engine-0.0.3-r3229: [INFO:filesystem_verifier_action_unittest.cc(73)] Waiting for Cleanup() to be called.
update_engine-0.0.3-r3229: [INFO:filesystem_verifier_action_unittest.cc(73)] Waiting for Cleanup() to be called.
...

https://logs.chromium.org/v/?s=chromeos%2Fbb%2Fchromeos%2Fcave-paladin%2F4347%2F%2B%2Frecipes%2Fsteps%2FUnitTest%2F0%2Fstdout

I suspect the unittest entered infinite loop by some race condition.

My wild guess is that this is related to the following change landed yesterday.
https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1065113

ahassani@, do you think this can be caused by your change?

 
Issue 867814 has been merged into this issue.
I'm looking into it

found out the problem. working on a fix.
Status: Started (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 27

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/system/update_engine/+/abe4a775df7e9b7b8f09094988f6f1b42acc05a3

commit abe4a775df7e9b7b8f09094988f6f1b42acc05a3
Author: Amin Hassani <ahassani@chromium.org>
Date: Fri Jul 27 19:12:48 2018

update_engine: Remove Action object from FilesystemVerifierActionDelegate

in CL:1065113 we forgot to remove the FileSystemVerfierAction instance from the
FilesystemVerifierActionDelegate. Hence, it will be removed from memory while
FilesystemVerifierActionDelegate still keeps a pointer to it and access it. This
causes a possible race condition on ExitMainLoop() function. This patch fixes
the issue by removing that instance and the unnecessary checks for the
cleanup. Once the Action is deleted by the ActionProcessor it will be cleaned up
(which will happen when the action is terminated too). So there is not really a
need for testing the cleanup method.

BUG= chromium:867815 
TEST=unittests pass

Change-Id: Id9d3f361eb916007e95dbb1d0adb9603ceae00b9
Reviewed-on: https://chromium-review.googlesource.com/1151902
Commit-Ready: Lann Martin <lannm@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>

[modify] https://crrev.com/abe4a775df7e9b7b8f09094988f6f1b42acc05a3/payload_consumer/filesystem_verifier_action.cc
[modify] https://crrev.com/abe4a775df7e9b7b8f09094988f6f1b42acc05a3/payload_consumer/filesystem_verifier_action.h
[modify] https://crrev.com/abe4a775df7e9b7b8f09094988f6f1b42acc05a3/payload_consumer/filesystem_verifier_action_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment