Ticket #246 (closed defect: fixed)

Opened 4 days ago

Last modified 3 days ago

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.

Change History

comment:1 Changed 3 days ago by jasper

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.