Skip to content

[Distributed] Invoking distributed func defined via extension crashes on x86 #42423

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
wants to merge 2 commits into from

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Apr 18, 2022

Resolves rdar://91888361

Making sure such calls still call the remote impl and don't get tricked by the existential.
This is super important that this always works, so making sure by including the tests.

@ktoso
Copy link
Contributor Author

ktoso commented Apr 18, 2022

@swift-ci please smoke test

@ktoso ktoso added the distributed Feature → concurrency: distributed actor label Apr 18, 2022
@DougGregor
Copy link
Member

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Apr 23, 2022

This does crash indeed... Wait, I'm confused... This did crash on Linux CI now, but does not crash on my mac -- something weird happening 🤔 Will verify with a debug build on linux in a bit.

@ktoso ktoso changed the title [Distributed] more tests to call through on remote any SomeDistActor [Distributed] Invoking distributed func defined via extension crashes on x86 Apr 27, 2022
@ktoso
Copy link
Contributor Author

ktoso commented May 8, 2022

I believe this #58745 might also fix this -- Checking...

@ktoso
Copy link
Contributor Author

ktoso commented May 9, 2022

This is now crashing like:

+ /usr/bin/env DYLD_LIBRARY_PATH=/Users/ktoso/code/swift-project/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/lib/swift/macosx /Users/ktoso/code/swift-project/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/test-macosx-x86_64/Distributed/Runtime/Output/distributed_actor_hop_to.swift.tmp/a.out
+ /usr/local/bin/python3 /Users/ktoso/code/swift-project/swift/utils/PathSanitizingFileCheck --allow-unused-prefixes --sanitize BUILD_DIR=/Users/ktoso/code/swift-project/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64 --sanitize SOURCE_DIR=/Users/ktoso/code/swift-project/swift --use-filecheck /Users/ktoso/code/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/bin/FileCheck /Users/ktoso/code/swift-project/swift/test/Distributed/Runtime/distributed_actor_hop_to.swift --color
objc[15800]: autorelease pool page 0x1089a9000 corrupted
  magic     0x00000010 0x00000000 0x0898b11c 0x00000001
  should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
  pthread   0x0
  should be 0x700005bbd000

@ktoso ktoso added distributed Feature → concurrency: distributed actor and removed distributed Feature → concurrency: distributed actor help wanted labels Jun 20, 2022
@ktoso
Copy link
Contributor Author

ktoso commented Jun 22, 2022

(I believe this was fixed along other issues, will try to confirm soon)

@ktoso ktoso marked this pull request as draft June 22, 2022 08:11
@ktoso ktoso changed the title [Distributed] Invoking distributed func defined via extension crashes on x86 [Distributed][Likely Fixed] Invoking distributed func defined via extension crashes on x86 Jun 22, 2022
@ktoso ktoso force-pushed the wip-more-tests-anyactor branch from ed2407b to 4c4d8c5 Compare June 25, 2022 01:56
@ktoso
Copy link
Contributor Author

ktoso commented Jun 25, 2022

@swift-ci please test

@ktoso ktoso marked this pull request as ready for review June 25, 2022 02:22
@ktoso ktoso changed the title [Distributed][Likely Fixed] Invoking distributed func defined via extension crashes on x86 [Distributed] Invoking distributed func defined via extension crashes on x86 Jun 25, 2022
@ktoso
Copy link
Contributor Author

ktoso commented Jun 25, 2022

It only fails on optimized build it seems.

@ktoso
Copy link
Contributor Author

ktoso commented Jun 25, 2022

bad:

lit.py: /home/build-user/swift/test/lit.cfg:2620: note: Available features: CMAKE_GENERATOR=Ninja, CODEGENERATOR=AArch64, CODEGENERATOR=ARM, CODEGENERATOR=Mips, CODEGENERATOR=PowerPC, CODEGENERATOR=SystemZ, CODEGENERATOR=X86, CPU=x86_64, OS=linux-gnu, PTRSIZE=64, SWIFT_VERSION=4, VENDOR=unknown, asan_runtime, asserts, autolink-extract, bootstrapping_mode, concurrency, concurrency_runtime, cplusplus_driver, crash-recovery, differentiable_programming, distributed, executable_test, fuzzer_runtime, lld_lto, lldb, long_test, no_asan, no_lto, optimized_stdlib, optimized_stdlib_x86_64, reflection, scudo_runtime, shell, sourcekit, standalone_build, static_stdlib, stress_test, string_processing, swift-remoteast-test, swift_in_compiler, swift_interpreter, swift_only_stable_abi, swift_stdlib_no_asserts, swift_test_mode_optimize, swift_test_mode_optimize_x86_64, thread_safe_runtime, threading_linux, tools-release, ubsan_runtime

but passes on: lit.py: /home/build-user/swift/test/lit.cfg:2620: note: Available features: CMAKE_GENERATOR=Ninja, CODEGENERATOR=AArch64, CODEGENERATOR=ARM, CODEGENERATOR=Mips, CODEGENERATOR=PowerPC, CODEGENERATOR=SystemZ, CODEGENERATOR=X86, CPU=x86_64, OS=linux-gnu, PTRSIZE=64, SWIFT_VERSION=4, VENDOR=unknown, asan_runtime, asserts, autolink-extract, bootstrapping_mode, concurrency, concurrency_runtime, cplusplus_driver, crash-recovery, differentiable_programming, distributed, executable_test, fuzzer_runtime, lld_lto, lldb, long_test, no_asan, no_lto, nonexecutable_test, optimized_stdlib, optimized_stdlib_x86_64, reflection, scudo_runtime, shell, sourcekit, standalone_build, static_stdlib, stress_test, string_processing, swift-remoteast-test, swift_in_compiler, swift_interpreter, swift_only_stable_abi, swift_stdlib_no_asserts, swift_test_mode_optimize_none, swift_test_mode_optimize_none_x86_64, thread_safe_runtime, threading_linux, tools-release, ubsan_runtime

which is
Screen Shot 2022-06-25 at 12 18 42

@ktoso ktoso marked this pull request as draft February 20, 2024 04:16
@ktoso
Copy link
Contributor Author

ktoso commented Jul 18, 2024

This was fixed a while back it seems

@ktoso ktoso closed this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants