Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.6.3, 6.7.2
-
None
-
-
80f210db3 (dev), 5c2796a07 (6.8), 713bbd134 (6.7), 80e746144 (tqtc/lts-6.5)
Description
iOS Grand Central Dispatch has a maximum limit of 64 threads in the pool..
The problem is that our app already needs a few threads for its work, however, the QT_THREAD_PARALLEL_FILLS macro sometimes uses at least 32 threads at once which confuses the GCD and the application ends up in semaphore_wait_trap.
In my opinion, the macro is poorly designed and thought through. I know that it already caused QTBUG-109511 and has been hotfixed two times since to avoid the most obvious crashes and halts.
A patch has already been committed that addresses some other potential issues (and maybe even this one) but no sane discussion has been there (sorry for my emotional comment in there)
The idea that the code can use 32 threads from the pool somewhere deep down (not documented anywhere) at the same time is somewhat crazy. Yes, I know that running a widgets application on iOS is a minority use-case, however, I think that while supported, it should work.
Attached is the stack of one such halt.