Hey Levi,

> engine_teardown();  <- doesn't block right now
> foreach context
>   while ipmi_destroy_ctx(ctx) < 0  <- need to spin in case 
>     sleep(1)                          connections aren't dead yet
> 
> And it sits forever (or at least 10 minutes or so) in the loop;
> apparently the call to destroy the ctx never succeeds.

I haven't been able to reproduce this after a number of attempts.
Although I found a bug that makes engine_teardown() work slowly under
certain conditions, it overall seems to work fine for me.

Could you see what error code is being returned from ipmi_destroy_ctx()
for now (ipmiconsole_ctx_errnum).

Could you also perhaps try modifying the ipmiconsole() tool to sanity
check that:

engine_teardown()
ipmi_destroy_ctx(c);

works for just 1 node for your motherboards?  For an initial sanity
check, I did:

--- ipmiconsole.c       1 Jun 2007 04:35:07 -0000       1.14
+++ ipmiconsole.c       28 Jun 2007 20:50:23 -0000
@@ -473,23 +473,24 @@ main(int argc, char **argv)
     }

  cleanup:
+#if 0
   if (fd >= 0)
     {
       printf("\r\n[closing the connection]\r\n");
       close(fd);
     }
+#endif
+  ipmiconsole_engine_teardown();
   if (c)
     {
       while (1)
         {
           if (ipmiconsole_ctx_destroy(c) < 0)
-           /* Wait a little bit then try again */
-           sleep(1);
+            sleep(1);
           else
             break;
         }
     }
-  ipmiconsole_engine_teardown();

I had to modify the state machine several times before b/c some obscure
vendor non-compliance made the state-machine go into a loop or go wacky.
I suppose it's not out of the question this time as well.

Thanks,
Al

On Thu, 2007-06-28 at 11:11 -0600, Levi Pearson wrote: 
> On Thu, 2007-06-28 at 09:39 -0700, Al Chu wrote:
> > 
> > So is it not closing the sessions?
> > 
> 
> Apparently not.
> 
> > > It would be handy to have a call that
> > > does trigger the closing of all sessions such that ipmi_ctx_destroy()
> > > will work on them afterward, though.
> > 
> > The library should work such that if you do:
> > 
> > engine_teardown();
> > foreach context I created
> >    ipmi_destroy_ctx(ctx);
> > 
> > This should work.  I'll look into this.
> 
> What I did:
> 
> engine_teardown();  <- doesn't block right now
> foreach context
>   while ipmi_destroy_ctx(ctx) < 0  <- need to spin in case 
>     sleep(1)                          connections aren't dead yet
> 
> And it sits forever (or at least 10 minutes or so) in the loop;
> apparently the call to destroy the ctx never succeeds.
> 
> So far I've only tested it with 3 concurrent connections, but I've got
> enough equipment handy to ramp it up to 12 or so.
> 
>               --Levi
-- 
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory


_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Reply via email to