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

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

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 24, 2016
@asajeffrey
Copy link
Member Author

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
Copy link
Member Author

Argh, forgot to run test-tidy.

@asajeffrey
Copy link
Member Author

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

@emilio emilio added S-awaiting-answer Someone asked a question that requires an answer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 25, 2016
@asajeffrey
Copy link
Member Author

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

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 25, 2016
@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

@emilio emilio added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. S-needs-squash Some (or all) of the commits in the PR should be combined. and removed S-awaiting-answer Someone asked a question that requires an answer. labels Mar 25, 2016
@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

@highfive highfive removed the S-needs-code-changes Changes have not yet been made that were requested by a reviewer. label Mar 25, 2016
@asajeffrey
Copy link
Member Author

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

@bors-servo: r=emilio

@bors-servo
Copy link
Contributor

📌 Commit 1ec222c has been approved by emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-squash Some (or all) of the commits in the PR should be combined. labels Mar 25, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit 1ec222c with merge fde06cc...

bors-servo pushed 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

💔 Test failed - gonk

@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 26, 2016
@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Mar 26, 2016
@emilio
Copy link
Member

emilio commented Mar 26, 2016

Need to update the other lockfiles.

@asajeffrey
Copy link
Member Author

Grr, I'll do this tomorrow.

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Mar 26, 2016
@asajeffrey
Copy link
Member Author

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

@bors-servo try

@bors-servo
Copy link
Contributor

⌛ Trying commit 32c72f0 with merge 8a13b7b...

bors-servo pushed 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

☀️ Test successful - android, arm32, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor

@asajeffrey
Copy link
Member Author

@bors-servo: r=emilio

@bors-servo
Copy link
Contributor

📌 Commit 32c72f0 has been approved by emilio

@bors-servo
Copy link
Contributor

⌛ Testing commit 32c72f0 with merge dc0e541...

bors-servo pushed 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 -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 26, 2016
@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Mar 26, 2016
@asajeffrey
Copy link
Member Author

@bors-servo
Copy link
Contributor

⚡ 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

☀️ Test successful - android, arm32, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor

@bors-servo bors-servo merged commit 32c72f0 into servo:master Mar 26, 2016
@asajeffrey asajeffrey deleted the chaotic-good branch March 26, 2016 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-tests-failed The changes caused existing tests to fail.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants