Skip to content

async-drop-initial.rs test failing on Fuchsia #140493

Closed
@erickt

Description

@erickt

The new test tests/ui/async-await/async-drop/async-drop-initial.rs, which was added by @azhogin in #123948 is failing when run inside Fuchsia. We're getting this assertion failure from the test:

thread 'main' panicked at /b/s/w/ir/x/w/fuchsia-third_party-rust/tests/ui/async-await/async-drop/async-drop-initial.rs:28:5:
assertion `left == right` failed: sizes did not match for async destructor of type async_drop_initial::AsyncStruct
  left: 136
 right: 168

I'm not sure why the struct's size on Fuchsia is a little smaller than other platforms. I'm pretty sure you can access the test results on https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/rust_test-x64-linux/b8716325659626107441/overview.

We'll keep digging on our side, but I wanted to get this out in case it was obvious to @azhogin where this test failure could be coming from. If anyone does want to try to reproduce it, we have docs on https://doc.rust-lang.org/nightly/rustc/platform-support/fuchsia.html that step through the process. Please feel free to ping me here or over zulip if anyone wants help with it.

Meta

This is with a rustc compiler built by our CI with the commit 7d65abf, with the full build log in https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/rust-linux-x64/b8716325658745871665/overview.

Backtrace

failures:

---- [ui] tests/ui/async-await/async-drop/async-drop-initial.rs stdout ----


executing env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/b/s/w/ir/x/w/fuchsia-third_party-rust/tests/ui/async-await/async-drop/async-drop-initial.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/b/s/w/ir/x/t/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/b/s/w/ir/x/w/fuchsia-third_party-rust/vendor" "--sysroot" "/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-fuchsia" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/test/ui/async-await/async-drop/async-drop-initial/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-fuchsia/native/rust-test-helpers" "-Zpanic-abort-tests" "-Clink-arg=--sysroot=/b/s/w/ir/x/w/sdk/arch/x64/sysroot" "-L" "/b/s/w/ir/x/w/sdk/arch/x64/sysroot/lib" "-L" "/b/s/w/ir/x/w/sdk/arch/x64/lib" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "-Clinker=/b/s/w/ir/x/w/cipd/bin/ld.lld" "--edition=2021"
------rustc stdout------------------------------

------rustc stderr------------------------------

------------------------------------------
executing RUSTC="/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUST_TEST_THREADS="1" "/b/s/w/ir/x/w/fuchsia-third_party-rust/src/ci/docker/scripts/fuchsia-test-runner.py" "run" "0" "/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/test/ui/async-await/async-drop/async-drop-initial/a"
------fuchsia-test-runner.py stdout------------------------------
AsyncInt::Dropper::poll: 0
AsyncInt::Dropper::poll: 1
AsyncInt::Dropper::poll: 2
AsyncInt::Dropper::poll: 3
AsyncInt::Dropper::poll: 4

------fuchsia-test-runner.py stderr------------------------------

thread 'main' panicked at /b/s/w/ir/x/w/fuchsia-third_party-rust/tests/ui/async-await/async-drop/async-drop-initial.rs:28:5:
assertion `left == right` failed: sizes did not match for async destructor of type async_drop_initial::AsyncStruct
  left: 136
 right: 168
stack backtrace:
{{{reset:begin}}}
{{{module:0x0::elf:90ef30e8a3736eade989a16daadba27d6d1ccf24}}}
{{{mmap:0x2702a758000:0xae4:load:0x0:r:0x0}}}
{{{mmap:0x2702a759000:0xa80:load:0x0:rx:0x1000}}}
{{{mmap:0x2702a75a000:0x1000:load:0x0:rw:0x2000}}}
{{{module:0x1:libstd-eee87221104a789d.so:elf:db901c3193b991fcef48b2d5d697238fcf7a76e9}}}
{{{mmap:0x192d9bcc000:0x72abc:load:0x1:r:0x0}}}
{{{mmap:0x192d9c3f000:0x98d80:load:0x1:rx:0x73000}}}
{{{mmap:0x192d9cd8000:0x9000:load:0x1:rw:0x10c000}}}
{{{mmap:0x192d9ce1000:0x1310:load:0x1:rw:0x115000}}}
{{{module:0x2:<vDSO>:elf:14fc58c5021cc7c9cdc94d629ad690d576655ab9}}}
{{{mmap:0x42b9f847f000:0xa714:load:0x2:r:0x0}}}
{{{mmap:0x42b9f848a000:0x2000:load:0x2:rx:0xb000}}}
{{{module:0x3:libc.so:elf:b5aee70451af6947a3690c9c357e0ab4e74cebc7}}}
{{{mmap:0x403ef3b33000:0x4bab0:load:0x3:r:0x0}}}
{{{mmap:0x403ef3b7f000:0x721a0:load:0x3:rx:0x4c000}}}
{{{mmap:0x403ef3bf2000:0x1000:load:0x3:rw:0xbf000}}}
{{{mmap:0x403ef3bf3000:0x121e0:load:0x3:rw:0xc0000}}}
{{{module:0x4:libfdio.so:elf:4d084b212795a73c5832edcfbe78ba3b22add575}}}
{{{mmap:0x2193d851000:0x16268:load:0x4:r:0x0}}}
{{{mmap:0x2193d868000:0x73b60:load:0x4:rx:0x17000}}}
{{{mmap:0x2193d8dc000:0x3000:load:0x4:rw:0x8b000}}}
{{{mmap:0x2193d8df000:0x5100:load:0x4:rw:0x8e000}}}
{{{reset:end}}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

------------------------------------------
Saved the actual run.stdout to "/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/test/ui/async-await/async-drop/async-drop-initial/async-drop-initial.run.stdout"
diff of run.stdout:

3	AsyncInt::Dropper::poll: 2
4	AsyncInt::Dropper::poll: 3
5	AsyncInt::Dropper::poll: 4
-	AsyncStruct::Dropper::poll: 6
-	AsyncInt::Dropper::poll: 7
-	AsyncInt::Dropper::poll: 8
-	AsyncReference::Dropper::poll: 10
-	AsyncInt::Dropper::poll: 11
-	AsyncEnum(A)::Dropper::poll: 12
-	SyncInt::drop: 12
-	AsyncEnum(B)::Dropper::poll: 13
-	AsyncInt::Dropper::poll: 13
-	SyncInt::drop: 14
-	SyncThenAsync::drop: 15
-	AsyncInt::Dropper::poll: 16
-	SyncInt::drop: 17
-	AsyncInt::Dropper::poll: 18
-	AsyncInt::Dropper::poll: 19
-	AsyncInt::Dropper::poll: 20
-	AsyncUnion::Dropper::poll: 21, 21
23	


The actual run.stdout differed from the expected run.stdout.
Saved the actual run.stderr to "/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/test/ui/async-await/async-drop/async-drop-initial/async-drop-initial.run.stderr"
normalized run.stderr:

thread 'main' panicked at $DIR/async-drop-initial.rs:28:5:
assertion `left == right` failed: sizes did not match for async destructor of type async_drop_initial::AsyncStruct
  left: 136
 right: 168
stack backtrace:
{{{reset:begin}}}
{{{module:0x0::elf:90ef30e8a3736eade989a16daadba27d6d1ccf24}}}
{{{mmap:0x2702a758000:0xae4:load:0x0:r:0x0}}}
{{{mmap:0x2702a759000:0xa80:load:0x0:rx:0x1000}}}
{{{mmap:0x2702a75a000:0x1000:load:0x0:rw:0x2000}}}
{{{module:0x1:libstd-eee87221104a789d.so:elf:db901c3193b991fcef48b2d5d697238fcf7a76e9}}}
{{{mmap:0x192d9bcc000:0x72abc:load:0x1:r:0x0}}}
{{{mmap:0x192d9c3f000:0x98d80:load:0x1:rx:0x73000}}}
{{{mmap:0x192d9cd8000:0x9000:load:0x1:rw:0x10c000}}}
{{{mmap:0x192d9ce1000:0x1310:load:0x1:rw:0x115000}}}
{{{module:0x2:<vDSO>:elf:14fc58c5021cc7c9cdc94d629ad690d576655ab9}}}
{{{mmap:0x42b9f847f000:0xa714:load:0x2:r:0x0}}}
{{{mmap:0x42b9f848a000:0x2000:load:0x2:rx:0xb000}}}
{{{module:0x3:libc.so:elf:b5aee70451af6947a3690c9c357e0ab4e74cebc7}}}
{{{mmap:0x403ef3b33000:0x4bab0:load:0x3:r:0x0}}}
{{{mmap:0x403ef3b7f000:0x721a0:load:0x3:rx:0x4c000}}}
{{{mmap:0x403ef3bf2000:0x1000:load:0x3:rw:0xbf000}}}
{{{mmap:0x403ef3bf3000:0x121e0:load:0x3:rw:0xc0000}}}
{{{module:0x4:libfdio.so:elf:4d084b212795a73c5832edcfbe78ba3b22add575}}}
{{{mmap:0x2193d851000:0x16268:load:0x4:r:0x0}}}
{{{mmap:0x2193d868000:0x73b60:load:0x4:rx:0x17000}}}
{{{mmap:0x2193d8dc000:0x3000:load:0x4:rw:0x8b000}}}
{{{mmap:0x2193d8df000:0x5100:load:0x4:rw:0x8e000}}}
{{{reset:end}}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.



The actual run.stderr differed from the expected run.stderr.

error: 2 errors occurred comparing run output.
status: exit status: 1
command: RUSTC="/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUST_TEST_THREADS="1" "/b/s/w/ir/x/w/fuchsia-third_party-rust/src/ci/docker/scripts/fuchsia-test-runner.py" "run" "0" "/b/s/w/ir/x/w/staging/build/fuchsia-build/x86_64-unknown-linux-gnu/test/ui/async-await/async-drop/async-drop-initial/a"
--- stdout -------------------------------
AsyncInt::Dropper::poll: 0
AsyncInt::Dropper::poll: 1
AsyncInt::Dropper::poll: 2
AsyncInt::Dropper::poll: 3
AsyncInt::Dropper::poll: 4
------------------------------------------
--- stderr -------------------------------

thread 'main' panicked at /b/s/w/ir/x/w/fuchsia-third_party-rust/tests/ui/async-await/async-drop/async-drop-initial.rs:28:5:
assertion `left == right` failed: sizes did not match for async destructor of type async_drop_initial::AsyncStruct
  left: 136
 right: 168
stack backtrace:
{{{reset:begin}}}
{{{module:0x0::elf:90ef30e8a3736eade989a16daadba27d6d1ccf24}}}
{{{mmap:0x2702a758000:0xae4:load:0x0:r:0x0}}}
{{{mmap:0x2702a759000:0xa80:load:0x0:rx:0x1000}}}
{{{mmap:0x2702a75a000:0x1000:load:0x0:rw:0x2000}}}
{{{module:0x1:libstd-eee87221104a789d.so:elf:db901c3193b991fcef48b2d5d697238fcf7a76e9}}}
{{{mmap:0x192d9bcc000:0x72abc:load:0x1:r:0x0}}}
{{{mmap:0x192d9c3f000:0x98d80:load:0x1:rx:0x73000}}}
{{{mmap:0x192d9cd8000:0x9000:load:0x1:rw:0x10c000}}}
{{{mmap:0x192d9ce1000:0x1310:load:0x1:rw:0x115000}}}
{{{module:0x2:<vDSO>:elf:14fc58c5021cc7c9cdc94d629ad690d576655ab9}}}
{{{mmap:0x42b9f847f000:0xa714:load:0x2:r:0x0}}}
{{{mmap:0x42b9f848a000:0x2000:load:0x2:rx:0xb000}}}
{{{module:0x3:libc.so:elf:b5aee70451af6947a3690c9c357e0ab4e74cebc7}}}
{{{mmap:0x403ef3b33000:0x4bab0:load:0x3:r:0x0}}}
{{{mmap:0x403ef3b7f000:0x721a0:load:0x3:rx:0x4c000}}}
{{{mmap:0x403ef3bf2000:0x1000:load:0x3:rw:0xbf000}}}
{{{mmap:0x403ef3bf3000:0x121e0:load:0x3:rw:0xc0000}}}
{{{module:0x4:libfdio.so:elf:4d084b212795a73c5832edcfbe78ba3b22add575}}}
{{{mmap:0x2193d851000:0x16268:load:0x4:r:0x0}}}
{{{mmap:0x2193d868000:0x73b60:load:0x4:rx:0x17000}}}
{{{mmap:0x2193d8dc000:0x3000:load:0x4:rw:0x8b000}}}
{{{mmap:0x2193d8df000:0x5100:load:0x4:rw:0x8e000}}}
{{{reset:end}}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
------------------------------------------



failures:
    [ui] tests/ui/async-await/async-drop/async-drop-initial.rs

test result: FAILED. 18509 passed; 1 failed; 469 ignored; 0 measured; 0 filtered out; finished in 1931.04s

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.F-async_drop`#![feature(async_drop)]`O-fuchsiaOperating system: FuchsiaT-compilerRelevant to the compiler 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