adrian.licuriceanu Posted February 3, 2022 Posted February 3, 2022 Hello, I am using AsyncQueue (in Unigine 2.13.0.1) to trigger streaming of some node hierarchies, wait for it to finish in my callback, call takeNode and then in the next main thread frame do a node clone: - Callback to be called in a background thread when node is ready: AsyncQueue::takeNode lock push node into _pendingNodes unlock - In the main thread: lock take and remove a node from _pendingNodes unlock node->clone() // This is where I got a deadlock The lock/unlock are my own locks so I can access in thread-safe manner the array holding nodes that were just streamed in. I clone them only in the main thread but then for some node hierarchy I got Ungine deadlocking (just stalling the main thread) here: This is the most common callstack: So when some sound source is cloned inside the hierarchy. But sometimes it stalls in other callstack, but always when on that SwitchToThread: From Win32 SDK I got this: Note that the operating system will not switch to a thread that is being prevented from running only by concurrency control. For example, an I/O completion port or thread pool limits the number of associated threads that can run. If the maximum number of threads is already running, no additional associated thread can run until a running thread finishes. If a thread uses SwitchToThread to wait for one of the additional associated threads to accomplish some work, the process might deadlock. But looking at current threads spawn by process they are not more than usual. This happens only in release build, with or without a debugger attached. Any idea what may cause this? Kind Regards, Adrian L.
silent Posted February 3, 2022 Posted February 3, 2022 Hi Adrian, Is there a possibility to check a minimal test reproduction? Right now it's hard to tell what's going on. Is there the same behavior with the latest 2.15? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
adrian.licuriceanu Posted February 3, 2022 Author Posted February 3, 2022 Hi, and thank you for the fast response. Will check on 2.15 and come back with a response. As for testing on your end, I already have the source/application posted on the ticket system (for another issue), but you don't have yet the data (the node hierarchy that is causing this). Will check to see how can I share this with you. Regards, Adrian
silent Posted February 3, 2022 Posted February 3, 2022 Yeah, that would be great to have. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts