Mir

Merge lp://qastaging/~mir-team/mir/lazy-cookie-secret-creation into lp://qastaging/mir

Proposed by Brandon Schaefer
Status: Work in progress
Proposed branch: lp://qastaging/~mir-team/mir/lazy-cookie-secret-creation
Merge into: lp://qastaging/mir
Diff against target: 88 lines (+20/-9)
3 files modified
src/cookie/authority.cpp (+18/-7)
tests/acceptance-tests/test_server_startup.cpp (+1/-1)
tests/unit-tests/test_mir_cookie.cpp (+1/-1)
To merge this branch: bzr merge lp://qastaging/~mir-team/mir/lazy-cookie-secret-creation
Reviewer Review Type Date Requested Status
Daniel van Vugt Disapprove
Mir CI Bot continuous-integration Needs Fixing
Cemil Azizoglu (community) Needs Fixing
Review via email: mp+287372@code.qastaging.launchpad.net

Commit message

Delay creating the secret so we dont block on /dev/random on boot.

Description of the change

Delay creating the secret so we dont block on /dev/random on boot.

Tested by:

You can check the entropy pool:
watch -n 0.1 cat /proc/sys/kernel/random/entropy_avail

PrePatch (ie. bug)
In a ssh session or tty1 "cat /dev/random" // eats up all the entropy
log into unity8 (Black screen and nothing!)

With this patch:
cat /dev/random again
log into unity8 (while smashing on the keys/mouse to attempt to get the secret created)
login works!

Note there was also discussion to remove create_saving, which we can remove. Just wanted to create this quick fix with out breaking API/ABI of the libcookie. Ill be creating a branch soon to remove that create function + a function that returns the secret.

To post a comment you must log in.
3347. By Brandon Schaefer

* Enable the regession tests

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3346
https://mir-jenkins.ubuntu.com/job/mir-ci/424/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/231
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/255
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/247
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/247
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/238
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/238/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/238
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/238/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/238
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/238/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/238
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/238/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/238
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/238/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/424/rebuild

review: Approve (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

16 + BOOST_THROW_EXCEPTION(std::logic_error("Secret size " + std::to_string(passed_secret.size()) + " is to small, require " +

1. Line too long.
2. s/"to small"/"too small"

review: Needs Fixing
3348. By Brandon Schaefer

* Fix throw

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3347
https://mir-jenkins.ubuntu.com/job/mir-ci/425/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/233/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/257
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/249
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/249
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/240/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/240/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/240
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/240/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/240
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/240/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/240/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/425/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You're only deferring the problem and not solving it. This branch simply moves the hang/crash to a later location where the regression tests don't cover it any more.

So you need new regression tests to cover the new code here, and to prove that at no stage during executing does Mir hang indefinitely or crash due to lack of entropy.

Needs fixing: No test coverage

also Disapprove: The best you can achieve this with approach is to move the hang+crash to a later location. And that's still not acceptable.

review: Disapprove

Unmerged revisions

3348. By Brandon Schaefer

* Fix throw

3347. By Brandon Schaefer

* Enable the regession tests

3346. By Brandon Schaefer

* Delay making the secret if no one wants one right away

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches