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

Issue 646626 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 658943
issue 668326

Blocking:
issue 347322



Sign in to add a comment

test: multiple tests of platform_Cryptohome* broken

Project Member Reported by asavery@chromium.org, Sep 13 2016

Issue description


What steps will reproduce the problem?
(1)Run the following autotests: platform_CryptohomeMigrateChapsTokenClient, platform_CryptohomeKeyEviction, platform_CryptoHomeStress, and platform_CryptohomeSyncStress
(2)Run the platform_CryptohomeBadPerms autotest.
(3)Run other platform_Cryptohome* autotests

What is the expected output?
Autotests will run and pass.

What do you see instead?
Running platform_CryptohomeMigrateChapsTokenClient results in failure: Unable to remount users cryptohome.

Running platform_CryptohomeKeyEviction results in error: Timeout while waiting for pkcs11.

Running platform_CryptoHomeStress results in multiple errors: Unhandled TypeError: run_once() takes at least 3 arguments (3 given) and fiostress not triggered.

Running CryptohomeSyncStress results in error: Unhandled TypeError: run_once() takes exactly 3 arguments (1 given).

platform_CryptohomeBadPerms passes, but running it causes errors to occur in other platform_Cryptohome* autotests that were previously passing, including platform_CryptohomeFio which now results in the error: Cryptohome vault not found after mount, platform_CryptohomeMount which now results in the error: Failed to create and mount the test user, and platform_CryptohomeChangePassword which now results in the error: Cryptohome could not create the test user.


 
Blocking: 347322
Cc: gwendal@chromium.org
Labels: -Pri-3 Pri-2
Owner: asavery@chromium.org
Run the tests with cautotest, point the failed jobs. 

The author of platform_CryptohomeMigrateChapsTokenClient and platform_CryptohomeKeyEviction is not working Google anymore, so we will have figure out why it fails ourselves.

In platform_CryptoHomeStress, I think a basic cut&paste error in 
http://codereview.chromium.org/3412036 give 3 arguments to platform_CryptohomeStress.run_once().

With logs we would better analyze the subsequent failures. 
The cautotest jobs,

platform_CryptohomeKeyEviction:
http://cautotest/afe/#tab_id=view_job&object_id=77133994

platform_CryptohomeStress:
http://cautotest/afe/#tab_id=view_job&object_id=77138880

I can't get platform_CryptohomeMigrateChapsTokenClient or platform_CryptohomeSyncStress to run with cautotest.

For platform_CryptohomeKeyEviction, the test appears to be failing because it expects the TPM to be owned, but I had not logged into the device at any point. When I reran the test after having a test login it passed. If we want the test to run and pass regardless of the presence of users and ownership of the device then there might need to be a check of ownership and a login attempt added.

For CryptohomeSyncStress, I gave the additional arguments for run_once() and that error no longer appears, but now there is a new error, FAIL: Unhandled AttributeError: 'module' object has no attribute 'attempt_login' The test probably needs to use a different method to log in.

For platform_CryptohomeStress, the error with the arguments in run_once() was in the call to platform_CryptohomeFio.  Giving additional arguments seems to fix that error, but results in a different error, ERROR: file /home/user/66a2e64a3f87ca217eb352ca9c28b6ee61877ddd/tmp5Np1Jc/seq_write_verified missing as well as warnings: WARN: 39 non-fatal suspend failures in 40 iterations (39 timeouts, 0 kernel warnings). It also still has the error: FAIL: fiostress not triggered. even when platform_CryptohomeFio successfully runs.

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/4327ca8f1ecf2d37e0c038963e5a80fe60729907

commit 4327ca8f1ecf2d37e0c038963e5a80fe60729907
Author: Alexis Savery <asavery@chromium.org>
Date: Mon Oct 03 20:26:49 2016

platform_CryptohomeSyncStress: Fix login parameter

BUG= chromium:646626 
TEST=Ran the autotest.

Change-Id: If9947c96261083dd0a5e14bf64dd56b1184480bd
Reviewed-on: https://chromium-review.googlesource.com/393966
Commit-Ready: Alexis Savery <asavery@chromium.org>
Tested-by: Alexis Savery <asavery@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/4327ca8f1ecf2d37e0c038963e5a80fe60729907/client/site_tests/platform_CryptohomeSyncStress/platform_CryptohomeSyncStress.py

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/338e7990ef166e05464c784979923db75b42616d

commit 338e7990ef166e05464c784979923db75b42616d
Author: Alexis Savery <asavery@chromium.org>
Date: Wed Oct 12 00:14:26 2016

platform_CryptohomeKeyEviction: Ensure TPM is owned

BUG= chromium:646626 
TEST=Ran the autotest.

Change-Id: I532bfbdf297b5d3e0b7d35d1338a7ffde7b62639
Reviewed-on: https://chromium-review.googlesource.com/396886
Commit-Ready: Alexis Savery <asavery@chromium.org>
Tested-by: Alexis Savery <asavery@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/338e7990ef166e05464c784979923db75b42616d/client/site_tests/platform_CryptohomeKeyEviction/platform_CryptohomeKeyEviction.py

Blockedon: 658943
Blockedon: 668326
Cc: hashimoto@chromium.org kinaba@chromium.org

Comment 8 by snanda@chromium.org, Jan 26 2017

Cc: apronin@chromium.org snanda@chromium.org
Two of the tests are waiting for reviews.  Alexis to add pointers to the reviews.

The stress test may be fixed once we add retries for waiting on cryptohomed to restart.
Here are reviews for two of the tests, platform_CryptohomeMigrateChapsTokenClient and platform_CryptohomeBadPerms:
https://chromium-review.googlesource.com/#/c/400640/
https://chromium-review.googlesource.com/#/c/400641/
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/740b20e922b7f99b27815dfdd9033478bb056c54

commit 740b20e922b7f99b27815dfdd9033478bb056c54
Author: Alexis Savery <asavery@chromium.org>
Date: Tue Feb 14 22:50:34 2017

autotest: Fix parameters and restore supporting code

platform_CryptohomeStress: Fix parameters in control files to
specify disk_configs which does not have a default. Also
remove code that removes the cryptohomestress_end directory
as that is handled in platform_CryptohomeFio.

platform_CryptohomeFio: Restore code to create tmp directories
that are used in platform_CryptohomeStress to determine if
fiostress has been triggered.

BUG= chromium:646626 
TEST=Ran platform_CryptohomeStress and platform_CryptohomeFio.

Change-Id: Ib9fa09837fd0af537c1e959ab8ad9b6508882058
Reviewed-on: https://chromium-review.googlesource.com/399893
Commit-Ready: Alexis Savery <asavery@chromium.org>
Tested-by: Alexis Savery <asavery@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/740b20e922b7f99b27815dfdd9033478bb056c54/client/site_tests/platform_CryptohomeStress/control
[modify] https://crrev.com/740b20e922b7f99b27815dfdd9033478bb056c54/client/site_tests/platform_CryptohomeFio/platform_CryptohomeFio.py
[modify] https://crrev.com/740b20e922b7f99b27815dfdd9033478bb056c54/client/site_tests/platform_CryptohomeFio/seq_write_verified
[modify] https://crrev.com/740b20e922b7f99b27815dfdd9033478bb056c54/client/site_tests/platform_CryptohomeStress/platform_CryptohomeStress.py
[modify] https://crrev.com/740b20e922b7f99b27815dfdd9033478bb056c54/client/site_tests/platform_CryptohomeStress/control.surfing

Project Member

Comment 11 by bugdroid1@chromium.org, Feb 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/3b5a001610410f7ec9fa5d191cd7fafc355ef7e1

commit 3b5a001610410f7ec9fa5d191cd7fafc355ef7e1
Author: Alexis Savery <asavery@chromium.org>
Date: Tue Feb 14 22:50:34 2017

autotest: Ensure a chaps key is generated and TPM is owned.

platform_MigrateChapsTokenClient: We need to ensure that the
TPM is owned before mounting a new cryptohome and in the
control file we need to make sure that a chaps key has
been generated before we can check if it is still present.

In pksc11.py: Fixed generate_user_key so that it outputs
'Sign: CKR_OK' when successful.

BUG= chromium:646626 
TEST=Ran the autotest.

Change-Id: I792f5b4ad506e747632b664192a5e782eb884d25
Reviewed-on: https://chromium-review.googlesource.com/400640
Commit-Ready: Alexis Savery <asavery@chromium.org>
Tested-by: Alexis Savery <asavery@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/3b5a001610410f7ec9fa5d191cd7fafc355ef7e1/client/site_tests/platform_CryptohomeMigrateChapsTokenClient/control
[modify] https://crrev.com/3b5a001610410f7ec9fa5d191cd7fafc355ef7e1/client/site_tests/platform_CryptohomeMigrateChapsTokenClient/platform_CryptohomeMigrateChapsTokenClient.py
[modify] https://crrev.com/3b5a001610410f7ec9fa5d191cd7fafc355ef7e1/client/cros/pkcs11.py

Project Member

Comment 12 by bugdroid1@chromium.org, Feb 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/21b9f7449a8b054f0c82992c62bf6eede819ae15

commit 21b9f7449a8b054f0c82992c62bf6eede819ae15
Author: Alexis Savery <asavery@chromium.org>
Date: Tue Feb 14 22:50:34 2017

platform_CryptohomeBadPerms: Reset access permissions for parent_path.

Reset the permissions of /home/.shadow... to what they were before
the test so that other tests are able to run properly.

BUG= chromium:646626 
TEST=Ran the autotest followed by other autotests.

Change-Id: Ic5c84dbb4ec06e8be82e61b461afa61b22a13eca
Reviewed-on: https://chromium-review.googlesource.com/400641
Commit-Ready: Alexis Savery <asavery@chromium.org>
Tested-by: Alexis Savery <asavery@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/21b9f7449a8b054f0c82992c62bf6eede819ae15/client/site_tests/platform_CryptohomeBadPerms/platform_CryptohomeBadPerms.py

At this point, all of the tests should be fixed other than platform_CryptohomeStress which is waiting on  issue 668326 .
Status: Assigned (was: Untriaged)
Components: OS>Systems>Security
Status: Fixed (was: Assigned)
Seems this is all fixed

Sign in to add a comment