To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=107562 Issue #|107562 Summary|rtl_cache_wsupdate_fini deadlocks process upon unloadi |ng sal3.dll Component|porting Version|DEV300m66 Platform|PC URL| OS/Version|Windows, all Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|mhu Reported by|sb
------- Additional comments from s...@openoffice.org Wed Dec 9 14:35:40 +0000 2009 ------- On Windows, in certain scenarios of unloading sal3.dll it happens that the process deadlocks. The main thread calls sal3.dll's DllMain (DLL_PROCESS_DETACH), which calls rtl_cache_wsupdate_fini, which blocks in WaitForSingleObject on the m_update_thread. The m_update_thread has already returned from its rtl_cache_wsupdate_all function, but is blocked in some sysenter instruction. The MS "Best Practices for Creating DLLs" document (available from <http://www.microsoft.com/whdc/driver/kernel/DLL_bestprac.mspx>) states: "You should never perform the following tasks from within DllMain: [...] Synchronize with other threads. This can cause a deadlock." A simple scenario in which the deadlock can be observed is the attached deadlock.patch, which in the sal code module creates and runs a small C application that dynamically loads and frees sal3.dll. (I stumbled over this problem in a similar scenario, where the DllPlugInTester_dll.exe that is part of CppUnit 1.12.1 dynamically loads and frees a test library that links against sal3.dll.) The problem seems not to appear with typical OOo executables that use sal3.dll, maybe because those executables are themselves linked against sal3.dll. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org For additional commands, e-mail: issues-h...@porting.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org