[jcifs] Threads locked while calling SmbFile.getSecurity

Michael B Allen ioplex at gmail.com
Tue Aug 5 14:31:49 GMT 2008

On Tue, Aug 5, 2008 at 5:45 AM, Marc Brette <marc.brette at gmail.com> wrote:
> I resend this email as it didn't appear in the list:
> Hi Mike,
> On another machine, I actually hit the issue with only 14 threads.
> [update: and even 10 threads]
> It seems this is machine dependent.
> Do you think about a work-around so that I could avoid this limit ?
> Note: I didn't try the new versions you shipped since, but it didn't
> seem to solve the issue.

If you never use more threads than twice the number of buffers then I
think  you should be fine. So if you want to use 10 threads, set
maxBuffers to 25, for 100 threads set maxBuffers to 105, ... etc.

Note that using a lot of threads does not necessarily equate to more
work getting done. Unless your network is slow, I've found that each
server can only handle about two threads crawling it at the same time.

This deadlock is related to the other connect / disconnect deadlock.
At least I think it would be easy to fix if we used a
ConditionVariable class instead of synchronized blocks.


Michael B Allen
PHP Active Directory SPNEGO SSO

More information about the jcifs mailing list