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
[SR-14086] async await app crash on windows using 5.4 snapshot #56475
Comments
@swift-ci create |
Interesting, can you provide a stack trace as well? It seems odd that this would fail given that there are tests running in CI. |
Comment by Yassine BENABBAS (JIRA) Here is what I get from Visual Studio when I select the "debug" option in the crash window: Exception non gérée à 0x00007FF99CD5287E (ucrtbase.dll) dans main.exe : Fermeture de programme requise suite à une erreur irrécupérable. Translation: Unhandled exception at 0x00007FF99CD5287E (ucrtbase.dll) in main.exe: Required program closed due to a fatal error. Stack trace Modules LLDB Here is the stack trace that I get with LLDB: ➜ swift lldb .\main.exe
(lldb) target create ".\\main.exe"
Current executable set to 'D:\swift\main.exe' (x86_64).
(lldb) r
Process 20024 launched: 'D:\swift\main.exe' (x86_64)
Process 20024 stopped
* thread #​1, stop reason = Exception 0xc0000409 encountered at address 0x7ff99cd5287e
frame #​0: 0x00007ff99cd5287e ucrtbase.dll`abort + 78
ucrtbase.dll`abort:
-> 0x7ff99cd5287e <+78>: int $0x29
0x7ff99cd52880 <+80>: movl $0x40000015, %edx ; imm = 0x40000015
0x7ff99cd52885 <+85>: movl $0x3, %ecx
0x7ff99cd5288a <+90>: callq 0x7ff99cd50f30 ; _getpid + 16
Target 0: (main.exe) stopped. |
Okay, even the most cursory look would have identified this as a result of ewilde's explicit `abort` on Windows introduced in 13cc56b. |
I think that #35577 will help with the abort - but won't really help with the scheduling of the async task. Because libdispatch is not linked against explicitly, I cannot imagine that we have the ability to have scheduled something on the dispatch queue. That will still need to be resolved before the async operation can execute. |
I'll hopefully remember to upload the second diff tomorrow to actually get something executing (I have that but its dependent on the previous patch). |
Comment by Yassine BENABBAS (JIRA) Great news 🙂. Thanks |
#35584 is the second half, and with that, the test actually succeeds in printing the two strings. |
Comment by Yassine BENABBAS (JIRA) Thank you very much 👍. I'm looking forward to try it. |
You're welcome - thank you for reporting the issue in the first place! |
Comment by Yassine BENABBAS (JIRA) You're welcome |
Attachment: Download
Environment
swift --version
compnerd.org Swift version 5.4-dev (LLVM a9b8270, Swift 31e460b)
Target: x86_64-unknown-windows-msvc
Additional Detail from JIRA
md5: 582420c1a2edbf3988a9a13f5f5c53c5
Issue Description:
Hello,
I am trying to run a simple swift script async_await.swiftwith async / await but the app crashes on startup.
Here is the command used for building the app (on powershell) :
Here is the build output:
When I rue the app, I get a crash window.
The text was updated successfully, but these errors were encountered: