Skip to content

Aws::Crt::Io::ClientBootstrap destructor may launch thread at process exit, and crash #1809

@pitrou

Description

@pitrou

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
We're getting a user report of a crash, seemingly at process shutdown, on Windows:
conda-forge/arrow-cpp-feedstock#567

Apparently the ClientBootstrap destructor can indirectly trigger the launch of a new thread using aws_thread_launch. The thread launch fails at process shutdown, at least on Windows, triggering an assertion error and therefore a process crash.

SDK version number
1.9.120

Platform/OS/Hardware/Device
Windows/10.0.17763
(also reported on CentOS 8 and Ubuntu: https://issues.apache.org/jira/browse/ARROW-15141)

To Reproduce (observed behavior)
Basically conda-forge/arrow-cpp-feedstock#567 (comment), but I'm not sure what the exact steps are (I'm not the original reporter).

Expected behavior
Failing to launch a thread at process shutdown should probably not crash the process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-reproductionThis issue needs reproduction.needs-reviewThis issue or pull request needs review from a core team member.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions