I found a problem with lftp version 4.6.3a. I looked over the commit history and I guess the problem is still here with more recent versions. Unless this fix "ftp: fixed ls freezing with unstable server connection." solved it.
I use lftp in embedded devices since 2 years and this is the first time I see this problem. My devices record some files and I use lftp to push these files to my ftp server. And, few days ago, one of these devices failed to send one file.
As I understand (I wasn't on the console when the problem appeared), this device tried to push a file to its ftp server but the internet connection was bad at this moment. So, lftp exited. The device retried to send this file and lftp is stuck in this process.
I have a cron to retry failed transfers:
*/10 * * * * nice -n 19 ftp-push flush
In the ftp-push script, when we do a flush, I use flock to be sure to have only one process which retry to push the failed files. I also create a lftp script and use a fifo to redirect lftp output to a syslog server like that:
You can see the fifo /tmp/lpi.wnFSuS (1 and 2), the file used with flock /tmp/lock/ftp-push.lock (14), the generated lftp script (4) and the file we try to send to the ftp server /mnt/sdcard/records/16245006.txt (6).
Hi,
I found a problem with lftp version 4.6.3a. I looked over the commit history and I guess the problem is still here with more recent versions. Unless this fix "ftp: fixed ls freezing with unstable server connection." solved it.
I use lftp in embedded devices since 2 years and this is the first time I see this problem. My devices record some files and I use lftp to push these files to my ftp server. And, few days ago, one of these devices failed to send one file.
As I understand (I wasn't on the console when the problem appeared), this device tried to push a file to its ftp server but the internet connection was bad at this moment. So, lftp exited. The device retried to send this file and lftp is stuck in this process.
I have a cron to retry failed transfers:
*/10 * * * * nice -n 19 ftp-push flush
In the ftp-push script, when we do a flush, I use flock to be sure to have only one process which retry to push the failed files. I also create a lftp script and use a fifo to redirect lftp output to a syslog server like that:
This is how my system works.
Since 3 days, I'm seeing these line in ps faux and the process ids are the same:
If I do a strace to the process 1916, I see this:
Bellow, I copy the list of file descriptors open by the process:
You can see the fifo /tmp/lpi.wnFSuS (1 and 2), the file used with flock /tmp/lock/ftp-push.lock (14), the generated lftp script (4) and the file we try to send to the ftp server /mnt/sdcard/records/16245006.txt (6).
What do you think about this problem ?