[jcifs] Possible deadlock?

Michael B Allen mba2000 at ioplex.com
Thu Aug 31 22:54:24 GMT 2006


On Thu, 31 Aug 2006 16:53:38 -0400
Jake Goulding <goulding at vivisimo.com> wrote:

> Brief recap:
> Basically, I am crawling 18 or so hosts, with a maximum of 3 threads per 
> each host, with a total maximum of 50 threads (a difference of 4 threads).
> Somewhere along the line, usually a few threads seem to get stuck. This 
> particular time, I think all the threads are stuck.
> 
> I did get a thread dump (attached).
> 
> We've switched from our JNI application to a Java-native one that 
> communicates with the C via sockets, so JNI should not be a problem anymore.
> 
> Any advice is appreciated. :-)

In a crawling situation it's very common to have some hosts that are
unresponsive. In particular if the client sends a SYN packet and there is
no reply it can take over a minute for the socket connect to timeout. But
all threads should eventually timeout.

Have your crawler print information about each host like "Trying to
crawl smb://192.17.10.10/c$/foo ..." and when a thread get's hung up
make a note of the host. Then try one of the simple example programs
like examples/ListFiles.java on that host. I think you'll find that it
get's gummed up too because the host is just down or in a bad state or
firewalled or whatever.

Mike

-- 
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/


More information about the jcifs mailing list