Print

Print


Hi Fabrizio,

There really is very little that xrootd can do for you here. Returning a
kXR_wait does not help because all you will do is to re-issue the request
which would mean I would have to keep complex information around to prevent
re-executing the cksum just because it hasn't finished. Not very good.

I would suggest that you temporarily increase the timeout for query cksum.
Alternatively, I can make query cksum asynchronous. That would allow you to
issue a ping request after the timeout period to see if the server is really
still alive and you simply haven't gotten the response back within the
timeout period.

I suppose we can even make it more complex by allowing you to query about
things in progress. But I'd rather stick with simple solutions if at all
possible. That leaves (1) as the simplest, and (2) as the less simple one
but still not overly complex.

What do you think?

Andy

----- Original Message ----- 
From: "Fabrizio Furano" <[log in to unmask]>
To: "Wilko Kroeger" <[log in to unmask]>
Cc: "Andrew Hanushevsky" <[log in to unmask]>; <[log in to unmask]>
Sent: Thursday, November 18, 2004 10:16 AM
Subject: Re: GetChecksum perl interface


> Hi Wilko,
>
>   the chksumming seems ok now to me. You can try it by running
> tinytestXTNetAdmin.pl.
>
>   A little consideration: I noted that the checksumming takes a long
> amount of time (about 10 secs in this small test). If the time needed
> for computing the checksum is greater than the XrdClient timeout (30 or
> 60 secs), the client will initiate its retry operations because it will
> think that the server is dead. The checksum will be asked to the
> redirector or to another server, which eventually will timeout too... a
> loop which will fail after a number of retries.
>
>   If this problem will one day show up, I believe that the correct way
> to fix it could be to use the kxr_wait mechanism. No changes at the
> client side would be needed at all.
>
>   However, please let me know if it works for you. I'll read the mail
> tomorrow, then I'll be out for a few days.
>
>   Fabrizio
>
> Wilko Kroeger wrote:
> > Hello Fabrizio
> >
> > Checksumming on bbrprod01 should work. What is the file name you pass to
> > GetChecksum ? It should be
> > /prod/store/PRskims/R14/16.0.1a/AllEvents/23/AllEvents_2301.01.root
> >
> > Cheers,
> >    Wilko
> >
> >
> > On Thu, 18 Nov 2004, Fabrizio Furano wrote:
> >
> >
> >>Hi Wilko,
> >>
> >>  I changed that function in order to handle any checksum size.
> >>Unfortunately I am not able to find a server/file giving me any
checksum.
> >>
> >>This is what I get from bbrprod01:
> >>
> >>  041118 06:15:44 001 Xrd: SendGenCommand Server declared error
> >>3010:Check summing path
>
>>'/kanga/prod/store/PRskims/R14/16.0.1a/AllEvents/23/AllEvents_2301.01.root
'
> >>is disallowed.
> >>
> >>Please, can you tell me something I can checksum somewhere?
> >>
> >>I will commit the change when I am able to test it at least once.
> >>Differently from the former version, which I committed without any
> >>available server doing checksums at the time...
> >>
> >>Fabrizio
> >>
> >>
> >>Wilko Kroeger wrote:
> >>
> >>>Hello Fabrizio
> >>>
> >>>I tried the GetChecksum perl interface (on linux) with the
> >>>latest version. It kind of works but produces a core after
> >>>calling.
> >>>The problem is in the usage of the shared buffer (char *sharedbuf)
> >>>in XrdClientAdmin_c.cc.
> >>>
> >>>XrdGetChecksum() uses this buffer to hold the checksum returned from
the
> >>>server (AFAIK). I think the core is produced if the buffer is to small.
> >>>I changed in XrdGetChecksum()
> >>>
> >>>from:
> >>>memset(sharedbuf, 0, sizeof(sharedbuf));
> >>>adminst->GetChecksum((kXR_char *)path, (kXR_char *)sharedbuf);
> >>>
> >>>to:
> >>>SharedBufRealloc(30);
> >>>memset(sharedbuf, 0, 30);
> >>>adminst->GetChecksum((kXR_char *)path, (kXR_char *)sharedbuf);
> >>>
> >>>and then it works fine. Is there a better way to allocate the buffer?
> >>>I just choose a size (=30) that is safe for our purpose but it isn't
> >>>guaranteed that it will work if a different checksum algorithm is used
> >>>(Also not only the checksum but also a string is returned e.g.:
> >>>crc32 3140090365)
> >>>
> >>>Cheers,
> >>>   Wilko
> >>>
> >>
>