[Gluster-devel] how to reinstall a peer?

krish kparthas at redhat.com
Wed Feb 27 11:52:14 UTC 2013

On 02/27/2013 10:58 AM, Emmanuel Dreyfus wrote:
> Emmanuel Dreyfus<manu at netbsd.org>  wrote:
>>>           if (!xdr_string (xdrs, &objp->op_errstr, ~0))
>>>                   return FALSE;
>> How is this supposed to work? Here is below the NetBSD xdr_string()
>> implementation from libc. Even if objp->op_errstr is not NULL, the
>> maxsize argument set to 0 will cause it to always retrurn false. Does it
>> has another semantic in Linux?
> I overlooked it. ~0 is indeed not 0.
Hi Emmanuel,

I have attached a patch that should fix the glusterd crash on peer-probe.
xdr_string fails to serialize the supplied char * argument if it is 
NULL. This
patch ensures that we supply a empty string when we don't have an actual
errstr to send across the wire.

Interestingly, in Linux glusterd didn't crash, but encoding the response 
failed with
xdr_string failing to serialize a NULL string.

Could you raise a bug for this with the backtrace attached to it? That 
would be handy to
push this patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-glusterd-Setting-errstr-to-to-appease-xdr_string.patch
Type: text/x-patch
Size: 1151 bytes
Desc: not available
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20130227/f4419025/attachment-0001.bin>

More information about the Gluster-devel mailing list