Hi

DBMS: Firebird 2.5.3.26715

I executed my tests (8 test threads were used) under WinDbg and got the
error in fbclient.dll (renamed to gds32.dll) on exit:

======================================= GENERAL ERROR
VERIFIER STOP 0000000000000212: pid 0x7830: Freeing virtual memory
containing an active critical section.

000007FFFFCBB208 : Critical section address.
00000000001BAC90 : Critical section initialization stack trace.
000007FFFFCB0000 : Memory block address.
0000000000010000 : Memory block size.

======================================= ERROR STACK
vfbasics!AVrfpVirtualFree+0xb1
gds32!Firebird::MemoryPool::cleanup+0x9c
[d:\users\dima\sourceforge\firebird\sf_svn_2\work\firebird_b2_5\2013_11_26__001\src\common\classes\alloc.cpp
@ 340]
gds32!`anonymous namespace'::allClean+0x26
[d:\users\dima\sourceforge\firebird\sf_svn_2\work\firebird_b2_5\2013_11_26__001\src\common\classes\init.cpp
@ 74]
gds32!_CRT_INIT+0xf7 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtdll.c
@ 415]
gds32!__DllMainCRTStartup+0xe5
[f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtdll.c @ 526]

======================================= ERROR PLACE

void MemoryPool::cleanup()
{
deletePool(processMemoryPool);
processMemoryPool = 0;
default_stats_group = 0;

#if defined(WIN_NT) || defined(HAVE_MMAP)
while (extents_cache.getCount())
{
size_t extent_size = OS_EXTENT_SIZE;
external_free(extents_cache.pop(), extent_size, false, false);
//<--------------- HERE
}

cache_mutex->~Mutex();
# endif
}

================================== STACK OF CriticalSection initialization

0:000> !cs -s 0x000007FFFFCBB208
-----------------------------------------
Critical section   = 0x000007ffffcbb208 (+0x7FFFFCBB208)
DebugInfo          = 0x0000000005dddfd0
NOT LOCKED
LockSemaphore      = 0x0
SpinCount          = 0x0000000000000000

Stack trace for DebugInfo = 0x0000000005dddfd0:

0x000007fee8b6a46f: vfbasics!AVrfpInitializeCriticalSectionCommon+0x117
0x000000018000c507:
gds32!Firebird::DefaultInit<Why::HandleArray<Why::CAttachment> >::init+0x57
0x00000001800505f5: gds32!Why::CAttachment::CAttachment+0x1C5
0x0000000180059b5c: gds32!isc_attach_database+0xA1C
0x0000000051c0caba:
_IBProvider_v3_vc11xp_w64_i!fb_base::t_fb_api_svc__connect_to_database::connect_to_database+0x11A
0x0000000051bd4936:
_IBProvider_v3_vc11xp_w64_i!isc_base::t_isc_connection::initialize+0x136
0x0000000051b67b3d:
_IBProvider_v3_vc11xp_w64_i!ibp::TIBPDataSource::ConnectDataSourceToDatabase+0x10D
0x0000000051b68910:
_IBProvider_v3_vc11xp_w64_i!ibp::TIBPDataSource::Initialize+0x320
0x00000001404d2576:
ibp_oledb_test_vc11_x64_Release_xp!oledb_lib::t_db_data_source::connect+0x1B6

========================================

As I understand, fbclient.dll do not destroys (global?) objects before
memory releasing.

At result - we get leaks of resources (critical section HandleArray::mtx).

------
Dmitry Kovalenko
www.ibprovider.com
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to