Skip to content

Swift Concurrency App Crashes on Windows in ´swiftDispatch.dll´ #890

@TimBudarick

Description

@TimBudarick

Hello, 👋🏼

We have written an app that exclusively uses Swift Concurrency, including task groups.

This all works wonderfully under macOS and Linux, but we always have to deal with a non-deterministic crash under Windows.

🧩 Application
We read a file line by line. We then parse this line into an object accordingly. We always combine 200 objects and then create a task.
This task then retrieves a URLSession from an actor. (Call: URLSessionActor.sharred.session)
This is then done for as long as there are lines in the file. We limit the parallel tasks to 10 tasks. (If the limit is reached, the file is no longer read for the time being)

❗️Problem
The app runs for around 10-20 minutes, and at some point it crashes with no apparent error. The stacktrace is always the same. I have already stored the symbol files for my Swift app, but unfortunately they don't seem to help, because the crash happens purely in the swiftDispatch.dll. The CPU instruction is “ud2”.
In my experience, this is an intentional error, but unfortunately I don't know how to solve it.
It also happens that the app runs with the exact same data without any problems at other times. (Even 2-3 times in a row) But in many cases the app crashes after the 3rd run at the latest.

I have also attached a screenshot which shows the stacktrace in Visual Studio if that is of any help. I also have the dump file and could also do further research in it, but unfortunately I don't have the skills to do so and would need a little advice.

💻 System
OS: Windows Server 2022
Swift: Swift 6.2

Please let me know if you need further information.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions