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

i686-pc-windows-gnu broken on CI #1592

Closed
gnzlbg opened this issue Nov 13, 2019 · 2 comments · Fixed by #3489
Closed

i686-pc-windows-gnu broken on CI #1592

gnzlbg opened this issue Nov 13, 2019 · 2 comments · Fixed by #3489
Labels
A-CI Area: CI-related items O-windows

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 13, 2019

The i686-pc-windows-gnu target has been disabled on CI because it fails with the following segmentation fault:

error: test failed, to rerun pass '--test main'

Caused by:
  process didn't exit successfully: `D:\a\1\s\target\i686-pc-windows-gnu\debug\deps\main-65866843958a68e7.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
./ci/run.sh: line 93:  1846 Segmentation fault      cargo test -vv $opt --no-default-features --manifest-path libc-test/Cargo.toml --target "${TARGET}"

For example, see: https://dev.azure.com/rust-lang2/libc/_build/results?buildId=608

This issue tracks re-enabling CI for this target. Even though this is a tier-1 target, it has been broken for a sufficiently long time that new releases of libc won't be tested against it, and probably rust-lang/rust libc version will be updated to one of those sooner or later. Without a debugger, there is not much I can do here.

cc @mati865 @retep998 (feel free to ping windows users that might be able to investigate)

@gnzlbg gnzlbg added the C-API-request Category: API request label Nov 13, 2019
@mati865
Copy link
Contributor

mati865 commented Nov 13, 2019

Latest nightly has fix for i686 miscompilation: rust-lang/rust#66318
Can you retry the build?

It doesn't help.

@JohnTitor JohnTitor added the A-CI Area: CI-related items label Feb 29, 2020
@mati865
Copy link
Contributor

mati865 commented Apr 8, 2020

Hopefully useful:

(lldb) r
Process 11012 launched: 'D:\msys64\tmp\libc\target\i686-pc-windows-gnu\debug\deps\main-fc7d8e49f1073eac.exe' (i686)
RUNNING ALL TESTS
Process 11012 stopped
* thread #1, stop reason = Exception 0xc0000005 encountered at address 0x4adab0: Access violation writing location 0x2ef71bd1
    frame #0: 0x004adab0 main-fc7d8e49f1073eac.exe`__test_roundtrip_max_align_t(value=max_align_t @ 0x009bfa90, rust_size=1996201872, error=0x2ef71bd1, pad="") at main.c:4583:28
   4580                         "size of max_align_t is %d in C and %d in Rust\n",
   4581                         (int)size, (int)rust_size
   4582                     );
-> 4583                     *error = 1;
                                   ^
   4584                     return value;
   4585                 }
   4586                 int i = 0;
(lldb) bt
(lldb) bt
* thread #1, stop reason = Exception 0xc0000005 encountered at address 0x4adab0: Access violation writing location 0x2ef71bd1
  * frame #0: 0x004adab0 main-fc7d8e49f1073eac.exe`__test_roundtrip_max_align_t

(value=max_align_t @ 0x009bfa90, rust_size=1996201872, error=0x2ef71bd1, pad="") at main.c:4583:28
    frame #1: 0x00437768 main-fc7d8e49f1073eac.exe`main::roundtrip_max_align_t::h65d307f4f71a6fd7 at main.rs:10705:30
    frame #2: 0x00438309 main-fc7d8e49f1073eac.exe`main::run_all::h3dd94fce5ecf1967 at main.rs:11128:1
    frame #3: 0x0040726b main-fc7d8e49f1073eac.exe`main::main::hdad19dffed1e8e93 at main.rs:10:17
    frame #4: 0x00401709 main-fc7d8e49f1073eac.exe`std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h88bbd130d597fbb4 at rt.rs:67:34
    frame #5: 0x0045bb17 main-fc7d8e49f1073eac.exe`std::sys_common::backtrace::__rust_begin_short_backtrace::ha765656654808a54 [inlined] std::rt::lang_start_internal::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h1cb0c3cf3d0f3b7b at rt.rs:52:73
    frame #6: 0x0045bb13 main-fc7d8e49f1073eac.exe`std::sys_common::backtrace::__rust_begin_short_backtrace::ha765656654808a54 at backtrace.rs:130
    frame #7: 0x0045f459 main-fc7d8e49f1073eac.exe`std::rt::lang_start_internal::h848f63bc4d320e91 [inlined] std::rt::lang_start_internal::_$u7b$$u7b$closure$u7d$$u7d$::h99b24a7dbe4a88ad at rt.rs:52:13
    frame #8: 0x0045f450 main-fc7d8e49f1073eac.exe`std::rt::lang_start_internal::h848f63bc4d320e91 [inlined] std::panicking::try::do_call::hf91bc4678426bdd4 at panicking.rs:331
    frame #9: 0x0045f450 main-fc7d8e49f1073eac.exe`std::rt::lang_start_internal::h848f63bc4d320e91 [inlined] std::panicking::try::hee89baf923f68bc0 at panicking.rs:274
    frame #10: 0x0045f450 main-fc7d8e49f1073eac.exe`std::rt::lang_start_internal::h848f63bc4d320e91 [inlined] std::panic::catch_unwind::h64b2c4628ae51fc5 at panic.rs:394
    frame #11: 0x0045f450 main-fc7d8e49f1073eac.exe`std::rt::lang_start_internal::h848f63bc4d320e91 at rt.rs:51
    frame #12: 0x004016f0 main-fc7d8e49f1073eac.exe`std::rt::lang_start::h1dda6c3e8dc7faa1(main=(main-fc7d8e49f1073eac.exe`main::main::hdad19dffed1e8e93 at main.rs:8), argc=1, argv=0x01412d08) at rt.rs:67:5
    frame #13: 0x00438643 main-fc7d8e49f1073eac.exe`_main + 51
    frame #14: 0x00401386 main-fc7d8e49f1073eac.exe`__tmainCRTStartup at crtexe.c:339:15
    frame #15: 0x74926359 kernel32.dll`BaseThreadInitThunk + 25
    frame #16: 0x76fa7b74 ntdll.dll`RtlGetAppContainerNamedObjectPath + 228
    frame #17: 0x76fa7b44 ntdll.dll`RtlGetAppContainerNamedObjectPath + 180

main.c.txt

When built with Clang it prints this before crash:

bad max_align_t size: rust: 48 (0x30) != c 24 (0x18)
bad max_align_t align: rust: 16 (0x10) != c 8 (0x8)

EDIT: It does not crash when built by Clang with max_align_t size = 24 and max_align_t align = 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: CI-related items O-windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants