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

Backtrace Debug tweaks #69122

Merged
merged 6 commits into from
Mar 16, 2020
Merged

Backtrace Debug tweaks #69122

merged 6 commits into from
Mar 16, 2020

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Feb 13, 2020

  • Change Debug representation of disabled and unsupported backtraces to use <placeholder> style, same as what we do for debug printing locked mutexes and mutably borrowed refcells;

    - Error { msg: "...", backtrace: disabled backtrace }
    + Error { msg: "...", backtrace: <disabled> }
  • Remove quotes around unresolved symbol names;

    - Backtrace [{ fn: "<unknown>" }]
    + Backtrace [{ fn: <unknown> }]
  • Add quotes around file paths;

    - Backtrace [{ fn: "krate::main", file: /path/to/main.rs, line: 10 }]
    + Backtrace [{ fn: "krate::main", file: "/path/to/main.rs", line: 10 }]
  • Add test.

@rust-highfive
Copy link
Collaborator

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 13, 2020
@cramertj
Copy link
Member

This looks like a good improvement to me, thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Feb 13, 2020

📌 Commit 3e4992bd0bdce396b31dbc74adb6bb189e60dc72 has been approved by cramertj

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 13, 2020
@bors
Copy link
Contributor

bors commented Feb 14, 2020

⌛ Testing commit 3e4992bd0bdce396b31dbc74adb6bb189e60dc72 with merge 805bc0a427640f64b9690d2c1c697338e907c6f2...

@rust-highfive
Copy link
Collaborator

The job armhf-gnu of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-02-14T07:41:31.2466964Z failures:
2020-02-14T07:41:31.2467188Z 
2020-02-14T07:41:31.2468151Z ---- backtrace::test_debug stdout ----
2020-02-14T07:41:31.2468852Z thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
2020-02-14T07:41:31.2469315Z   left: `"Backtrace [\n    { fn: \"__rust_maybe_catch_panic\" },\n    { fn: \"std::rt::lang_start_internal\", file: \"./rust/rt.rs\", line: 300 },\n    { fn: \"std::rt::lang_start\", file: \"./rust/rt.rs\", line: 400 },\n]"`,
2020-02-14T07:41:31.2470232Z  right: `"Backtrace [\n    { fn: \"__rust_maybe_catch_panic\" },\n    { fn: \"std::rt::lang_start_internal\", file: \"/rust/rt.rs\", line: 300 },\n    { fn: \"std::rt::lang_start\", file: \"/rust/rt.rs\", line: 400 },\n]"`', src/libstd/backtrace.rs:486:5
2020-02-14T07:41:31.2470946Z 
2020-02-14T07:41:31.2471179Z 
2020-02-14T07:41:31.2471807Z failures:
2020-02-14T07:41:31.2472061Z     backtrace::test_debug
---
2020-02-14T07:41:31.2596857Z 
2020-02-14T07:41:31.2596898Z 
2020-02-14T07:41:31.2597554Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target arm-unknown-linux-gnueabihf
2020-02-14T07:41:31.2597823Z Build completed unsuccessfully in 2:45:22
2020-02-14T07:41:31.2598461Z error: test failed, to rerun pass '-p std --lib'
2020-02-14T07:41:31.2659241Z   local time: Fri Feb 14 07:41:31 UTC 2020
2020-02-14T07:41:31.5540902Z   network time: Fri, 14 Feb 2020 07:41:31 GMT
2020-02-14T07:41:31.5545990Z == end clock drift check ==
2020-02-14T07:41:32.0895147Z 
2020-02-14T07:41:32.0895147Z 
2020-02-14T07:41:32.0990657Z ##[error]Bash exited with code '1'.
2020-02-14T07:41:32.1038944Z ##[section]Starting: Checkout rust-lang/rust@auto to s
2020-02-14T07:41:32.1041106Z ==============================================================================
2020-02-14T07:41:32.1041222Z Task         : Get sources
2020-02-14T07:41:32.1041306Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Feb 14, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 14, 2020
@JohnCSimon JohnCSimon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 16, 2020
@joelpalmer
Copy link

Triaged

For some reason the absolute paths were formatted differently on the
armhf-gnu target.

    thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
      left: `"Backtrace [\n    { fn: \"__rust_maybe_catch_panic\" },\n    { fn: \"std::rt::lang_start_internal\", file: \"./rust/rt.rs\", line: 300 },\n    { fn: \"std::rt::lang_start\", file: \"./rust/rt.rs\", line: 400 },\n]"`,
     right: `"Backtrace [\n    { fn: \"__rust_maybe_catch_panic\" },\n    { fn: \"std::rt::lang_start_internal\", file: \"/rust/rt.rs\", line: 300 },\n    { fn: \"std::rt::lang_start\", file: \"/rust/rt.rs\", line: 400 },\n]"`', src/libstd/backtrace.rs:486:5
@dtolnay
Copy link
Member Author

dtolnay commented Mar 9, 2020

  • Rebase
  • Fix armhf-gnu build

@bors r=cramertj

@bors
Copy link
Contributor

bors commented Mar 9, 2020

📌 Commit a2364dc has been approved by cramertj

@bors
Copy link
Contributor

bors commented Mar 9, 2020

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 9, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 10, 2020
Backtrace Debug tweaks

- Change Debug representation of disabled and unsupported backtraces to use \<placeholder\> style, same as what we do for debug printing locked mutexes and mutably borrowed refcells;

    ```diff
    - Error { msg: "...", backtrace: disabled backtrace }
    + Error { msg: "...", backtrace: <disabled> }
    ```

- Remove quotes around unresolved symbol names;

    ```diff
    - Backtrace [{ fn: "<unknown>" }]
    + Backtrace [{ fn: <unknown> }]
    ```

- Add quotes around file paths;

    ```diff
    - Backtrace [{ fn: "krate::main", file: /path/to/main.rs, line: 10 }]
    + Backtrace [{ fn: "krate::main", file: "/path/to/main.rs", line: 10 }]
    ```

- Add test.
bors added a commit that referenced this pull request Mar 10, 2020
Rollup of 6 pull requests

Successful merges:

 - #69122 (Backtrace Debug tweaks)
 - #69591 (Use TypeRelating for instantiating query responses)
 - #69760 (Improve expression & attribute parsing)
 - #69837 (Use smaller discriminants for generators)
 - #69838 (Expansion-driven outline module parsing)
 - #69859 (fix #62456)

Failed merges:

r? @ghost
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 14, 2020
Backtrace Debug tweaks

- Change Debug representation of disabled and unsupported backtraces to use \<placeholder\> style, same as what we do for debug printing locked mutexes and mutably borrowed refcells;

    ```diff
    - Error { msg: "...", backtrace: disabled backtrace }
    + Error { msg: "...", backtrace: <disabled> }
    ```

- Remove quotes around unresolved symbol names;

    ```diff
    - Backtrace [{ fn: "<unknown>" }]
    + Backtrace [{ fn: <unknown> }]
    ```

- Add quotes around file paths;

    ```diff
    - Backtrace [{ fn: "krate::main", file: /path/to/main.rs, line: 10 }]
    + Backtrace [{ fn: "krate::main", file: "/path/to/main.rs", line: 10 }]
    ```

- Add test.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 14, 2020
Backtrace Debug tweaks

- Change Debug representation of disabled and unsupported backtraces to use \<placeholder\> style, same as what we do for debug printing locked mutexes and mutably borrowed refcells;

    ```diff
    - Error { msg: "...", backtrace: disabled backtrace }
    + Error { msg: "...", backtrace: <disabled> }
    ```

- Remove quotes around unresolved symbol names;

    ```diff
    - Backtrace [{ fn: "<unknown>" }]
    + Backtrace [{ fn: <unknown> }]
    ```

- Add quotes around file paths;

    ```diff
    - Backtrace [{ fn: "krate::main", file: /path/to/main.rs, line: 10 }]
    + Backtrace [{ fn: "krate::main", file: "/path/to/main.rs", line: 10 }]
    ```

- Add test.
bors added a commit that referenced this pull request Mar 16, 2020
Rollup of 7 pull requests

Successful merges:

 - #67335 (Refactor the `Qualif` trait)
 - #69122 (Backtrace Debug tweaks)
 - #69520 (Make error message clearer about creating new module)
 - #69738 (More Method -> AssocFn renaming)
 - #69867 (Add long error explanation for E0628 )
 - #69989 (resolve/hygiene: `macro_rules` are not "legacy")
 - #70036 (Make article_and_description primarily use def_kind)

Failed merges:

r? @ghost
@bors bors merged commit 2443eb4 into rust-lang:master Mar 16, 2020
@dtolnay dtolnay deleted the backtrace branch May 23, 2020 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants