[Discuss] Infinity working/not responding function eg. exist/listing dir, is any solution? by setting timeout by parameter
Mischa Salle
msalle at nikhef.nl
Sun Jan 29 20:52:27 CET 2023
Hi Piotr,
On Sat, Jan 28, 2023 at 11:40:59AM +0100, Piotr S. Wawryka wrote:
> > On Thu, Jan 26, 2023 at 04:32:59PM +0100, Piotr S. Wawryka wrote:
> >> Hi Mischa!
> >> Thanks for fast response.
> >>
> >> We use this part of code https://github.com/gridcf/gct/blob/master/gridftp/client/source/globus_ftp_client_exists.c called from Ruby here
> >> https://gitlab.com/cyfronet/ruby-gridftp/-/blob/master/lib/ruby-gridftp/exists.rb
> >> lib/ruby-gridftp/exists.rb · master · cyfronet / ruby-gridftp · GitLab
> >> gitlab.com <http://gitlab.com/>
> >> It's run on HPC infrastructure. Is any other information should I provide?
> >
> > no, I think this is sufficient.
> >
> > First disclaimer, I'm not a ruby programmer, and I think none of the
> > others are, so at least I cannot tell if you could do something on the
> > ruby side and/or whether you're missing something there.
> >
> > Others may correct me, but I'd say the
> > globus_ftp_client_exists()
> > function itself doesn't let you pass a timeout.
> If anyone know, this is the time for it :D
> > Are you saying that that call itself is hanging indefinitely?
> It happens first time on 8 years.
> > I would probably run it (in other languages) in either a separate
> > process or thread with an external timeout.
> Probably is the only one way.
>
> PS: I was thinking operationattr provide that option to set timeout or sth like this. I tried compile and printf some values. Some screens here https://gitlab.com/cyfronet/plgdata/-/issues/25. I select 943 line by red arrow with interesting name function.
> # globus_result_t globus_ftp_client_exists (
> # globus_ftp_client_handle_t * u_handle,
> # const char * url,
> # globus_ftp_client_operationattr_t * attr,
> # globus_ftp_client_complete_callback_t complete_callback,
> # void * callback_arg
> # )
You could also have a look at the plugin API, and in particular at e.g.
https://gridcf.org/gct-docs/api/6.2/globus_ftp_client_debug_plugin_8example-example.html
which you could adapt to use the _exists function instead of the _get
function.
See https://gridcf.org/gct-docs/api/6.2/group__globus__ftp__client__plugins.html
for the different plugins.
globus-url-copy can set for example a "stall-timeout", see
https://gridcf.org/gct-docs/latest/gridftp/pi/index.html
which is implemented via a plugin, see
https://github.com/gridcf/gct/blob/master/gass/copy/source/globus_url_copy.c#L5698-L5699
and
https://github.com/gridcf/gct/blob/master/gridftp/client/source/globus_ftp_client_restart_plugin.c#L1463-L1480
Useful info about the gridftp client api in general:
https://gridcf.org/gct-docs/api/6.2/group__globus__ftp__client__api.html
and the links there to the handle and operations.
Hope this helps
Cheers
Mischa
--
Nikhef Room 1.14
Science Park 110 Tel. +31-6-4681 2202
1098 XG Amsterdam Fax +31-20-592 5155
The Netherlands Email msalle at nikhef.nl
__ .. ... _._. .... ._ ... ._ ._.. ._.. .._..
More information about the discuss
mailing list