http://bugs.winehq.org/show_bug.cgi?id=58233
Bug ID: 58233 Summary: gitlab-ci shows occasional crashes in tests dmsynth, dmusic, winmm:midi Product: Wine Version: 10.7 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: mmdevapi Assignee: wine-bugs@winehq.org Reporter: bernhardu@mailbox.org Distribution: ---
Some real world examples:
https://gitlab.winehq.org/wine/wine/-/jobs/157788#L913 dmsynth:dmsynth:0294 done (-1073741819) in 0s 132B
https://gitlab.winehq.org/wine/wine/-/jobs/157574#L910 dmsynth:dmsynth:0268 done (-1073741819) in 0s 132B
https://gitlab.winehq.org/wine/wine/-/jobs/157344#L2610 winmm:midi:01b4 done (-1073741819) in 0s 0B
https://gitlab.winehq.org/wine/wine/-/jobs/157314#L913 dmusic:dmusic:0250 done (-1073741819) in 0s 0B
This -1073741819 translates to 0xC0000005 - STATUS_ACCESS_VIOLATION.
I was able to receive such a crash in gitlab-ci with some modifications to get winedbg called on it here: https://gitlab.winehq.org/bernhardu/wine/-/jobs/157987#L138
wine: Unhandled page fault on execute access to 79014043 at address 79014043 (thread 0154), starting debugger... Module Address Debug info Name (72 modules) PE-Wine 78e40000-79066000 Deferred dmsynth PE-Wine 78d50000-78e2c000 Deferred mmdevapi 0000014c (D) C:\users\gitlab\AppData\Local\Temp\wct\dmusic_test.exe 00000150 0 00000154 0 mmdevapi_midi_notify 00000160 15 audio_client_main 0000016c 0 <==
So the crash happens in the mmdevapi_midi_notify thread.
I was able to reproduce this when running the dmusic test with rr-debugger, as this causes also to be unavailable.
There I could track it down to following events: - main thread creates the notify thread, for executing `notify_thread` located in mmdevapi.dll. - main thread unloads mmdevapi.dll - notify thread was kind of slow and reaches now the point where it calls the previous address of `notify_thread`, which is in the range of the now unloaded mmdevapi.dll.