[jcifs] Re: jcifs-1.1.9 ArrayIndexOutOfBoundsException: -2146866174

Michael B Allen mba2000 at ioplex.com
Wed Mar 2 23:52:10 GMT 2005


madlg3 at vodafone.es said:
> Attached you can find the exception and the T2Crawler.

I can't reproduce this with your crawler on my Linux system. But I don't
have that much memory. I can only run with -Xmx256M. Can you reduce the
complexity of the test program by trial and error analysis to see what
behavior triggers the problem? How long does it take for the problem to
occur for you?

I did notice a bug. When connecting to the same share with multiple
threads simultaniously it is possible for multiple tree connect operations
to be performed for the same tree object. After the first tree operation
is complete it proceeds to use the last tid value for all subsequent
operations. From a protocol prespective this bahavior is legitimate but it
is a concurrency flaw as far as jCIFS is concerted so your problem could
be an artifact of this unexpected bahavior. If you put:

(new SmbFile(argv[0])).exists();
        for(int i=0;i<Integer.parseInt(argv[1]);i++)

just before you start your multiple crawlers it will initialize the single
tree before the crawlers start. Does the problem still occur?

Ironically I'm currently working on a new tranport layer for 2.0 that
greatly simplifies these sorts of synchronization scenarios.

Mike


More information about the jcifs mailing list