Unloading DLL containing an active critical section
Submitted by Miroslav Rajcic
Link to original bug (#670210)
Description
Using "Microsoft Application Verifier" program (http://www.microsoft.com/download/en/details.aspx?id=20028) on my Windows 32-bit GTK+ program (using GTK v2.24.10 build found at www.gtk.org) uncovered this possible issue with gmodule:
it seems that gmodule unloads a DLL module which still has an active critical section. This tool marks this issue with severity: error.
See log from the tool below. Hope this helps.
- <avrf:logEntry Time="2012-02-16 : 10:23:57" LayerName="Locks" StopCode="0x201" Severity="Error">
<avrf:message>Unloading DLL containing an active critical section.</avrf:message>
<avrf:parameter1>15609008 - Critical section address.</avrf:parameter1>
<avrf:parameter2>0 - Critical section initialization stack trace.</avrf:parameter2>
<avrf:parameter3>bd88fd2 - DLL name address.</avrf:parameter3>
<avrf:parameter4>15600000 - DLL base address.</avrf:parameter4>
- <avrf:stackTrace>
<avrf:trace>vfbasics!AVrfpFreeMemLockChecks+d0 (d:\avrf\source\base\avrf\vrfcommon\critsect.c @ 1086)</avrf:trace>
<avrf:trace>vfbasics!AVrfpFreeMemNotify+2b (d:\avrf\source\base\avrf\vrfcommon\support.c @ 1491)</avrf:trace>
<avrf:trace>vfbasics!AVrfpDllUnloadCallback+1a (d:\avrf\source\base\avrf\vrfcommon\dlls.c @ 489)</avrf:trace>
<avrf:trace>ntdll!RtlQueryProcessDebugInformation+117e ( @ 0)</avrf:trace>
<avrf:trace>ntdll!RtlInitializeSListHead+44c4 ( @ 0)</avrf:trace>
<avrf:trace>vfbasics!AVrfpLdrUnloadDll+5d (d:\avrf\source\base\avrf\vrfcommon\dlls.c @ 1338)</avrf:trace>
<avrf:trace>KERNEL32!FreeLibrary+19 ( @ 0)</avrf:trace>
<avrf:trace>libgmodule-2.0-0!+6dd013d1 ( @ 0)</avrf:trace>
<avrf:trace>libgmodule-2.0-0!g_module_close+e4 ( @ 0)</avrf:trace>
<avrf:trace>libgio-2.0-0!g_io_error_from_win32_error+cf ( @ 0)</avrf:trace>
<avrf:trace>libgobject-2.0-0!g_type_module_unuse+69 ( @ 0)</avrf:trace>
<avrf:trace>libgio-2.0-0!g_io_modules_scan_all_in_directory+16c ( @ 0)</avrf:trace>
<avrf:trace>libgio-2.0-0!g_io_modules_scan_all_in_directory+4ab ( @ 0)</avrf:trace>
<avrf:trace>libgio-2.0-0!g_vfs_is_active+80 ( @ 0)</avrf:trace>
<avrf:trace>libglib-2.0-0!g_once_impl+47 ( @ 0)</avrf:trace>
<avrf:trace>libgio-2.0-0!g_vfs_get_default+2c ( @ 0)</avrf:trace>
<avrf:trace>libgio-2.0-0!g_file_new_for_path+13 ( @ 0)</avrf:trace>
<avrf:trace>notecase!+52b94d ( @ 0)</avrf:trace>
</avrf:stackTrace>
</avrf:logEntry>
Version: 2.24.x
Edited by Philip Withnall