Bug 3473 - smbclient while creating a tar fails to handle socket timeouts
smbclient while creating a tar fails to handle socket timeouts
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: smbclient
3.0.21b
x86 All
: P3 major
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-01 02:11 UTC by Huibert
Modified: 2006-02-01 02:11 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Huibert 2006-02-01 02:11:54 UTC
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...