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

Uncatchable panic with no backtrace #12626

Closed
jdm opened this issue Jul 27, 2016 · 5 comments
Closed

Uncatchable panic with no backtrace #12626

jdm opened this issue Jul 27, 2016 · 5 comments
Assignees

Comments

@jdm
Copy link
Member

@jdm jdm commented Jul 27, 2016

STR:

  1. ./mach run https://samuknet.github.io/test_cases/iframeCSSRotate/ --debug
  2. b rust_panic
  3. run
  4. then wait 30s, then press escape
  5. in the terminal:
ERROR:servo: called `Result::unwrap()` on an `Err` value: Error { repr: Custom(Custom { kind: NotFound, error: StringError("Bogus destination port.") }) }

with no backtrace, and the breakpoint doesn't get hit before servo exits.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 27, 2016

RUST_LOG=constellation::constellation showed me:

    DEBUG:constellation::constellation: constellation exiting
    DEBUG:constellation::constellation: Pipeline PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) } exited.
    DEBUG:constellation::constellation: constellation got key event message
    DEBUG:constellation::constellation: constellation got key event message
    DEBUG:constellation::constellation: constellation got key event message
    DEBUG:constellation::constellation: Pipeline PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(0) } exited.
    DEBUG:constellation::constellation: Exiting image cache.
    DEBUG:constellation::constellation: Exiting core resource threads.
    DEBUG:constellation::constellation: Exiting storage resource threads.
    DEBUG:constellation::constellation: Exiting file manager resource threads.
    DEBUG:constellation::constellation: Exiting bluetooth thread.
    DEBUG:constellation::constellation: Exiting service worker manager thread.
    DEBUG:constellation::constellation: Exiting font cache thread.
    DEBUG:constellation::constellation: Asking compositor to complete shutdown.
    DEBUG:constellation::constellation: Sending log entry Warn("Panic hook called."). 

Panics that occur after the constellation disappears are now more challenging to diagnose. I'm also concerned that rust_panic isn't being hit.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 27, 2016

@jdm jdm added the A-constellation label Jul 27, 2016
@asajeffrey asajeffrey self-assigned this Jul 27, 2016
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 27, 2016

@jdm: we could log the backtrace when the panic happens, rather than expecting the constellation to do it, we just need to make sure that the panic isn't printed twice.

@emilio
Copy link
Member

@emilio emilio commented Jul 29, 2016

FWIW, That's the kind of problem I tried to solve with #12591, though arguably something that works out of the box would be a much better solution.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 29, 2016

IRC chat with @jdm: http://logs.glob.uno/?c=mozilla%23servo&s=29+Jul+2016&e=29+Jul+2016#c491961

Summary: println! the backtrace if RUST_BACKTRACE is set.

bors-servo added a commit that referenced this issue Aug 11, 2016
Print backtraces for panics, even if the constellation has closed.

<!-- Please describe your changes on the following line: -->

At the moment, threads rely on the constellation to print out the reason for a panic, so panics that happen after the constellation closes are dropped on the floor. cc @jdm

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12626
- [X] These changes do not require tests because they are fixing panic behaviour

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12657)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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