Attached is LCR patch, which solves my yesterday problem. Now you can apply patch and get rid of aisparser.

Where was problem hidden?

LCR is nice component with one not so nice thing. Not so nice thing is ... global variable g_component_handle.

This variable has only one desire. Keep handle of loaded component. If this variable has magic value (0xFFFFFFFF) it means, "we loaded library, but that library doesn't have any component_register call -> don't try to destroy interfaces list).

If this variable has other value, it means "we loaded library, it registers, but it exports some interface, what we currently don't need, so we can delete that handle from libraries/interfaces list" and variable is set to magic value, or "we loaded library, it registers and exports what we need -> great return some nice value", but nobody resets variable to it's magic value.

And what happend, if you have some library, which was sucessfully loaded BEFORE Of course, we have nice optimalization. It just skip that away.

Now join optimalization and destroying list with setting magic value only on loading unneeded library and what you get? PROBLEM.

Sadly this problem happened to clm and quorum services, and cause, that loaded clm handle was destroyed, so EVT (which need clm) just falls.

I hope, this is enough for problem description, and as you can see patch is short. Much shorter then time I spent figure out WHY (+- 10 hours... grrr).

Regards,
  Honza

diff --git a/trunk/lcr/lcr_ifact.c b/trunk/lcr/lcr_ifact.c
index bb087d7..3589a16 100644
--- a/trunk/lcr/lcr_ifact.c
+++ b/trunk/lcr/lcr_ifact.c
@@ -419,6 +419,7 @@ static int interface_find_and_load (
 		}
 		free (scandir_list);
 	}
+	g_component_handle = 0xFFFFFFFF;
 	return -1;
 
 found:
@@ -430,6 +431,7 @@ found:
 		}
 		free (scandir_list);
 	}
+	g_component_handle = 0xFFFFFFFF;
 	return 0;
 }
 
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to