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

!Send Future fails Miri check #6750

Closed
coder137 opened this issue Aug 6, 2024 · 4 comments
Closed

!Send Future fails Miri check #6750

coder137 opened this issue Aug 6, 2024 · 4 comments
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug.

Comments

@coder137
Copy link

coder137 commented Aug 6, 2024

Version
1.38.1 and 1.39.2

Platform
Ubuntu, Windows and Mac
https://github.com/coder137/ticked-async-executor/actions/runs/10259175195

Description
Creating TickedAsyncExecutor to advance local async tasks only when the executor is ticked.
Repo reference: https://github.com/coder137/ticked-async-executor

The tokio test(s) fail only when future provided is !Send and join! macro is used.

Replication

Passing test when Send future is used:

Branch: https://github.com/coder137/ticked-async-executor/tree/tokio_test
Test: https://github.com/coder137/ticked-async-executor/blob/tokio_test/tests/tokio_tests.rs
CI: https://github.com/coder137/ticked-async-executor/actions/runs/10259106870

Failing test when !Send future is used:

Branch: https://github.com/coder137/ticked-async-executor/blob/tokio_test_spawn_local
Test: https://github.com/coder137/ticked-async-executor/blob/tokio_test_spawn_local/tests/tokio_tests.rs
CI: https://github.com/coder137/ticked-async-executor/actions/runs/10259175195

Failing info/logs

= help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

0_build (ubuntu-latest).txt

@coder137 coder137 added A-tokio Area: The main tokio crate C-bug Category: This is a bug. labels Aug 6, 2024
@Darksonn
Copy link
Contributor

Darksonn commented Aug 6, 2024

Does this still happen with #6744? It's in the master branch, but not yet a release.

@coder137
Copy link
Author

coder137 commented Aug 6, 2024

Miri still fails,
Is this a false positive, or is using join! fundamentally unsound?

Upgraded the tokio rev tag to use #6744

Test Patch: coder137/ticked-async-executor@6cc5e9d#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
CI/CD: https://github.com/coder137/ticked-async-executor/actions/runs/10274884563

@Darksonn
Copy link
Contributor

Darksonn commented Aug 7, 2024

Like what #6744 did, I recommend filing an issue with miri.

@Darksonn
Copy link
Contributor

I'll close this for not being an issue in Tokio, but I'll be keeping an eye on the other thread.

@Darksonn Darksonn closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants