[jcifs] How to make jCIFS 1.3.14 more stable

calle henning calle.henning at lapino.se
Mon May 31 15:18:04 MDT 2010


I'm working for a client who uses jCIFS in some of their applications;
this to access their file servers located on different geographical
locations (even different countries). This client has had quite a lot of
issues accessing their file shares and the cause has always been said to
be badly configured servers, but I started to look at jCIFS as a another
possible cause for the client's issues and I found a couple of bugs in

The first bug that I found was a glitch in
jcifs.util.Transport.connect(long) that causes a time-out exception to
be thrown although no time-out has actually occurred.

The second bug that I found was that jcifs.smb.SmbFile.doConnect() keeps
on using the same IP address on retries if the server resolves to
multiple IP addresses. The log message states that a new address is
being used but the same Transport instance is being used.

Adding the two bug fixes to 1.3.14 eliminated a lot of the issues and
through wrapping jCIFS (this to handle the badly configured file
servers), I managed to eliminate all communication failures that
previously caused the client a lot of headaches; this generating only
hard failures to the application. But a patched jCIFS containing my two
bug fixes was enough to create a stable jCIFS that has yet to fail in
production for the client that I'm working for right now.

I do not know what the definition is for a stable bug fix is, but a lot
of testing has been done on my patched jCIFS 1.3.14. The tests were
conducted both under Solaris and Windows XP and access was done using

I submit the bug fixes as attachments to these posting. I do not know if
this is the proper way for doing this; otherwise let me know. The
patches are based on my own Maven project representing jCIFS version

Calle Henning

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jcifs.util.Transport-bugfix.patch
Type: text/x-patch
Size: 1909 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20100531/8c776f01/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jcifs.smb.SmbFile-bugfix.patch
Type: text/x-patch
Size: 1132 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20100531/8c776f01/attachment-0001.bin>

More information about the jCIFS mailing list