[Ace-users] Process hangs/ crashes while exiting and trying to delete the ACE_OS_Object_Manager

dinrat at gmail.com dinrat at gmail.com
Wed Dec 12 00:13:20 CST 2007


Hi all,

ACE VERSION: 5.4.7

HOST MACHINE and OPERATING SYSTEM:
        Windows 2000 SP4
        Winsock 2.0

TARGET MACHINE and OPERATING SYSTEM, if different from HOST: N/A

COMPILER NAME AND VERSION (AND PATCHLEVEL):
    Microsoft Visual C++ .NET 2003
    Compiler Options: /Ox /I ".." /D "ACE_BUILD_DLL" /D "NDEBUG" /D
"WIN32" /D "_WINDOWS" /D "ACE_HAS_ACE_TOKEN" /D
"ACE_HAS_ACE_SVCCONF" /
D "_WINDLL" /FD /EHsc /MD /GS /Gy /Zc:forScope /GR /Fo"Release\ACE/" /
Fd"Release\ACE/vc70.pdb" /W3 /nologo /c /Zi /TP

DOES THE PROBLEM AFFECT:
        EXECUTION Application is affected

SYNOPSIS:
	process hangs while it is exiting on windows 2K/ 2K3

DESCRIPTION:
	We have a application which uses ACE. We allocate objects
ACE_OS_Object_Manager and ACE_Object_Manager within one of our shared
libraries. They are static objects. We have a guard around these
objects and the guard gets deleted when our shared library unloads
(which in turn deletes the ACE manager objects). Now we are seeing
crashes or hangs when lots of our processes are running together and
load on system is high. The issue comes on windows 2K and 2K3. Is
there any race condition possible while things are getting cleaned up?
The other possibility could be that windows somehow is not unloading
the dlls in correct order, has anyone seen anything like that?

The stack trace from a debug build which hung looks like

0:000> kv

ChildEBP RetAddr  Args to Child

0012f820 7c599fe4 00000648 00000000 00000000 NTDLL!
ZwWaitForSingleObject+0xb (FPO: [3,0,0])

0012f848 7c57b3db 00000648 ffffffff 00000000 KERNEL32!
WaitForSingleObjectEx+0x71 (FPO: [Non-Fpo])

*** WARNING: Unable to verify checksum for ACEd.dll

*** ERROR: Symbol file could not be found.  Defaulted to export
symbols for ACEd.dll -

0012f858 002c791d 00000648 ffffffff 0012f99c KERNEL32!
WaitForSingleObject+0xf (FPO: [2,0,0])

WARNING: Stack unwind information not available. Following frames may
be wrong.

0012f880 002c99fe 047f6538 047f6ac0 047f6538 ACEd!ACE_OS::cond_wait
+0x7d

0012f894 002c5441 0012f994 0012f99c cccccccc ACEd!ACE_OS::unique_name
+0x24e

0012f8fc 002c6dcb 00000002 cccccccc 047aec28 ACEd!
ACE_Thread_ID::operator!=+0x6e1

0012f934 002b8f53 00000001 0012fab8 0012f99c ACEd!ACE_OS::cleanup_tss
+0x8b

0012f994 002ba279 0012f9e0 cccccccc cccccccc ACEd!
ACE_Object_Manager::fini+0xb3

0012f9c0 002b9d55 047fee70 0012fdbc 0033e6b3 ACEd!
ACE_OS_Object_Manager::fini+0x79

*** WARNING: Unable to verify checksum for iced.dll

0012f9d8 02eaf1be 0012fbc4 0012fac4 7ffdf000 ACEd!
ACE_OS_Object_Manager::~ACE_OS_Object_Manager+0x45

0012fab8 02eaf2eb 00000001 0012fca4 0012fde0 iced!
ACE_OS_Object_Manager::`scalar deleting destructor'+0x2e (FPO: [Non-
Fpo]) (CONV: thiscall)

0012fbc4 02eafe78 0012fd78 0012fde0 7ffdf000 iced!
ICEOS::freeACEObjectManager+0x5b (FPO: [Non-Fpo]) (CONV: cdecl) [e:
\p4_ws\zeus_85sp1\powrmart\ice\src\iceos.cpp @ 81]

0012fca4 02ed76a8 00134130 0012fde0 7ffdf000 iced!
ACEObjectManagerGuard::~ACEObjectManagerGuard+0x28 (FPO: [Non-Fpo])
(CONV: thiscall) [e:\p4_ws\zeus_85sp1\powrmart\ice\src\iceos.cpp @ 37]

0012fd78 02ec9393 0012fdcc 02ec9505 02e60000 iced!$E2+0x28 (FPO: [Non-
Fpo]) (CONV: cdecl)

0012fd80 02ec9505 02e60000 00000000 00000001 iced!_CRT_INIT+0xf3 (FPO:
[Non-Fpo]) (CONV: stdcall) [f:\vs70builds\3077\vc\crtbld\crt\src
\crtdll.c @ 234]

0012fdcc 77f830e7 02e60000 00000000 00000001 iced!_DllMainCRTStartup
+0x105 (FPO: [Non-Fpo]) (CONV: stdcall) [f:\vs70builds\3077\vc\crtbld
\crt\src\crtdll.c @ 288]

0012fdec 77f8ee02 02e8763f 02e60000 00000000 NTDLL!LdrpCallInitRoutine
+0x14

0012fe54 7c5969c3 01d5c230 00000004 7ffdf000 NTDLL!LdrShutdownProcess
+0x11d (FPO: [Non-Fpo])

0012ff18 00431d03 00000000 00431d48 00000000 KERNEL32!ExitProcess+0x51
(FPO: [Non-Fpo])

0012ff2c 00431ca5 00000000 01d5c230 00000004 msvcr71d!__crtExitProcess
+0x43 (FPO: [Non-Fpo])



REPEAT BY:
	The issue is highly imtermittent. It occurs when several processes
are scheduled to run simulatneously. One or two process hangs after
some time.

SAMPLE FIX/WORKAROUND:
	N/A

Any pointers into possible issues?

Thanks & Regards
Dinesh


More information about the Ace-users mailing list