Skip to content

Spurious access violation (exit code: 3221225477) when compiling libsyntax with MSVC #50604

Closed

Description

@kennytm

Symptom: On MSVC builders (Windows), when compiling libsyntax in either stage0 or stage1, the compiler rustc will crash with exit code 3221225477 (= 0xc0000005 = access violation).

We suspect this is related to #50329 (merged at 2018-05-02T10:13:06Z).

Sample crash log
error: Could not compile `syntax`.
Caused by:
  process didn't exit successfully: `C:\projects\rust\build\bootstrap/debug/rustc --crate-name syntax libsyntax\lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C metadata=7ac7668085f2897f -C extra-filename=-7ac7668085f2897f --out-dir C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps --target i686-pc-windows-msvc -L dependency=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps -L dependency=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\release\deps --extern bitflags=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\libbitflags-9ba1f7028730cd0a.rlib --extern log=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\liblog-001e68131969f2ec.rlib --extern rustc_errors=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\rustc_errors-ffee8b3fc130b2b1.dll --extern syntax_pos=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\syntax_pos-1048adc53f632b89.dll --extern rustc_data_structures=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\rustc_data_structures-3a7257003acd8e8b.dll --extern scoped_tls=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\libscoped_tls-49f5fac2ae1c97d0.rlib --extern serialize=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\serialize-f37b7ca68fe29329.dll --extern serialize=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\libserialize-f37b7ca68fe29329.rlib --extern rustc_target=C:\projects\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\deps\rustc_target-63878e92b639df83.dll` (exit code: 3221225477)
command did not execute successfully: "C:\\projects\\rust\\build\\i686-pc-windows-msvc\\stage0/bin\\cargo.exe" "build" "--target" "i686-pc-windows-msvc" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "C:\\projects\\rust\\src/rustc/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
thread 'main' panicked at 'cargo must succeed', bootstrap\compile.rs:1091:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.

First seen on the following PRs:

cc #33434 (parent issue)

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    A-spuriousArea: Spurious failures in builds (spuriously == for no apparent reason)
    T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on May 10, 2018
  2. ishitatsuyuki commented on May 10, 2018

    @ishitatsuyuki
    Contributor

    cc @Zoxc Can you try to reproduce?

  3. Zoxc commented on May 10, 2018

    @Zoxc
    Contributor

    I haven't seen this locally. Does it happen often?

  4. kennytm commented on May 10, 2018

    @kennytm
    MemberAuthor

    As shown in the post, twice in the last 8 days so far. There are 3 other segfaults on Windows which might also be attributed here (#50000 (comment), #50418 (comment), #50466 (comment)).

  5. added a commit that references this issue on May 11, 2018
  6. added a commit that references this issue on May 12, 2018
  7. ishitatsuyuki commented on May 19, 2018

    @ishitatsuyuki
    Contributor

    Have this occurred this week?

  8. kennytm commented on May 19, 2018

    @kennytm
    MemberAuthor
  9. steveklabnik commented on Sep 24, 2019

    @steveklabnik
    Contributor

    It's been a while; has anyone seen this lately?

  10. DhruvDh commented on Feb 19, 2020

    @DhruvDh
    error: process didn't exit successfully: `target\release\dip_viewer.exe -f easy.txt` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
    

    happens at this code when running on particular machines build with --release. (msvc stable and nightly)
    Building without release gives -

    thread 'main' panicked at 'assertion failed: `(left == right)`
      left: `0`,
     right: `1`', C:\Users\ddhamani\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-native-0.4.2\src\hub.rs:120:9
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    error: process didn't exit successfully: `target\debug\dip_viewer.exe -f easy.txt` (exit code: 101)
    

    but it works fine on my laptop. This happens due to missing something wgpu dynamically links against?

  11. kennytm commented on Feb 19, 2020

    @kennytm
    MemberAuthor

    @DhruvDh hi, could you file a new issue for that? This issue only tracks spurious failure from Rust's CI and thus unsuitable for problems in user code.

  12. DhruvDh commented on Feb 19, 2020

    @DhruvDh

    sorry, I did not realize that.

  13. crlf0710 commented on Jun 13, 2021

    @crlf0710
    Member

    Now that libsyntax is now renamed and splitted and crates structure changed a lot since then, i'd suggest we just close this?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-spuriousArea: Spurious failures in builds (spuriously == for no apparent reason)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCO-windows-msvcToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions