f



handle_close in cancel_type function of class ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK> crashes on application exit.

Hi,

I am using libACE-5.8.1.so version in my application. When i shutdown my ap=
plication it crashes .=20
Application is shutdown using kill command from bash script. In my applicat=
ion these are handled by using ACE_Event_Handler class.

My application started below services using ACE library logger service, con=
figure service, Monitor service.

stack trace are given below=20


#0  0x0000000000000000 in ?? ()
#1  0x00007fcc85d2d66f in cancel_type (this=3D0x1d64140, __in_chrg=3D<value=
 optimized out>) at ../../ace/Timer_Queue_T.cpp:498
#2  deletion (this=3D0x1d64140, __in_chrg=3D<value optimized out>) at ../..=
/ace/Timer_Queue_T.cpp:523
#3  ACE_Timer_Heap_T<ACE_Event_Handler*, ACE_Event_Handler_Handle_Timeout_U=
pcall<ACE_Recursive_Thread_Mutex>, ACE_Recursive_Thread_Mutex>::~ACE_Timer_=
Heap_T (
    this=3D0x1d64140, __in_chrg=3D<value optimized out>) at ../../ace/Timer=
_Heap_T.cpp:222
#4  0x00007fcc85d2d8f9 in ACE_Timer_Heap_T<ACE_Event_Handler*, ACE_Event_Ha=
ndler_Handle_Timeout_Upcall<ACE_Recursive_Thread_Mutex>, ACE_Recursive_Thre=
ad_Mutex>::~ACE_Timer_Heap_T (this=3D0x1d64140, __in_chrg=3D<value optimize=
d out>) at ../../ace/Timer_Heap_T.cpp:239
#5  0x00007fcc85d2ba42 in ACE_Select_Reactor_T<ACE_Reactor_Token_T<ACE_Toke=
n> >::close (this=3D0x1d63960) at ../../ace/Select_Reactor_T.cpp:576
#6  0x00007fcc85d8ebb0 in ACE_Reactor::~ACE_Reactor (this=3D<value optimize=
d out>, __in_chrg=3D<value optimized out>) at ../../ace/Reactor.cpp:117
#7  0x00007fcc85d8ebf9 in ACE_Reactor::~ACE_Reactor (this=3D0x1d638d0, __in=
_chrg=3D<value optimized out>) at ../../ace/Reactor.cpp:120
#8  0x00007fcc85d8f01a in ACE_Reactor::close_singleton () at ../../ace/Reac=
tor.cpp:183
#9  0x00007fcc85d8f89b in ~ACE_Framework_Component_T (this=3D<value optimiz=
ed out>, __in_chrg=3D<value optimized out>) at ../../ace/Framework_Componen=
t_T.cpp:21
#10 ACE_Framework_Component_T<ACE_Reactor>::~ACE_Framework_Component_T (thi=
s=3D<value optimized out>, __in_chrg=3D<value optimized out>)
    at ../../ace/Framework_Component_T.cpp:22
#11 0x00007fcc85d4c721 in ACE_Framework_Repository::close (this=3D0x1d66580=
) at ../../ace/Framework_Component.cpp:78
#12 0x00007fcc85d4c78d in ACE_Framework_Repository::~ACE_Framework_Reposito=
ry (this=3D0x1d66580, __in_chrg=3D<value optimized out>) at ../../ace/Frame=
work_Component.cpp:40
#13 0x00007fcc85d4c800 in ACE_Framework_Repository::close_singleton () at .=
../../ace/Framework_Component.cpp:123
#14 0x00007fcc85d73790 in ACE_Object_Manager::fini (this=3D0x1d5d1b0) at ..=
/../ace/Object_Manager.cpp:751
#15 0x00007fcc85d738a8 in ACE_Object_Manager::~ACE_Object_Manager (this=3D0=
x1d5d1b0, __in_chrg=3D<value optimized out>) at ../../ace/Object_Manager.cp=
p:417
#16 0x00007fcc85d738f9 in ACE_Object_Manager::~ACE_Object_Manager (this=3D0=
x1d5d1b0, __in_chrg=3D<value optimized out>) at ../../ace/Object_Manager.cp=
p:418
#17 0x00007fcc85d73615 in ACE_Object_Manager_Manager::~ACE_Object_Manager_M=
anager (this=3D<value optimized out>, __in_chrg=3D<value optimized out>)
    at ../../ace/Object_Manager.cpp:882
#18 0x0000003b3303640d in __cxa_finalize () from /lib64/libc.so.6
#19 0x00007fcc85d1c956 in __do_global_dtors_aux () from /home/mpeit/mpe/CRP=
LUSEXCEP/build_1B/lib/libACE-5.8.1.so
#20 0x0000000000000000 in ?? ()


After analysing the core i found that in definition of ACE_Event_Handler_Ha=
ndle_Timeout_Upcall<ACE_LOCK>::deletion function dont_call value is 0 for f=
unction cancel_type and cancel_timer. But my application crashes at call of=
 event_handler->handle_close inside cancel_type function.
If i pass dont_call value 1 then there is no problem in application shutdow=
n.

Please suggest me is it proper fix or something incorrect in my application=
?

0
ajayawasthimca
8/23/2016 10:31:58 AM
comp.soft-sys.ace 20326 articles. 1 followers. marlow.andrew (167) is leader. Post Follow

2 Replies
738 Views

Similar Articles

[PageSpeed] 33

Could Any one please help me to find out the actual reason of crashing or i need to change in ACE code in my end.

Thanks & regards,
Ajay
0
Ajay
8/24/2016 2:02:24 PM
I have got the solution. It's actually related to cancel_timer in our logger service code.
0
Ajay
8/29/2016 2:43:01 PM
Reply: