[jcifs] Multiple Threads Causes Server Timeout
Michael B Allen
mba2000 at ioplex.com
Mon Apr 18 23:34:37 GMT 2005
madlg3 at vodafone.es said:
> I have a similar problem in 1.1.10, when using more that 4 threads to
> access a remote share I got time-out Exceptions. I have tried from 2
> different plattforms: solaris and HP-Ux (Pa) and the problem occurrs on
> I have also tried with 1.1.9 and trans, but the result is the same. I
> have already reported a similar issue with 1.1.9.
> I tried shares on different win OS, and the problem was always
> reproducable. The share I use for my test is based on Windows 2003. It
> contains 21,5 Gb in 46512 files and 17700 folders. The test is
> basically the T2Crawlwer, crawling all folders and fetching the ".doc"
> files. There are only a few word documents.
> The exception was:
> --------------------- start exception ---------------------------------
> jcifs.smb.SmbException: Timeout waiting for response from server:
> at jcifs.smb.SmbTransport.send(SmbTransport.java:671)
> at jcifs.smb.SmbSession.send(SmbSession.java:234)
> at jcifs.smb.SmbTree.send(SmbTree.java:103)
> The thing is that if I try the same using 0.8.3, I do not get all these
> I attach the source code.
I still can't reproduce this. I ran your example without the endsWith()
restriction on 30 gigs of files no problem. Your version is a little odd
because it creates a new thread for every directory but the semaphore only
permits one to run per T2Crawler instance. So it creates 100's of threads
that crawl one directory and then exit. Combined with allocating 8192
bytes per file it's kind of a memory hog. But still, I don't think that
should be a problem.
I know there's a concurrency bug in jCIFS but I'm starting to have doubts
that your actually tripping it up with this code. Are you sure your not
accidentally running with an old jar file? Try remove the jar and running
the program again. How long does it take to get errors? Is your network
fast? Is it 100 full-duplex or Gigabit or what? Are you still using
I think the problem must be a different bug alltogether. Or your setting
some properties you should not be. Or there's something environmental
More information about the jcifs