Ticket #246 (closed defect: fixed)
Dead lock in marshaler at exit
Reported by: | jasper | Owned by: | jasper |
---|---|---|---|
Priority: | major | Milestone: | Phase III WP1 |
Component: | COBIA Marshalling | Version: | |
Keywords: | Cc: |
Description
When a multi-threaded pool is cleaning up, the thread destructor of the multi-threaded thread objects wait for its thread procedure to finish.
As the thread procedure lives in COBIAMarshal.dll, the thread terminator calls FreeLibraryAndExitThread? on the COBIAMarshal.dll, which does not release the library (COBIA has a lock on it) but it does result in a call to LdrpDrainWorkQueue?, which hangs on occasion.
This hang-up is prevented if the service thread object is not also waiting for the service thread to terminate. As there is no clean-up at this point, the service thread wait is abandoned for a thread.detach - which appears to resolve the hangup.
fixed in c395054541058b236192702a56a93bb07ddfd558