#8275: Deadlocking apps when opening documents -------------------------------------+---------------------------- Reporter: humdinger | Owner: bonefish Type: bug | Status: new Priority: normal | Milestone: R1 Component: System/runtime_loader | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All -------------------------------------+---------------------------- Changes (by bonefish): * owner: pulkomandy => bonefish * component: Kits/Locale Kit => System/runtime_loader Comment: Replying to [comment:5 stippi]: > One possible solution could be to export the runtime loader global locking functions in runtime_loader_private.h and make sure that the runtime loader lock is already locked before acquiring the default locale roster lock whenever it would deal with add-on and image functionality while holding it. No, the problem really is the runtime loader locking. It uses a single mutex which it acquires whenever it does, well, anything really. While for the most part that is questionable just for performance reasons, when calling the shared object initialization or finalization functions this is actually a problem, since those may execute any kind of code which doesn't even have to know that is was called in that context. The runtime loader locking has to be rethought. Maybe a two level locking would already do the trick: One lock to protect the image lists and one lock per image. -- Ticket URL: <http://dev.haiku-os.org/ticket/8275#comment:6> Haiku <http://dev.haiku-os.org> Haiku - the operating system.