Skip to content

Constellation hardening metabug #10124

Closed
Closed

Activity

  1. added
    A-constellation
    I-panic
    B-meta
    on Mar 22, 2016
  2. self-assigned this
    on Mar 22, 2016
  3. asajeffrey commented on Mar 22, 2016

    @asajeffrey
    ContributorAuthor

    There are four sources of panic in constellation.rs:

    1. Lookup failure in the pipeline/frame maps (addressed by PR Removed panicking when frame or pipeline lookup fails. #10082)
    2. Creating new processes
    3. Creating new channels
    4. Sending/receiving on those channels (addressed by PR Replace any uses of .send().unwrap() by .send().unwrap_or_else(). #10242)

    The trickiest to deal with is (4). There's already code to handle failure messages in constellation.rs, should we treat errors on send as the same as receiving a failure message?

  4. nox commented on Mar 22, 2016

    @nox
    Contributor

    The trickiest to deal with is (4). There's already code to handle failure messages in constellation.rs, should we treat errors on send as the same as receiving a failure message?

    The Erlang user in me says yes. Constellation should never die.

  5. asajeffrey commented on Mar 23, 2016

    @asajeffrey
    ContributorAuthor

    Testing the hardened constellation requires some way of injecting panics, see #10144.

  6. asajeffrey commented on Mar 23, 2016

    @asajeffrey
    ContributorAuthor

    Some IRC discussion http://logs.glob.uno/?c=mozilla%23servo#c390119 about double-panics.

    TL;DR: #6462 causes double-panic, when SM panics and leaves the GC roots in an unsafe state, and this double-panic aborts the process. We'd need multi-process execution to isolate pipelines (in particular, put the constellation in a separate process).

  7. asajeffrey commented on Mar 23, 2016

    @asajeffrey
    ContributorAuthor

    I started on a patch to randomly close pipelines: asajeffrey@a9fb350

  8. asajeffrey commented on Mar 25, 2016

    @asajeffrey
    ContributorAuthor

    The patch to randomly close pipelines is now PR #10179.

  9. asajeffrey commented on Mar 28, 2016

    @asajeffrey
    ContributorAuthor

    In order to run wpt-test with random pipeline closure, we need to be able to pass command line arguments in to servo via wptrunner. This is the issue: w3c/wptrunner#176 and this is the PR: w3c/wptrunner#177

  10. asajeffrey commented on Mar 28, 2016

    @asajeffrey
    ContributorAuthor

    I submitted PR #10242, which removes constellation panics caused by chan.send(msg).unwrap().

  11. added 3 commits that reference this issue on Mar 28, 2016
  12. 5 remaining items

  13. added 2 commits that reference this issue on Mar 30, 2016
  14. asajeffrey commented on Mar 30, 2016

    @asajeffrey
    ContributorAuthor

    PR #10242 merged.

  15. asajeffrey commented on Mar 30, 2016

    @asajeffrey
    ContributorAuthor

    I submitted PR #10295, which fixes some miscellaneous constellation panics. At this point, I think the only remaining panics are unavoidable:

    • Failure of message receive (can only happen in cases where the channel invariants have been vioated).
    • Failure of ipc-channel or process creation (requires a broader low-resource mechanism).
  16. pcwalton commented on Apr 1, 2016

    @pcwalton
    Contributor

    Why do recv failures always indicate bugs? Couldn't a crashed pipeline (in multiprocess mode, or just a panicking one) cause arbitrary recv failures in the constellation?

  17. jdm commented on Apr 1, 2016

    @jdm
    Member

    In cases where the receivers do not have a 1:1 relationship with a sender, the constellation holds on to a sender which should make it impossible for the recv to fail.

  18. asajeffrey commented on Apr 1, 2016

    @asajeffrey
    ContributorAuthor

    @paulrouget in #10334 points out that we should notify browser.html when a pipeline panics.

  19. asajeffrey commented on Apr 1, 2016

    @asajeffrey
    ContributorAuthor

    PRs #10082 and #10295 landed.

  20. asajeffrey commented on Apr 1, 2016

    @asajeffrey
    ContributorAuthor

    PR #10294 ran into homu trouble, and is now PR #10343.

  21. asajeffrey commented on Apr 1, 2016

    @asajeffrey
    ContributorAuthor

    PR #10345 addresses some coding style issues raised by @nox, about using unwrap_or_else for side-effects, rather than if let.

  22. asajeffrey commented on Apr 8, 2016

    @asajeffrey
    ContributorAuthor

    #10446 puts a test in to travis to ensure against regressions.

  23. asajeffrey commented on Apr 28, 2016

    @asajeffrey
    ContributorAuthor

    #10899 adds a test for constellation hardening. If we're feeling brave we could gate on it.

  24. asajeffrey commented on Apr 29, 2016

    @asajeffrey
    ContributorAuthor

    Once #10899 lands, we can close this metabug, woo hoo!

  25. paulrouget commented on May 2, 2016

    @paulrouget
    Contributor

    #10899 has landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-constellationB-metaI-panic

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions