Skip to content
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

Rare CPython 3.10 crashes on Windows #105400

Closed
lazka opened this issue Jun 6, 2023 · 1 comment
Closed

Rare CPython 3.10 crashes on Windows #105400

lazka opened this issue Jun 6, 2023 · 1 comment
Labels
3.10 only security fixes OS-windows type-bug An unexpected behavior, bug, or error

Comments

@lazka
Copy link
Contributor

lazka commented Jun 6, 2023

Bug report

This is a bit of a long shot, as I'm out of ideas, please stay with me :)

The MSYS2 project has been plagued by random Python crashes over the last year in CI (GitHub and GitLab), in combination with meson and I finally got some time to reproduce/bisect it, still only in CI:

https://github.com/lazka/python-crash-test (see the workflow file there for the setup)

This sets the error mode to SEM_NOGPFAULTERRORBOX and runs ninja which repeatedly calls python, until python crashes.

Python crashes with STATUS_ACCESS_VIOLATION, only on CI, and only if just-in-time debugging is disabled via SEM_NOGPFAULTERRORBOX, which makes it quite hard to pin down/debug.

I've now taken the time to git bisect it via GHA CI and come to the following result:

I'd welcome any ideas on why those commits could have an effect and what I could try to further pin this down.

My initial goal was to revert or backport commits after the bisect, but those commits have so many conflicts and touch so many things that I gave up.

Your environment

  • CPython versions tested on: all versions from 3.10.0a1 up to 3.11.3
  • Operating system and architecture: on all of Windows Server 2019/2022 (via GHA) Windows Server 2016 (via GitLab CI)
@lazka lazka added the type-bug An unexpected behavior, bug, or error label Jun 6, 2023
@AlexWaygood AlexWaygood added OS-windows 3.10 only security fixes labels Jun 7, 2023
kasper93 added a commit to kasper93/mpv that referenced this issue Jun 25, 2023
kasper93 added a commit to kasper93/mpv that referenced this issue Jun 25, 2023
kasper93 added a commit to kasper93/mpv that referenced this issue Jun 25, 2023
sfan5 pushed a commit to mpv-player/mpv that referenced this issue Jun 26, 2023
dyphire pushed a commit to dyphire/mpv that referenced this issue Jul 3, 2023
dyphire pushed a commit to dyphire/mpv that referenced this issue Jul 8, 2023
@lazka
Copy link
Contributor Author

lazka commented Mar 29, 2024

I guess at this point it's unlikely that we'll ever find the cause, so let's close this. However, it is a bit worrying that there are random crashes that have been fixed by accident, and there is no guarantee that they won't come back.

If anyone ends up here because CPython crashes on Windows when using meson, or similar workloads invoking other programs from Python, and/or if SEM_NOGPFAULTERRORBOX is involved, please leave a comment here. If this crash ever comes back it might be good to have this information.

thanks!

@lazka lazka closed this as completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants