Guys:

Just found this bug in bugzilla:

http://bugzilla.ganglia.info/cgi-bin/bugzilla/show_bug.cgi?id=78

I guess it is the same bug we addressed?

Which solution is better?  The one checked into our repository or this one?

Cheers,

Bernard

On 9/10/07, Bernard Li <[EMAIL PROTECTED]> wrote:
> HI Brad:
>
> On 9/10/07, Brad Nicholes <[EMAIL PROTECTED]> wrote:
>
> >    But I do have one question regarding the 3.0.5 POLLHUP patch.  It looks 
> > like the real problem with the code is that on an EOF, POLLIN and POLLHUP 
> > are actually received together.  Therefore, the code in data_thread.c would 
> > go ahead and read the recv buffer and the proceed to throw everything away 
> > in the following "if" statement that checks for POLLHUP.  If this is the 
> > case, then would the following patch work better for all platforms without 
> > having to #ifdef the code as well as still allowing POLLHUP to stand on it 
> > own?  (BTW, this patch is against trunk, not 3.0.5)
> >
> > Index: data_thread.c
> > ===================================================================
> > --- data_thread.c       (revision 829)
> > +++ data_thread.c       (working copy)
> > @@ -130,6 +130,10 @@
> >                                   break;
> >                                }
> >                             read_index+= bytes_read;
> > +                           if( struct_poll.revents & POLLHUP )
> > +                              {
> > +                                 break;
> > +                              }
> >                          }
> >                       if( struct_poll.revents & POLLHUP )
> >                          {
> >
> > This patch would just detect the EOF condition signaled by POLLIN | POLLHUP 
> > and allow the data buffer to process the data normally in the same way as 
> > if bytes_read == 0.
>
> If you believe this is a better patch, please feel free to check this
> into both branch/trunk and I'll release another candidate for testing
> (with some other patches as well).
>
> It would be even better if folks could test this patch prior to the
> check-in so we know for sure this works fine on Intel/ppc Mac OSX.
>
> Cheers,
>
> Bernard
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to