Greene, Sterling | 2 Sep 21:21 2011

GIOP Version assert

Hi all,

 

We’re using mico 2.3.13 and JacORB 2.3 to communicate between a single JVM and multiple C/C++ clients on the same machine.   We had been using 2.3.11 up until recently.

 

We were having a random crash that would occur on a handful of processes about 5 minutes after starting.  Looking at the core dump and mico debug, we found that it was being caused by the assert in IIOPProxy::make_conn().  The GIOP version of the GIOPConn coming out of the _conns map failed the assertion. 

 

Tracing back through things, I found that the assertion would happen after the JVM/JacORB sent a CloseConnection message, and the GIOPConn should be one that’s closed and gone at the time of the crash.  It looks like the _giop_ver field in the GIOPCodec in the GIOPConn changes after the GIOPConn has been put in the _conns map.    The change happens in GIOPCodec::get_header() when the version of the message received is less than the version the GIOPConn was created with.  Our mico ORB is configured for GIOP1.2 and the CloseConnection message is GIOP1.0.  Since the GIOPConn isn’t removed from the _conns map and put back in the appropriate version-keyed map, the assertion fails when something tries to reuse the connection later.  That seems to be the underlying problem at least, but I didn’t try to address it directly with this patch. 

 

Because the GIOPConn is in the “wrong” map after _giop_ver is changed, IIOPProxy::kill_conn() can’t find it and remove it.  In my patch, I changed the code to search all maps for all versions of the GIOPConn.  This gets around my problem since the GIOPConn is removed from the map after the CloseConnection message is received.  I haven’t found any other cases where our application sends a GIOP message < 1.2.  I looked at the latest copy of mico I could find and it looks like the same problem(s) are there.

 

Attached is the full file and a diff –u patch.

 

Thanks!

-Sterling Greene

Attachment (iop.cc): application/octet-stream, 225 KiB
Attachment (iop_cc.patch): application/octet-stream, 2430 bytes
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Mico-devel mailing list
Mico-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mico-devel

Gmane