Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
05898 Core Critical (emulator) Always Mar 28, 2015, 21:38 May 5, 2016, 09:17
Tester NekoEd View Status Public Platform SDLMAME
Assigned To Resolution Won't fix OS Linux
Status [?] Closed Driver
Version 0.160 Fixed in Version Build Normal
Summary 05898: Multithreading causes innumerable problems
Description It would seem that our multithreading code has suffered over time, and is causing numerous problems; in my case, I cannot play anything properly with multithreading enabled, MAME will stutter and occasionally hardlock.

Consider this a metabug to catch all multithreading-related issues under one banner so they can be spotted at a glance, and perhaps we can get our threading back up to snuff.
Steps To Reproduce
Additional Information
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
parent of 06146Closed cps3 stv: Random CTD since 0.170 
related to 05397Closed mk2: Background tearing on screen fades. 
related to 06010Closed rygar and others games (system16): OpenGL screen tearing and slow menu if multithreading is enabled 
Notes
6
User avatar
No.11543
mahlemiut
Developer
Mar 28, 2015, 23:03
I get the same with more or less current GIT code, mostly when trying to interact with the UI, and even caused a crash in MESS' GBA driver. Performs normally with -mt disabled (as it is by default).

Ubuntu 10.04 x86_64, SDL2.
User avatar
No.11544
cuavas
Administrator
Mar 29, 2015, 02:59
There are definitely race conditions in the current implementation of the -mt flag. It's known to cause temporary lockups, severe input lag, and other issues on both Windows and OSX. It seems to have arisen about the time couriersud fixed some of the previous crop of issues in the -mt implementation.
User avatar
No.11547
Firewave
Senior Tester
Mar 29, 2015, 16:59
edited on: Mar 29, 2015, 16:59
I do all my testruns with -mt and I didn't reconize any stability issues. I am not having any input performed in them, so it might be related to the input system somehow. I also did some random testing with ThreadSanitizer and logged all the issues I encountered. The issues with the input hangs did not show up as a race condition, so it might be something else related to threading.

A few proper examples to test with and maybe even backtraces when a crash occured would be very helpful.

User avatar
No.11551
NekoEd
Senior Tester
Mar 29, 2015, 23:42
If your testruns are completely automated, you'll probably never notice any issues; MAME doesn't complain or say anything when the anomalies occur, so if it's being done completely automated with no output and/or no input, you won't see anything.
User avatar
No.11554
cuavas
Administrator
Mar 31, 2015, 23:16
It's definitely a real issue. You likely won't notice it with an automated test run as the most obvious symptoms are input lag and frozen video.
User avatar
No.12604
Osso
Developer
May 5, 2016, 09:17
-mt functionality has been removed.