Re: ORBit2 to SUN ORB



According to Michael Meeks:
> 
> Hi Fabien,
> 
> On Thu, 2004-06-24 at 14:40 +0200, Fabien Tassin wrote:
> > I have a similar loop 100% reproducible due to a bug
> > in the Orbit2 forwarding code. Nobody seems to care here.
> > I've patched Orbit2 and I'll submit it when/if I'm able
> > to fix a side effect of my changes that occurs in CORBA_Object_release().
> 
> 	I care;

glad to read this :)

> send in the patch, and we'll get it committed etc. I guess
> we've just not been handling forwards correctly somehow, no idea why
> we're suddenly getting lots of them ;-) Also, what version of ORBit2 are
> you using ?

2.10.2.

As I said, my patch is incomplete and should probably not be applied
as it is. It solves my urgent problems but there is probably a cleaner
way to achieve this.

The problem is that I hit an assertion when I CORBA_Object_release()
my objects.

** ERROR **: file iop-profiles.c: line 359 (IOP_profile_equal): assertion failed: (!iiop1->object_key && !iiop2->object_key)
aborting...

this is caused by the one-line patch in iop-profiles.c. I can't think of
a way to fix thix without major changes but I haven't investigated further.

See my previous messages on the list for the reasons of each change.

(note that I'm using only IIOP so maybe IOP_profiles_sync_objkey() should
be modified for other profile types too.. to be consistent).

/Fabien
diff -urb orbit2-2.10.2-orig/src/orb/orb-core/corba-object.c orbit2-2.10.2/src/orb/orb-core/corba-object.c
--- orbit2-2.10.2-orig/src/orb/orb-core/corba-object.c	2004-01-14 12:04:10.000000000 +0100
+++ orbit2-2.10.2/src/orb/orb-core/corba-object.c	2004-06-14 18:31:03.000000000 +0200
@@ -290,7 +290,7 @@
 
 	OBJECT_LOCK (obj);
 
-	if (obj->connection) {
+	if (!obj->forward_locations && obj->connection) {
 		if (ORBit_try_connection_T (obj)) {
 			cnx = obj->connection;
 			giop_connection_ref (cnx);
@@ -302,7 +302,7 @@
 		}
 	}
   
-	g_assert (obj->connection == NULL);
+	// g_assert (obj->connection == NULL);
 
 	if (!obj->forward_locations) {
 		plist = obj->profile_list;
@@ -311,13 +311,13 @@
 		plist = obj->forward_locations;
 		objkey = IOP_profiles_sync_objkey (plist);
 	}
-
 	for (cur = plist; cur; cur = cur->next) {
 		gpointer *pinfo = cur->data;
 
 		if (IOP_profile_get_info (obj, pinfo, &iiop_version, &proto,
 					  &host, &service, &is_ssl, tbuf)) {
 
+		  if (obj->connection == NULL)
 			obj->connection = giop_connection_initiate (
 				obj->orb, proto, host, service,
 				is_ssl ? LINK_CONNECTION_SSL : 0, iiop_version);
diff -urb orbit2-2.10.2-orig/src/orb/orb-core/iop-profiles.c orbit2-2.10.2/src/orb/orb-core/iop-profiles.c
--- orbit2-2.10.2-orig/src/orb/orb-core/iop-profiles.c	2004-04-21 16:58:48.000000000 +0200
+++ orbit2-2.10.2/src/orb/orb-core/iop-profiles.c	2004-06-25 00:04:10.000000000 +0200
@@ -138,7 +138,7 @@
 				ORBit_free (iiopi->object_key);
 			}
 
-			iiopi->object_key = NULL;
+			// iiopi->object_key = NULL;
 			}
 			break;
 		case IOP_TAG_ORBIT_SPECIFIC: {
diff -urb orbit2-2.10.2-orig/src/orb/orb-core/orbit-small.c orbit2-2.10.2/src/orb/orb-core/orbit-small.c
--- orbit2-2.10.2-orig/src/orb/orb-core/orbit-small.c	2004-01-14 16:51:00.000000000 +0100
+++ orbit2-2.10.2/src/orb/orb-core/orbit-small.c	2004-06-14 18:34:09.000000000 +0200
@@ -628,6 +628,7 @@
 	} else
 		giop_thread_new_check (NULL);
 
+ retry_request:
 	cnx = ORBit_object_get_connection (obj);
 
 	if (!cnx) {
@@ -636,7 +637,6 @@
 		goto system_exception;
 	}
 
- retry_request:
 	request_id = GPOINTER_TO_UINT (&obj);
 	completion_status = CORBA_COMPLETED_NO;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]