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 hangs after dowloading one file during a mirror #130
Comments
It would be helpful if you sent debug output of lftp |
Here is the regular outpur, debug output and the strace. Regular output:
debug:
strace:
|
It looks like a bug with out-of-order replies. I'll look into it. |
Okay, looking forward to test a patch. This is the one blocking bug for me at the moment. |
Any updates regarding this? |
Since I understand it might not be easy to diagnose, and I have support, I opened a case with Red Hat for this. I'll give feedback when I hear back from them, hopefully with a fix. |
Hi, I'm the guy, who is maintaining lftp for Red Hat, and I tried to reproduce this issue, but I was not successful: I'm not able to reproduce the bug you reported. I tried to reproduce it in the following way:
192.168.122.1 is IP of my desktop, where I created directory with 3 files. (echo "test1" > test1 ....). All files after transferring seem not to be corrupted. Files also didn't disappear from my desktop's directory. |
I also tried it with more directories in remdirectory and result is the same:
|
uhliarik: can you please get in touch via the case I opened on RHN? Number ends with 80. |
I don't think this is on redhat only. I had troubles transferring files onto a proftpd/vsftpd server running ubuntu. I ask merely because it sounded related, that mirror in lftp was hanging during the transfers. |
Oh, I'm sure it's not on RH only, but they're supporting it, so if they can fix it, it should benefit everybody. |
Any update? It seems, like lftp stucks at select function (or poll in previous version). It is just waiting for input from remote server, but server is not sending anything. |
FWIW: I'm still exchanging with RedHat support, and the process is rather slow. |
@lavv17 I went through the debug output and sources and from what I can tell, it seems that the order of getting replies makes the lftp not progress. From what I checked, the last READ request expects DATA, but gets STATUS with EOF. This makes lftp to set Do you think that the fact that state is set to DONE after the last EOF may be the issue here? Maybe the state should be set to CONNECTED when handling ATTR reply to STAT when switching dir? I'm mostly guessing here based on my analysis, since we are not able to reproduce the issue. Thanks for any clue! |
@thozza the test RPM I got from RH (likely from you) does work, no more hanging. I appreciate the difficulty of fixing this without being able to reproduce it or access the server triggering the issue. |
… packet arrives and packet queue is empty.
@lavv17 I send you a pull request with the patch, could you please look at it? The issue was caused by receiving packets, which were OOO, but code could not handle this problem. Thanks you very much! |
I have implemented a more general solution to the out-of-order replies. Please test f42e2d6 |
@lavv17 I applied the patch to 4.6.4 and tested it, it works, no more hanging. So looks good as far as I'm concerned, now looking forward for RH to backport it. |
I'm wondering whether this also affects ftp as I had a similiar issue with ftp stalling using mirror. I see the patch only is for sftp. |
Ftp is completely different and implemented as a separate module, so the ср, 2 дек. 2015, 19:25, Meliox notifications@github.com:
|
During a mirror, lftp transfers the first file, then hangs and doesn't exit. It's not clear why, there is no error the same directory hierarchy can be replicated using eg psftp.
The command run is:
The logs contain the following:
I forced a core of the running process to run a backtrace on it:
Also of note: the remote server is a funky one, as soon as a file has been accessed, it's removed. This is by design.
That means that any try to access it after it's been transferred will fail,
The text was updated successfully, but these errors were encountered: