[ofw][patches][IBAL] work around for reference count leakage bugs

Leonid Keller leonid at mellanox.co.il
Thu Jun 11 09:23:05 PDT 2009


Committed in 2229.


________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Leonid Keller
	Sent: Monday, June 01, 2009 6:41 PM
	To: ofw at lists.openfabrics.org
	Subject: [ofw][patches][IBAL] work around for reference count
leakage bugs
	
	
	IBAL still has bugs, which cause reference count leakage, which
stops the cascading destroying resources of IBAL.
	It causes  in turn a freeze of IBBUS on HCA disable or system
power down.
	On checked builds IBAL forces destroying of the objects after
some timeout.
	On free version it waits endlessly.
	This patch makes the behavior of free version to be the same in
checked version while sending a message to System Event Log.
	 
	 
	 
	Index: V:/svn/winib/trunk/core/al/al_common.c
	
===================================================================
	--- V:/svn/winib/trunk/core/al/al_common.c (revision 4403)
	+++ V:/svn/winib/trunk/core/al/al_common.c (revision 4404)
	@@ -35,6 +35,7 @@
	 #include "al_ci_ca.h"
	 #include "al_common.h"
	 #include "al_debug.h"
	+#include "al_ca.h"
	 
	 #if defined(EVENT_TRACING)
	 #ifdef offsetof
	@@ -46,6 +47,7 @@
	 #include "al_mgr.h"
	 #include <complib/cl_math.h>
	 #include "ib_common.h"
	+#include "bus_ev_log.h"
	 
	 
	 
	@@ -498,7 +500,6 @@
	 
	  if( deref_al_obj( p_obj ) )
	  {
	- #ifdef _DEBUG_
	   uint32_t  wait_us;
	   /*
	    * Wait for all other references to go away.  We wait as long
as the
	@@ -529,13 +530,11 @@
	      &p_obj->event, AL_MAX_TIMEOUT_US, AL_WAIT_ALERTABLE );
	    } while( cl_status == CL_NOT_DONE );
	   }
	- #else
	-  do
	-  {
	-   cl_status = cl_event_wait_on(
	-    &p_obj->event, EVENT_NO_TIMEOUT, AL_WAIT_ALERTABLE );
	-  } while( cl_status == CL_NOT_DONE );
	- #endif
	+  if ( p_obj->p_ci_ca && p_obj->p_ci_ca )
	+   CL_PRINT_TO_EVENT_LOG( p_obj->p_ci_ca->h_ca->p_fdo,
EVENT_IBBUS_ANY_ERROR,
	+    ("IBAL stuck: AL object %s, ref_cnt: %d. Forcing object
destruction.\n",
	+    ib_get_obj_type( p_obj ), p_obj->ref_cnt));
	+
	   CL_ASSERT( cl_status == CL_SUCCESS );
	   if( cl_status != CL_SUCCESS )
	   {
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090611/b4cc387f/attachment.html>


More information about the ofw mailing list