[jcifs] Problem with sometimes not responding call to smbFile.listFiles()

Michael B Allen ioplex at gmail.com
Tue Nov 29 11:29:53 MST 2011


Hi Markus,

Was this with the latest JCIFS or with your patched 1.3.11?

It looks like you are using a lot of threads and one or more servers
are just slow or not responding at all so you end up using a lot of
buffers. Rather than use more buffers you should use less threads and
dynamic timeout values to make it more efficient when a slow server is
encountered (meaning try with a low timeout and if it times out, go
back and try again with a larger timeout). Note that each buffer is
64K so 100 buffers would be potentially 6.4 MB just in buffers. And it
does not really eliminate the problem.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/

On Tue, Nov 29, 2011 at 9:41 AM, Feichtinger Markus
<markus.feichtinger at bartelt.at> wrote:
> Hi Mike!
>
> This problem has been solved.
> A thread was found hanging and waiting at the following location:
> Stack trace:
> java.lang.Object.wait(Native Method)
> java.lang.Object.wait(Object.java:485)
> jcifs.smb.BufferCache.getBuffers(BufferCache.java:55)
> jcifs.smb.SmbTransport.send(SmbTransport.java:571)
> jcifs.smb.SmbSession.send(SmbSession.java:242)
>   - locked java.lang.Object at 14c93d3
> jcifs.smb.SmbTree.send(SmbTree.java:114)
> jcifs.smb.SmbFile.send(SmbFile.java:729)
> jcifs.smb.TransactNamedPipeOutputStream.write(TransactNamedPipeOutputStream.java:65)
> jcifs.dcerpc.DcerpcPipeHandle.doSendFragment(DcerpcPipeHandle.java:62)
> jcifs.dcerpc.DcerpcHandle.sendrecv(DcerpcHandle.java:183)
> jcifs.smb.SmbFile.doMsrpcShareEnum(SmbFile.java:1827)
> jcifs.smb.SmbFile.doShareEnum(SmbFile.java:1740)
> jcifs.smb.SmbFile.doEnum(SmbFile.java:1686)
> jcifs.smb.SmbFile.listFiles(SmbFile.java:1665)
>
> The parameter -Djcifs.smb.maxBuffers=100 helped us to get around the problem by increasing the maxBuffers from 16 to 100.
>
> Markus
>
> -----Ursprüngliche Nachricht-----
> Von: Feichtinger Markus
> Gesendet: Freitag, 14. Oktober 2011 08:20
> An: 'Michael B Allen'
> Cc: EDV Interne Mitarbeiter
> Betreff: AW: [jcifs] Problem with sometimes not responding call to smbFile.listFiles()
>
> Thank you very much Mike! We will update to version 1.3.16 as soon as possible. If we are still experiencing problems then we will let you know and otherwise this means the update solved all problems.
>
> Markus
>
> -----Ursprüngliche Nachricht-----
> Von: Michael B Allen [mailto:ioplex at gmail.com]
> Gesendet: Freitag, 14. Oktober 2011 07:54
> An: Feichtinger Markus
> Cc: jcifs at lists.samba.org; EDV Interne Mitarbeiter
> Betreff: Re: [jcifs] Problem with sometimes not responding call to smbFile.listFiles()
>
> On Thu, Oct 13, 2011 at 3:11 AM, Feichtinger Markus <markus.feichtinger at bartelt.at> wrote:
>> Hi Mike!
>>
>> We are not getting an error or an exception so we cannot post a stacktrace for you. The problem is that the call to listFiles() sometimes just isn't returning.
>>
>> We are currently using the version 1.3.11 with the following printing patch(es):
>
> Hi Markus,
>
> That's 2 years old. There was a deadlock fixed in 1.3.13. Locking throughout the transport layer was rewritten. You definitely need to update the patch.
>
> Mike
>
> --
> Michael B Allen
> Java Active Directory Integration
> http://www.ioplex.com/


More information about the jCIFS mailing list