Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lftp Timeout Mechanism #718

Open
chengyechun opened this issue Dec 29, 2023 · 1 comment
Open

Lftp Timeout Mechanism #718

chengyechun opened this issue Dec 29, 2023 · 1 comment

Comments

@chengyechun
Copy link

When you run the lftp command to connect to an unknown host, the connection times out and the connection is disconnected.
However, after the lftp command is started, the local system time is changed to the past time. As a result, there is a high probability that the lftp command is suspended.
Indicates whether to consider the Clock_MONOTONIC clock when setting the timeout mechanism for lftp.

@chengyechun
Copy link
Author

If the system time is changed to the past time, will the value of select_timeout in the select change for a long time? Similar to the following stack

(gdb) bt
#0 0x00007f0958e31929 in select () from /usr/lib64/libc.so.6
#1 0x00007f09592fa105 in PollVec::Block (this=0x556a949822e0 SMTask::block) at PollVec.cc:78
#2 0x00007f09592fac22 in SMTask::Block () at SMTask.cc:264
#3 0x00007f09593b558d in Job::WaitDone (this=0x556a95e40f40) at Job.cc:563
#4 0x0000556a94975bef in main (argc=4, argv=0x7ffe721209e8) at lftp.cc:590
(gdb) f 1
#1 0x00007f09592fa105 in PollVec::Block (this=0x556a949822e0 SMTask::block) at PollVec.cc:78
78 select(nfds,&in_ready,&out_ready,0,select_timeout);
(gdb) p *select_timeout
$1 = {tv_sec = 2349, tv_usec = 561673}

chengyechun added a commit to chengyechun/lftp that referenced this issue Jan 10, 2024
The mode of obtaining the system time through the lftp process is modified to rectify the timeout mechanism of the lftp process.
lavv17#718
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant