[jcifs] Possible deadlocking between jcifs.smb.Dfs and jcifs.smb.SmbTransport

Michael B Allen ioplex at gmail.com
Mon Mar 5 09:02:48 MST 2012

Can you please create a small torture test program that triggers the
deadlock and post it?


On Mon, Mar 5, 2012 at 2:00 AM, Xavier Roche <roche+kml2 at exalead.com> wrote:
> On 03/05/2012 04:20 AM, Michael B Allen wrote:
>> No. It is not ok to use the same SmbFile instance with more than one
>> thread at a time. You can use multiple threads but you just can't use
>> the same SmbFile object with multiple threads at the same time.
> Okay, noted.
>> Are you seeing the deadlock with different SmbFile instances or is it
>> only when trying to use the same SmbFile object with multiple threads?
> I am seeing the same deadlock, even when using a single SmbFile on each
> thread, when accessing the same DFS tree. (I even synchronized all calls to
> SmbFile to ensure that there was no reentrancy issue)
> If I am not mistaken, the way to reproduce the issue is to have multiple
> threads working with *different* files, but inside a *common* DFS (the files
> were created by the same listFiles() probably).
> A small torture test (32 threads) will typically deadlock within
> seconds/minutes.
> [ A "regular" program would also deadlock, but more "randomly"/slowly. ]

Michael B Allen
Java Active Directory Integration

More information about the jCIFS mailing list