Closed soig closed 1 year ago
This might be the offending commit: https://github.com/libsdl-org/sdl12-compat/commit/184565a3ae07cbcc508d8427b51b5b5b3ca01f05
Can you attach the backtrace from all the threads in the process?
"thread apply all bt" just show only one thread with the same trace.
Just install the perl-SDL package from your distribution and run the minimal test script I'm attaching.
I'm also attaching the backtrace from all the threads.
bt-fc2.txt
gdb -q --args perl /tmp/stuck.txt
stuck.txt
This script is just the minimal stripped down version of perl-SDL's t/core_video.t test file (https://metacpan.org/release/FROGGS/SDL-2.548/source/t/core_video.t). I've added two "if(1)" sections, changing the inner one to "if(0)" makes the bug to disappear.
Oh yeah, that's clearly wrong.
Here, try this:
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 6964e2b..fb657a6 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -7535,6 +7535,7 @@ SDL_FreeYUVOverlay(SDL12_Overlay *overlay12)
if (overlay->overlay12 == overlay12) {
overlay->overlay12 = NULL; /* don't try to draw this later. */
}
+ overlay = overlay->next;
}
if (renderer) {
That fixed it on the Mageia box
Great, thanks!
Good catch, Sam, thanks!
It builds smoothly with 1.2.52 : See logs https://pkgsubmit.mageia.org/autobuild/cauldron/x86_64/core/2022-08-19/perl-SDL-2.548.0-10.mga9.src.rpm/
But it but testsuite got stucks with 1.2.56 & 1.2.60 on both Fedora & Mageia distributions: Here's the logs with 1.2.56: https://pkgsubmit.mageia.org/autobuild/cauldron/x86_64/core/2022-10-31/perl-SDL-2.548.0-10.mga9.src.rpm/)
Running it manually shows that it's stuck in SDL_FreeYUVOverlay(). I've attached the GDB backtraces for both Fedora & Mageia distributions.. bt-mga.txt bt-fc.txt
So 1.2.56 broke down (as 1.2.54 was the same but a pre-version?). Downgrading to 1.2.52 immediately fix (no more hang)
How to reproduce:
It seems to hang right after playing with some mutex (using SDL_LockMutex_REAL())