Skip to content

Intermittent failure in src/test/ui/reify-intrinsic.stderr #65036

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Aaron1011 opened this issue Oct 3, 2019 · 1 comment · Fixed by #65043
Closed

Intermittent failure in src/test/ui/reify-intrinsic.stderr #65036

Aaron1011 opened this issue Oct 3, 2019 · 1 comment · Fixed by #65043
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`) A-reproducibility Area: Reproducible / deterministic builds A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Aaron1011
Copy link
Member

The test src/test/ui/reify-intrinsic.stderr appears to be intermittently changing its output. Usually, it prints:

unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}

but sometimes it prints:

unsafe extern "rust-intrinsic" fn(_) -> _ {std::mem::transmute::<_, _>}

See a4cad41 for an example of this happening.

Here's a log snippet from a compiler build which prints std::intrinsics::transmute (the current expected output):

[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(2:965 ~ core[5cf2]::intrinsics[0]::[1]::transmute[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: cur_def_key=DefKey { parent: Some(DefIndex(924)), disambiguated_data: DisambiguatedDefPathData { data: ValueNs("transmute"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(2:750 ~ core[5cf2]::intrinsics[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: cur_def_key=DefKey { parent: Some(DefIndex(0)), disambiguated_data: DisambiguatedDefPathData { data: TypeNs("intrinsics"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(1:0 ~ std[5758])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(0:11 ~ reify_intrinsic[317d]::std[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: visible_parent=DefId(1:0 ~ std[5758]) actual_parent=Some(DefId(2:0 ~ core[5cf2]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("intrinsics") visible_parent=DefId(1:0 ~ std[5758]) actual_parent=Some(DefId(2:0 ~ core[5cf2]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("intrinsics")
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: visible_parent=DefId(2:750 ~ core[5cf2]::intrinsics[0]) actual_parent=Some(DefId(2:924 ~ core[5cf2]::intrinsics[0]::[1]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=ValueNs("transmute") visible_parent=DefId(2:750 ~ core[5cf2]::intrinsics[0]) actual_parent=Some(DefId(2:924 ~ core[5cf2]::intrinsics[0]::[1]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=ValueNs("transmute")

Note [DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=ValueNs("transmute") visible_parent=DefId(2:750 ~ core[5cf2]::intrinsics[0]) actual_parent=Some(DefId(2:924 ~ core[5cf2]::intrinsics[0]::[1])) - this indicates that the chosen visible_parent (which is what actually gets printed) is core::intrinsics

Output from a compiler which prints std::mem::transmute:

[DEBUG rustc::ty::print] default_print_def_path: key=DefKey { parent: Some(DefIndex(924)), disambiguated_data: DisambiguatedDefPathData { data: ValueNs("transmute"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(2:965 ~ core[5cf2]::intrinsics[0]::[1]::transmute[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: cur_def_key=DefKey { parent: Some(DefIndex(924)), disambiguated_data: DisambiguatedDefPathData { data: ValueNs("transmute"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(2:1114 ~ core[5cf2]::mem[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: cur_def_key=DefKey { parent: Some(DefIndex(0)), disambiguated_data: DisambiguatedDefPathData { data: TypeNs("mem"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(1:0 ~ std[5758])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(0:11 ~ bad_intrinsic[317d]::std[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: visible_parent=DefId(1:0 ~ std[5758]) actual_parent=Some(DefId(2:0 ~ core[5cf2]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("mem") visible_parent=DefId(1:0 ~ std[5758]) actual_parent=Some(DefId(2:0 ~ core[5cf2]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("mem")
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: visible_parent=DefId(2:1114 ~ core[5cf2]::mem[0]) actual_parent=Some(DefId(2:924 ~ core[5cf2]::intrinsics[0]::[1]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=ValueNs("transmute") visible_parent=DefId(2:1114 ~ core[5cf2]::mem[0]) actual_parent=Some(DefId(2:924 ~ core[5cf2]::intrinsics[0]::[1]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=ValueNs("transmute")
[DEBUG rustc::ty::print::pretty] def_path_str: def_id=DefId(2:1542 ~ core[5cf2]::marker[0]::Copy[0]), ns=TypeNS
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(2:1542 ~ core[5cf2]::marker[0]::Copy[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: cur_def_key=DefKey { parent: Some(DefIndex(1529)), disambiguated_data: DisambiguatedDefPathData { data: TypeNs("Copy"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(2:1529 ~ core[5cf2]::marker[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: cur_def_key=DefKey { parent: Some(DefIndex(0)), disambiguated_data: DisambiguatedDefPathData { data: TypeNs("marker"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(1:0 ~ std[5758])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(0:11 ~ bad_intrinsic[317d]::std[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: visible_parent=DefId(1:0 ~ std[5758]) actual_parent=Some(DefId(2:0 ~ core[5cf2]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("marker") visible_parent=DefId(1:0 ~ std[5758]) actual_parent=Some(DefId(2:0 ~ core[5cf2]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("marker")
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: visible_parent=DefId(2:1529 ~ core[5cf2]::marker[0]) actual_parent=Some(DefId(2:1529 ~ core[5cf2]::marker[0]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("Copy") visible_parent=DefId(2:1529 ~ core[5cf2]::marker[0]) actual_parent=Some(DefId(2:1529 ~ core[5cf2]::marker[0]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("Copy")
[DEBUG rustc::ty::print::pretty] def_path_str: def_id=DefId(2:1542 ~ core[5cf2]::marker[0]::Copy[0]), ns=TypeNS
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(2:1542 ~ core[5cf2]::marker[0]::Copy[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: cur_def_key=DefKey { parent: Some(DefIndex(1529)), disambiguated_data: DisambiguatedDefPathData { data: TypeNs("Copy"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(2:1529 ~ core[5cf2]::marker[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: cur_def_key=DefKey { parent: Some(DefIndex(0)), disambiguated_data: DisambiguatedDefPathData { data: TypeNs("marker"), disambiguator: 0 } }
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(1:0 ~ std[5758])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: def_id=DefId(0:11 ~ bad_intrinsic[317d]::std[0])
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: visible_parent=DefId(1:0 ~ std[5758]) actual_parent=Some(DefId(2:0 ~ core[5cf2]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("marker") visible_parent=DefId(1:0 ~ std[5758]) actual_parent=Some(DefId(2:0 ~ core[5cf2]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("marker")
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: visible_parent=DefId(2:1529 ~ core[5cf2]::marker[0]) actual_parent=Some(DefId(2:1529 ~ core[5cf2]::marker[0]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("Copy") visible_parent=DefId(2:1529 ~ core[5cf2]::marker[0]) actual_parent=Some(DefId(2:1529 ~ core[5cf2]::marker[0]))
[DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=TypeNs("Copy")

Note [DEBUG rustc::ty::print::pretty] try_print_visible_def_path: data=ValueNs("transmute") visible_parent=DefId(2:1114 ~ core[5cf2]::mem[0]) actual_parent=Some(DefId(2:924 ~ core[5cf2]::intrinsics[0]::[1])) - here, the visible_parent is core::mem.

There appears to be some non-determinism occuring, but I'm not sure where.

@Aaron1011 Aaron1011 changed the title Intermittent failure in Intermittent failure in src/test/ui/reify-intrinsic.stderr Oct 3, 2019
@Centril Centril added C-bug Category: This is a bug. A-pretty Area: Pretty printing (including `-Z unpretty`) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 3, 2019
@Aaron1011
Copy link
Member Author

Aaron1011 commented Oct 3, 2019

This is blocking #64906 - some builders are printing std::mem::transmute while others are printing std::intrinsic::transmute, making it impossible to merge.

@jonas-schievink jonas-schievink added A-resolve Area: Name/path resolution done by `rustc_resolve` specifically A-reproducibility Area: Reproducible / deterministic builds labels Oct 3, 2019
@bors bors closed this as completed in 0358617 Oct 6, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`) A-reproducibility Area: Reproducible / deterministic builds A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants