Skip to content

Several tests fail or hang on linux with the official trunk snapshot toolchains #253

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

Closed
finagolfin opened this issue Feb 16, 2023 · 6 comments
Labels
v1.0 Work leading up first API stable version

Comments

@finagolfin
Copy link
Contributor

I see this both on linux x86_64 and Android AArch64. Is there no linux CI for this repo?

@FranzBusch
Copy link
Member

Are you still seeing this issue?

@finagolfin
Copy link
Contributor Author

finagolfin commented Feb 22, 2023

Yes, I see several tests hanging and failing on linux x86_64 with the latest Feb. 21 official trunk snapshot build for Ubuntu 20.04 x86_64 testing the latest trunk commit ffa6ee9. In particular, these tests all hang on Android AArch64 also:

AsyncAlgorithmsTests.TestCombineLatest2/test_throwing_ordering1
AsyncAlgorithmsTests.TestCombineLatest2/test_throwing_ordering2
AsyncAlgorithmsTests.TestZip2/test_zip_produces_one_element_and_throws_when_first_produces_one_element_and_throws
AsyncAlgorithmsTests.TestZip2/test_zip_produces_one_element_and_throws_when_second_produces_one_element_and_throws
AsyncAlgorithmsTests.TestZip3/test_zip_produces_one_element_and_throws_when_first_produces_one_element_and_throws
AsyncAlgorithmsTests.TestZip3/test_zip_produces_one_element_and_throws_when_second_produces_one_element_and_throws
AsyncAlgorithmsTests.TestZip3/test_zip_produces_one_element_and_throws_when_third_produces_one_element_and_throws

A handful more also fail, let me know if you cannot reproduce.

@FranzBusch
Copy link
Member

This PR should fix it: #254

@finagolfin
Copy link
Contributor Author

I'm still seeing a few sporadically hanging tests on Android AArch64, particularly if all the tests are run in parallel. This is when building the latest trunk commit from a couple weeks ago, e6b21d2.

I just cross-compiled the latest trunk snapshot toolchain for Android AArch64 and the following test hung once out of 10 runs of swift test --parallel:

TestBuffer/test_given_a_buffered_bounded_sequence_when_cancelling_consumer_then_the_iteration_finishes_and_the_base_is_cancelled

I also tried running 10 times with the last March 16 trunk source snapshot that I built natively on my Android phone, and that previous test hung once and this test hung once:

TestZip2/test_zip_finishes_when_iteration_task_is_cancelled

@FranzBusch
Copy link
Member

@buttaface Thanks for raising. This these tests are problematic because they are using test expectations which just don't work nicely in async methods. We should refactor these tests to become deterministic. This can be achieved with using AsyncStream etc.

@FranzBusch FranzBusch added the v1.0 Work leading up first API stable version label Jun 15, 2023
@finagolfin
Copy link
Contributor Author

I don't see these hangs any more on Android, so feel free to close if you're not seeing them either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.0 Work leading up first API stable version
Projects
None yet
Development

No branches or pull requests

2 participants