VERSANT Developer Center



Support & Discussions Forums

Forum Topic Overview

voneinem
Topic posted 2009/12/03, 14:22 UTC+1

In an application that is running well for years I added some additional watches. As a consequence the timing of the application was massively influenced especially when queries in the background thread were done. As a backround: the application uses two threads and the thread model "by base" with critical section usage initialized:
paramList.AddParameter("enablePtMgrCS", PtTRUE);
paramList.AddParameter("enableOnDemandCS", PtTRUE);
paramList.AddParameter("enablePtObjectCS", PtTRUE);
We are using version 10.0.8.169.

The hang shows this call stack:
060ae70c 7c90e9c0 ntdll!KiFastSystemCallRet
060ae710 7c91901b ntdll!ZwWaitForSingleObject+0xc
060ae798 7c90104b ntdll!RtlpWaitForCriticalSection+0x132
060ae7a0 4e00456a ntdll!RtlEnterCriticalSection+0x46
060ae7dc 4e005be7 FO100Fex80D!Win32CritSect::Begin+0x4a [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\extended\src\ptcrits.cxx @ 639]
060ae7ec 4e005c17 FO100Fex80D!PtThreadMgr::BeginCriticalSection+0x47 [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\extended\src\ptthrdmg.cxx @ 620]
060ae800 480ccb98 FO100Fex80D!PtThreadMgr::BeginCriticalSection+0x27 [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\extended\src\ptthrdmg.cxx @ 642]
060ae818 480cce48 FO100Fkn80D!PtObjMgr::BeginCriticalSection+0x28 [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\kernel\ptmgr\src\ptobjmgr.cxx @ 198]
060ae848 480a4664 FO100Fkn80D!PtObjMgr::RegisterClient+0x98 [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\kernel\ptmgr\src\ptobjmgr.cxx @ 344]
060aec50 48179105 FO100Fkn80D!PtLocalAdmin::GetBuffer+0x7b4 [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\kernel\ptmgr\src\ptadmstg.cxx @ 794]
060aed8c 481861c3 FO100Fkn80D!PtMgr::CompareObject+0x265 [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\kernel\ptquery\src\classcmp.cxx @ 451]
060af028 48180dac FO100Fkn80D!PtLocalBucket::SubQuery+0xbb3 [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\kernel\ptquery\src\ptbksubq.cxx @ 332]
060af278 017b282a FO100Fkn80D!PtOnDemandSet::Query+0xacc [d:\build\fastobjects_10.0\20080402_2114_version_10_00_08_169\osscore\ptcore\kernel\ptquery\src\setq.cxx @ 754]
[...]

The thread is hanging on a critical section that is owed by the main thread (204) which is idle
0:013> !locks

CritSec +152f250 at 0152f250
LockCount 3
RecursionCount 3
OwningThread 204
EntryCount 1
ContentionCount 1
*** Locked

Scanned 1340 critical sections

0 Id: 76c.204 Suspend: 1 Teb: 7ffdf000 Unfrozen
ChildEBP RetAddr
0012fe44 77d4919b ntdll!KiFastSystemCallRet
0012fe64 783de6b1 user32!NtUserGetMessage+0xc
0012fe90 783dfbfc mfc80ud!AfxInternalPumpMessage+0x21 [f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\thrdcore.cpp @ 153]
0012fe9c 783df46b mfc80ud!CWinThread::PumpMessage+0xc [f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\thrdcore.cpp @ 896]
0012feb8 783e1a07 mfc80ud!CWinThread::Run+0x8b [f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\thrdcore.cpp @ 625]
0012fecc 7837557d mfc80ud!CWinApp::Run+0x57 [f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\appcore.cpp @ 894]
*** WARNING: Unable to verify checksum for mpa.exe
0012fef0 00414598 mfc80ud!AfxWinMain+0xed [f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\winmain.cpp @ 47]
0012ff08 00411e89 mpa!wWinMain+0x18 [f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\appmodul.cpp @ 33]
0012ffb8 00411bed mpa!__tmainCRTStartup+0x289 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 589]
0012ffc0 7c816d4f mpa!wWinMainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012fff0 00000000 kernel32!BaseProcessStart+0x23

(a full dump is available)

Do you have any known issues with this combination?

Thanks and kind reagrds,
Volker



nbehncke
Comment posted 2009/12/03, 16:05 UTC+1

Hello Volker,

I cannot see the reason for this particular deadlock.

The query that you are performing is a PtOnDemandSet::Query. This type of query cannot make use of indexes and is reading the object buffer for all objects in this set. While reading an object buffer ObjectDescriptions are read or created.
ObjectsDescriptions are created for every lock, watch or read of on object.
If you have now many additional watches then you might expierience a performance degradation.
We have addressed this problem starting in version 10.0.08.174 (and later on in FastObjects 11.0). We have improved the ObjectDescription management.

Please retry with the latest FastObjects 10.0 Service Pack.
If the problem persists then please send the dump and all information to support@versant.net.

Best regards,
Nils Behncke
Versant Team

voneinem
Comment posted 2009/12/03, 17:45 UTC+1

Hello Nils,

thanks a lot for the very quick reply!

I will try to move to version 10.0.08.174 and see if the performance impact changes. To your information: In sum we are installing less than 50 watches for that database, which is not very much I assume.
If I needed to sent you any dumps, I guess this will not work via email because of the size and I assume that a mini dump will not be sufficient. Do you offer any FTP location? Otherwise I could deposit in mine and share the like via email.

Thanks for now,
Volker

voneinem
Comment posted 2009/12/10, 12:56 UTC+1

Update: We moved to version 10.0.9.189 and the performance problems have not neen abserved until now. Also no hang was present.

Thanks,
Volker


The VDC Message Boards

What do I have to do to get started?
Before you can post messages to the message boards, you must register as a VDC Member. To register, create a new profile at VDC Member Area, see right-hand panel. If you already have signed-up for a VDC Member account you just need to logon.

Forum Guidelines


Site Search



Forum Search




Contact

Technical Questions:
Message Boards

Purchase Inquiries:
Versant Object Database
FastObjects .NET

General Questions:
Quick Message Form

For postal adresses, phone numbers,  e-mail addresses, driving directions etc please refer to:

Contact Details Overview


VDC Member Login

You are not logged in.

Joining the VDC Member Area is the best way to get the best out of the Versant Developer Center!

Registered User Login

Create New User Profile

Why sign-up?


young_guys_205.jpg

Now Hiring! Seeking good staff that take action on good stuff!

In today's fast paced world you want to be part of a company that is on the leading edge of technology? Join Versant!

More...

V Compact Icon

Online Database Reorganization for the Versant Object Database

Versant Vorkout lets you reclaim unused space in your database while it is in normal operation, increasing free space and improving performance.

More...

promo_university_205.jpg

Versant and German University Team Up to Grant Scholarship

Database Company supports Masters students enrolling in Databases / Information Systems through 2-year Scholarship

Press Release