[jcifs] Possible deadlock?
Jake Goulding
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
"smb://192.168.0.15/home/crpalmer/profile/Recent/sqlite-2.8.13.lnk"
The thread has now been stuck for 4500 seconds.
I could run AuthListFiles on the directory, and the output of FileInfo
is below.
toString:
smb://192.168.0.15/home/crpalmer/profile/Recent/sqlite-2.8.13.lnk
toURL:
smb://192.168.0.15/home/crpalmer/profile/Recent/sqlite-2.8.13.lnk
getName: sqlite-2.8.13.lnk
length: 614
getLastModified: 10/20/04 06:30:09 PM
isHidden: false
isFile: true
isDirectory: false
hashCode: 585734033
getUncPath:
\\192.168.0.15\home\crpalmer\profile\Recent\sqlite-2.8.13.lnk
getType: TYPE_FILESYSTEM
getShare: home
getServer: 192.168.0.15
getPath:
smb://192.168.0.15/home/crpalmer/profile/Recent/sqlite-2.8.13.lnk
getParent: smb://192.168.0.15/home/crpalmer/profile/Recent/
lastModified: 10/20/04 06:30:09 PM
getDiskFreeSpace: 54903439360
getDate: 10/20/04 06:30:09 PM
getContentLength: 614
getCanonicalPath:
smb://192.168.0.15/home/crpalmer/profile/Recent/sqlite-2.8.13.lnk
exists: true
canRead: true
canWrite: true
The output of netstat shows:
tcp 100 0 ::ffff:192.168.0.23:56013
::ffff:192.168.0.15:445 ESTABLISHED
so data is waiting to be read
The stack trace for that thread:
# where
Stack for thread Thread-40:
[1] java.lang.Object.wait (native)
[2] java.lang.Object.wait (), pc = 2
* [3] jcifs.smb.TransactNamedPipeInputStream.read
(TransactNamedPipeInputStream.java:71), pc = 28
[4] jcifs.smb.RpcTransport.receive (RpcTransport.java:118), pc = 40
[5] rpc.DefaultConnection.receiveFragment
(DefaultConnection.java:112), pc = 5
[6] rpc.DefaultConnection.receive (DefaultConnection.java:64), pc = 2
[7] rpc.ConnectionOrientedEndpoint.receive
(ConnectionOrientedEndpoint.java:144), pc = 13
[8] rpc.ConnectionOrientedEndpoint.call
(ConnectionOrientedEndpoint.java:88), pc = 151
[9] rpc.Stub.call (Stub.java:113), pc = 39
[10] jcifs.rpc.LsaRPC.closePolicy (LsaRPC.java:67), pc = 12
[11] jcifs.rpc.LsaRPC.lookupSids (LsaRPC.java:120), pc = 254
[12] jcifs.smb.SmbFile.getSecurity (SmbFile.java:2539), pc = 138
[13] com.vivisimo.converters.SMBConnector.get_acl
(SMBConnector.java:258), pc = 1
[14] com.vivisimo.converters.SMBConnector.process_file
(SMBConnector.java:246), pc = 234
[15] com.vivisimo.converters.SMBConnector.process_node
(SMBConnector.java:71), pc = 245
[16] com.vivisimo.converters.ConverterWorker.run
(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://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
>
>
--
JAKE GOULDING
Software Engineer
goulding at vivisimo.com
Vivísimo [Search Done Right]
1710 Murray Avenue
Pittsburgh, PA 15217 USA
tel: +1.412.422.2499 x105
fax: +1.412.422.2495
vivisimo.com clusty.com
More information about the jcifs
mailing list