Output: .................... .................... 84986 ( 44.7 kb/s) \somefile.wmf Error reading file \nextfile.dll : Call timed out: server did not respond after 20000 milliseconds Didn't get entire file. size=974848, nread=917280 974848 ( 24.1 kb/s) \nextfile.dll Call timed out: server did not respond after 20000 milliseconds opening remote file \v (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \v (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \w (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \w (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \W (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \x (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \x (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \z (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \z (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \z (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \z (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \z (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \z (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \z (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \z (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \_ (\) Call timed out: server did not respond after 20000 milliseconds opening remote file \_ (\) ===== Actually having had one timeout, the smbclient continues to the next file and tries to get it from the other side. Although possibly the connection will restore (which I know will take about 5-10 minutes in our case), smbclient seems to stick to the original error and finishes in a millisecond. OK, for that, however it also fails to retrieve the files (filenames) it still has to do. The latter, which is visible in the next run of function do_tar() is in the finfo argument. It is no longer containing valid information. As it is called by do_list(), there has to be the error, so we skip to libsmb/clilist.c, function cli_list_new(). This function calls interpret_long_filename(), which is no longer getting the next full filenames. Why I have not yet been able to catch... I guess smbclient should re-try with each next file with a correct file name or simply stop processing, truncating the tar file with null data. There are scattered messages about the googles about the timeout problem, but so solutions. Sometimes they say it is because of a certain file, but this case is really about a buggy connection of which I know it will get restored after quite some time. I guess the workaround for me and now is to increase the socket timeout to about 20 minutes or so...
honestly I don't think there is anything special that smbclient should do here. if you have such a bad connection, you needto fix that.