[jcifs] Possible deadlock?
goulding at vivisimo.com
Fri Sep 1 15:31:13 GMT 2006
Thanks for the quick response.
I started the crawler, and it is currently stuck on a bunch of files,
the file I picked to investigate is
The thread has now been stuck for 4500 seconds.
I could run AuthListFiles on the directory, and the output of FileInfo
getLastModified: 10/20/04 06:30:09 PM
lastModified: 10/20/04 06:30:09 PM
getDate: 10/20/04 06:30:09 PM
The output of netstat shows:
tcp 100 0 ::ffff:192.168.0.23:56013
so data is waiting to be read
The stack trace for that thread:
Stack for thread Thread-40:
 java.lang.Object.wait (native)
 java.lang.Object.wait (), pc = 2
*  jcifs.smb.TransactNamedPipeInputStream.read
(TransactNamedPipeInputStream.java:71), pc = 28
 jcifs.smb.RpcTransport.receive (RpcTransport.java:118), pc = 40
(DefaultConnection.java:112), pc = 5
 rpc.DefaultConnection.receive (DefaultConnection.java:64), pc = 2
(ConnectionOrientedEndpoint.java:144), pc = 13
(ConnectionOrientedEndpoint.java:88), pc = 151
 rpc.Stub.call (Stub.java:113), pc = 39
 jcifs.rpc.LsaRPC.closePolicy (LsaRPC.java:67), pc = 12
 jcifs.rpc.LsaRPC.lookupSids (LsaRPC.java:120), pc = 254
 jcifs.smb.SmbFile.getSecurity (SmbFile.java:2539), pc = 138
(SMBConnector.java:258), pc = 1
(SMBConnector.java:246), pc = 234
(SMBConnector.java:71), pc = 245
(ConverterWorker.java:888), pc = 38
Note that I am using the ACL resolving patch.
Michael B Allen wrote:
> 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://22.214.171.124/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.
goulding at vivisimo.com
Vivísimo [Search Done Right]
1710 Murray Avenue
Pittsburgh, PA 15217 USA
tel: +1.412.422.2499 x105
More information about the jcifs