-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Distributed] Improve getting return type metadata for distributed invocations #79381
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
[Distributed] Improve getting return type metadata for distributed invocations #79381
Conversation
@swift-ci please test |
Unrelated failure: FAIL: Swift-validation(linux-x86_64) :: SILOptimizer/large_nested_array.swift.gyb (18915 of 18915) |
@swift-ci please test linux platform |
Could we maybe split the test into two separate executables and actually do a remote call, say using a pipe between them? Would that help? It'd be better if we could reproduce the problem and prove the change fixes it, if that's possible. |
The issue is actually that the original metadata request always comes back complete, but requests from other threads may return early, so it needs a multithreaded test to work. We can avoid the need for separate processes by calling |
…vocations rdar://141313340
3a998d7
to
d8f89bd
Compare
We managed to form a test which reproduces reliably, thank you @mikeash ! I also corrected the impl in one more way thanks to this test -- we cannot do non-blocking metadata requests as that's how we can get those zero sizes as well. |
@swift-ci please test |
We had fixed this bug in swiftlang#79381 but missed to realize the same problem existed for parameters as well. This corrects the swift_func_getParameterTypeInfo impl, and also removes the entire "unsafe" method, we no longer use it anywhere. Resolves rdar://146679254
We had fixed this bug in swiftlang#79381 but missed to realize the same problem existed for parameters as well. This corrects the swift_func_getParameterTypeInfo impl, and also removes the entire "unsafe" method, we no longer use it anywhere. Resolves rdar://146679254
We had fixed this bug in swiftlang#79381 but missed to realize the same problem existed for parameters as well. This corrects the swift_func_getParameterTypeInfo impl, and also removes the entire "unsafe" method, we no longer use it anywhere. Resolves rdar://146679254
Sometimes we may get incomplete type metadata when using the
swift_func_getReturnTypeInfo
function, which then could result in a crash when trying to return a result of such type from a distributed func. This happens very rarely, only if the type metadata has never been fully loaded in the process, but can happen and then cause a crash during returning from a remote call distributed method.I was not able to reproduce the problem in the test since we always end up "touching" the type, even though I tried to avoid that by doing the remote call directly 🤔
Resolves: rdar://141313340