Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to randomly kill pipelines to the constellation. #10179

Merged
merged 1 commit into from Mar 26, 2016

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Mar 24, 2016

Added flags:

  • --random-pipeline-closure-probability: probability of each event triggering a forced exit of a randomly chosen pipeline.
  • --random-pipeline-closure-seed: seed to use for the RNG (to remove a source of intermittent failure).

These are designed for testing the hardness of the constellation.


This change is Reviewable

@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 24, 2016

Things that we need to make sure about this PR:

  1. If --random-pipeline-closure-probability isn't set, the PR changes nothing.
  2. There's no security implications, even if an attacker manages to get servo into zombie apocalypse mode.
    I think I managed both of these, but you never know...
@asajeffrey asajeffrey force-pushed the asajeffrey:chaotic-good branch from 9cfa85f to e661fa3 Mar 24, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 24, 2016

Argh, forgot to run test-tidy.

@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 25, 2016

There is a constellation hardening metabug: issue #10124.

@emilio
Copy link
Member

emilio commented Mar 25, 2016

Looks good to me!

I left a comment about the close_random_pipeline function, but I could tolerate landing it as-is if you think being clearer there is unnecessary, so feel free to r=me if that's the case :)

-S-awaiting-review +S-awaiting-answer


Reviewed 4 of 6 files at r1, 1 of 2 files at r2.
Review status: 5 of 6 files reviewed at latest revision, 1 unresolved discussion.


components/compositing/constellation.rs, line 370 [r2] (raw file):
I'd include in this comment something like "if --random-pipeline-closure-probability was specified at startup" or similar, just to make it clear when scanning the constellation code (in order to not having to look ~1000 lines below).

Renaming close_random_pipeline to maybe_close_random_pipeline, or even changing the signature to close_random_pipeline(&mut self, rng: &mut StdRng, probability: f32), so it would be obvious from here that this will do nothing unless random_pipeline_closure is set would help.

These are nits though, and I won't blame you for landing this as-is :P


Comments from the review on Reviewable.io

@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 25, 2016

Review status: 5 of 6 files reviewed at latest revision, 1 unresolved discussion.


components/compositing/constellation.rs, line 370 [r2] (raw file):
Added some comments, and renamed close_random_pipeline to maybe_close_random_pipeline. Thanks for the review!


Comments from the review on Reviewable.io

@@ -347,6 +352,11 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
child_processes: Vec::new(),
document_states: HashMap::new(),
webrender_api_sender: state.webrender_api_sender,
random_pipeline_closure: opts::get().random_pipeline_closure_probability.map(|prob| {
let seed = opts::get().random_pipeline_closure_seed.unwrap_or_else(random);

This comment has been minimized.

Copy link
@mbrubeck

mbrubeck Mar 25, 2016

Contributor

When it a random seed, perhaps it should log the seed.

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Mar 25, 2016

Author Member

Done. Should we log using debug! or something else?

This comment has been minimized.

Copy link
@mbrubeck

mbrubeck Mar 25, 2016

Contributor

debug! is compiled out in release builds of Servo, so use info! if you want to use this feature in release.

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Mar 25, 2016

Author Member

Will do.

@emilio
Copy link
Member

emilio commented Mar 25, 2016

Looks good to me, r=me with that typo fixed and the commits squashed :)

-S-awaiting-answer -S-awaiting-answer +S-needs-code-changes +S-needs-squash


Reviewed 1 of 2 files at r2, 1 of 1 files at r5.
Review status: all files reviewed at latest revision, 2 unresolved discussions.


components/compositing/constellation.rs, line 370 [r2] (raw file):
nit: s/pipelne/pipeline


Comments from the review on Reviewable.io

@asajeffrey asajeffrey force-pushed the asajeffrey:chaotic-good branch from 6e0863f to 1ec222c Mar 25, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 25, 2016

Squashed, typo fixed.


Review status: 5 of 6 files reviewed at latest revision, 1 unresolved discussion.


Comments from the review on Reviewable.io

@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 25, 2016

@bors-servo: r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Mar 25, 2016

📌 Commit 1ec222c has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

Testing commit 1ec222c with merge fde06cc...

bors-servo added a commit that referenced this pull request Mar 26, 2016
Added ability to randomly kill pipelines to the constellation.

Added flags:

* `--random-pipeline-closure-probability`: probability of each event triggering a forced exit of a randomly chosen pipeline.
* `--random-pipeline-closure-seed`: seed to use for the RNG (to remove a source of intermittent failure).

These are designed for testing the hardness of the constellation.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10179)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

💔 Test failed - gonk

@emilio
Copy link
Member

emilio commented Mar 26, 2016

Need to update the other lockfiles.

@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 26, 2016

Grr, I'll do this tomorrow.

@asajeffrey asajeffrey force-pushed the asajeffrey:chaotic-good branch from 1ec222c to 8f9b073 Mar 26, 2016
@asajeffrey asajeffrey force-pushed the asajeffrey:chaotic-good branch from 8f9b073 to 2c04724 Mar 26, 2016
@asajeffrey asajeffrey force-pushed the asajeffrey:chaotic-good branch from 2c04724 to 32c72f0 Mar 26, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 26, 2016

OK, fixed Cargo.lock files, Let's see if this works...

@bors-servo try

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

Trying commit 32c72f0 with merge 8a13b7b...

bors-servo added a commit that referenced this pull request Mar 26, 2016
Added ability to randomly kill pipelines to the constellation.

Added flags:

* `--random-pipeline-closure-probability`: probability of each event triggering a forced exit of a randomly chosen pipeline.
* `--random-pipeline-closure-seed`: seed to use for the RNG (to remove a source of intermittent failure).

These are designed for testing the hardness of the constellation.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10179)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 26, 2016

@bors-servo: r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

📌 Commit 32c72f0 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

Testing commit 32c72f0 with merge dc0e541...

bors-servo added a commit that referenced this pull request Mar 26, 2016
Added ability to randomly kill pipelines to the constellation.

Added flags:

* `--random-pipeline-closure-probability`: probability of each event triggering a forced exit of a randomly chosen pipeline.
* `--random-pipeline-closure-seed`: seed to use for the RNG (to remove a source of intermittent failure).

These are designed for testing the hardness of the constellation.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10179)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

💔 Test failed - linux-rel

@asajeffrey
Copy link
Member Author

asajeffrey commented Mar 26, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

Previous build results for android, arm32, gonk, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor are reusable. Rebuilding only linux-rel...

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

@bors-servo bors-servo merged commit 32c72f0 into servo:master Mar 26, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@asajeffrey asajeffrey deleted the asajeffrey:chaotic-good branch Mar 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.