From the bug report:

"The patch just rips out the failing POLLHUP code.  "

If that is the case, then the results are the same.  The #ifdef that  
was added in 3.0.5  just ignores the failing POLLHUP on OSX, but  
leaves it for all other platforms.

I wish I would have seen this bug report ....would have saved me some  
time! (Arrgg...)

Mike


On Oct 10, 2007, at 5:28 PM, Bernard Li wrote:

> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to