Skip to content

Recent nightly shows no info in backtraces #61416

@estebank

Description

@estebank
Contributor

Every since a recent nightly update, both distributed nightlies and locally built rustc produce backtraces where every level of the stack is represented only by their memory address and the label <unknown>:

$ RUST_BACKTRACE=full rustc +devel file.rs -Ztreat-err-as-bug
error[E0573]: expected type, found function `foo`
  --> file.rs:10:17
   |
10 |     let _ = S::<foo()> { x: [u8; foo()] };
   |                 ^^^^^ not a type

thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', src/librustc_errors/lib.rs:534:13
stack backtrace:
   0:        0x1115d3c84 - <unknown>
   1:        0x1115d1036 - <unknown>
   2:        0x1115d0dba - <unknown>
   3:        0x10f251322 - <unknown>
   4:        0x1115d1731 - <unknown>
   5:        0x11126f3b4 - <unknown>
   6:        0x11128a9b6 - <unknown>
   7:        0x111299fdc - <unknown>
   8:        0x10bbfcae9 - <unknown>
   9:        0x10b3e579d - <unknown>
  10:        0x10b333c10 - <unknown>
  11:        0x10b45b5b5 - <unknown>
  12:        0x10b43abe6 - <unknown>
  13:        0x10b330794 - <unknown>
  14:        0x10b39064d - <unknown>
  15:        0x10b38fa48 - <unknown>
  16:        0x10b391032 - <unknown>
  17:        0x10b4121db - <unknown>
  18:        0x10b0fa37e - <unknown>
  19:        0x10b178086 - <unknown>
  20:        0x10b167175 - <unknown>
  21:        0x10b175484 - <unknown>
  22:        0x10b11ce69 - <unknown>
  23:        0x1115f2cce - <unknown>
  24:        0x10b166408 - <unknown>
  25:        0x10b0d516b - <unknown>
  26:        0x1115b958d - <unknown>
  27:        0x1115f234d - <unknown>
  28:        0x1115e7bc8 - <unknown>
  29:     0x7fff784492ea - <unknown>
  30:     0x7fff7844c248 - <unknown>
query stack during panic:
end of query stack

Sadly I don't have a more specific repro case, but I can consistently reproduce locally. Older distributed nightlies do not present this behavior.

Activity

added
O-macosOperating system: macOS
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Jun 1, 2019
varkor

varkor commented on Jun 1, 2019

@varkor
Member

This happens consistently for me as well (also macOS).

Manishearth

Manishearth commented on Jun 1, 2019

@Manishearth
Member

I've been seeing this on Linux too, though it's been at least a week. (It also may have been fixed in a rustc newer than the one servo uses)

varkor

varkor commented on Jun 1, 2019

@varkor
Member

We should have tests for backtraces, so they don't regress again in the future.

estebank

estebank commented on Jun 1, 2019

@estebank
ContributorAuthor

@Manishearth this is certainly happening on master, and it's been happening for a while, but I assumed it was my env.

estebank

estebank commented on Jun 1, 2019

@estebank
ContributorAuthor

It just occurred to me that this might be related to the new symbol mangling #57967 (although I doubt it).

wesleywiser

wesleywiser commented on Jun 2, 2019

@wesleywiser
Member

I've been experiencing this for about a week now (also on macOS). It definitely started prior to #57967 being merged.

I also have the following in my config.toml:

# Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
# `0` - no debug info
# `1` - line tables only
# `2` - full debug info with variable and type information
# Can be overriden for specific subsets of Rust code (rustc, std or tools).
# Debuginfo for tests run with compiletest is not controlled by this option
# and needs to be enabled separately with `debuginfo-level-tests`.
debuginfo-level = 2

# Debuginfo level for the compiler.
debuginfo-level-rustc = 2

# Debuginfo level for the standard library.
debuginfo-level-std = 2

# Debuginfo level for the tools.
debuginfo-level-tools = 2
eddyb

eddyb commented on Jun 3, 2019

@eddyb
Member

#57967 has absolutely no changes if you don't use the -Z flag, so it's not from there.

ehuss

ehuss commented on Jun 3, 2019

@ehuss
Contributor

It's definitely #60852, I tried before and after. It works if you enable the "coresymbolication" feature, though that's obviously not an option for distribution. I tried the latest master of backtrace, but it didn't help.

alexcrichton

alexcrichton commented on Jun 3, 2019

@alexcrichton
Member

To confirm, is everyone only experiencing problems on OSX for rustc itself? Are there problems with other projects on OSX? @Manishearth can you please confirm or deny your experience from Linux? Throwing in a new platform here changes this quite a lot

alexcrichton

alexcrichton commented on Jun 3, 2019

@alexcrichton
Member

Ok I believe I've found the issue for OSX, but if other platforms are still an issue that would be good to know

5 remaining items

added a commit that references this issue on Jun 3, 2019
alexcrichton

alexcrichton commented on Jun 3, 2019

@alexcrichton
Member

@udoprog if that's only using the backtrace crate and not using libstd, can you open an issue on the repository?

The OSX issue should be fixed in rust-lang/backtrace-rs#196, which I'd like to finish testing and then I'll send an update to libstd.

That could affect Linux as well but I doubt it, so if there are persisting Linux/Windows issues please feel free to let me know. If you can create an isolated problem which uses the backtrace crate rather than libstd that's even better!

udoprog

udoprog commented on Jun 3, 2019

@udoprog
Contributor
added
O-macosOperating system: macOS
O-windowsOperating system: Windows
and removed
O-macosOperating system: macOS
on Jun 4, 2019
added 2 commits that reference this issue on Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)O-macosOperating system: macOSO-windowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @ehuss@alexcrichton@eddyb@udoprog@wesleywiser

    Issue actions

      Recent nightly shows no info in backtraces · Issue #61416 · rust-lang/rust