Closed pthom closed 5 months ago
Describe the bug
I have encountered a segmentation fault when running a simple async program compiled with Visual Studio 2022 in release mode on GitHub Actions Windows 2022 runners.
To Reproduce
Ready to use repro
Step by step instructions
main.cpp
#include <future> #include <cstdio> int main() { auto handle = std::async(std::launch::async, []() { return 1; }); int r = handle.get(); printf("Result: %d\n", r); }
cmake_minimum_required(VERSION 3.5) project("study_ci_thread_fault") set(CMAKE_CXX_STANDARD 17) add_executable(main main.cpp)
name: ci on: [workflow_dispatch, push, pull_request] jobs: build: runs-on: windows-2022 steps: - uses: actions/checkout@main - name: Build and Test shell: bash run: | mkdir build cd build cmake .. cmake --build . --config Release ./Release/main.exe
Expected behavior The async program should run without crashing.
Actual Behavior The program crashes with a segmentation fault.
windows-2022 (aka windows-latest)
OS of the machine running the runner? Windows
Run ./build/Release/main.exe ./build/Release/main.exe shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0} Result: 1
I posted this as a Stack Overflow question here.
https://stackoverflow.com/questions/78612314/github-runners-issue-with-visual-studio-2022-segmentation-fault-with-the-simple
An helpful comment was given, which may be linked to this issue:
https://stackoverflow.com/questions/78598141/first-stdmutexlock-crashes-in-application-built-with-latest-visual-studio
Related issue: https://github.com/actions/runner-images/issues/10004#issuecomment-2156109231
The issue was fixed while I was studying it. Closing...
I didn't see how it was fixed, did they revert the version update in runner-images :thinking:
I don't know. I did not receive any information about the fix.
Describe the bug
I have encountered a segmentation fault when running a simple async program compiled with Visual Studio 2022 in release mode on GitHub Actions Windows 2022 runners.
To Reproduce
Ready to use repro
Step by step instructions
main.cpp
Expected behavior The async program should run without crashing.
Actual Behavior The program crashes with a segmentation fault.
Runner Version and Platform
windows-2022 (aka windows-latest)
OS of the machine running the runner? Windows
Job Log Output
Insights
I posted this as a Stack Overflow question here.
https://stackoverflow.com/questions/78612314/github-runners-issue-with-visual-studio-2022-segmentation-fault-with-the-simple
An helpful comment was given, which may be linked to this issue:
https://stackoverflow.com/questions/78598141/first-stdmutexlock-crashes-in-application-built-with-latest-visual-studio