[ofa-general] How to get a thread out of the ib_cm_get_event while wthere is a broken IB connection?

Roland Dreier rdreier at cisco.com
Fri Aug 3 11:21:22 PDT 2007


 > Now I get complains from the field that they do have dead pthreads
 > hanging around that are stuck in the ib_cm_get_event call.

They're stuck waiting for another CM event, right?  And presumably no
more events occur after IB_CM_TIMEWAIT_EXIT for a connection that dies.
So I guess your application should have the thread terminate after it
knows that the connection is done.

 > So my question is: How can I get a pthread out of the ib_cm_get_event
 > call without using pthread_kill?

What's wrong with pthread_kill()?  That seems like another perfectly
valid solution -- ib_cm_get_event() is basically doing a read(), so a
signal would wake up the read() and make the function return.

 - R.



More information about the general mailing list