Nasty BUG

Allen, Michael B (RSCH) Michael_B_Allen at
Tue Mar 27 22:38:45 GMT 2001

This message has been cross posted to
CIFS at DISCUSS.MICROSOFT.COM, samba-technical at,
jcifs at and was originally posted to the list
regarding a bad interaction between our Java client with Windows NT and
the TRANS2_FIND_NEXT2 message. Just an FYI but if you're the
implementor of a client or seek NT behavior it's something you might want
to make a note of.

Michael B. Allen

> -----Original Message-----
> From:	Christopher R. Hertel [SMTP:crh at]
> Sent:	Tuesday, March 27, 2001 12:59 PM
> To:	Michael B. Allen
> Cc:	jcifs at
> Subject:	Re: Nasty BUG
> Have you mentioned this on the Samba-Tech or CIFS list?  I'd be interested
> in feedback from other implementors.
> Chris -)-----
> On Tue, Mar 27, 2001 at 01:11:59AM -0500, Michael B. Allen wrote:
> > I just found a troubling bug(whether or not it is a bug in jcifs or NT
> > is left to your interpretation). The SmbFile.list() method uses a pair
> > of messages called TRANS2_FIND_FIRST2 and TRANS2_FIND_NEXT2. According
> > to the documentation a special flag may be used to indicate that a
> > 'ResumeKey' should be returned to specify which file the listing operation
> > should continue from. I have now oberved that NT sp3 and sp4 at least may
> > require this key *regardless of how the special flag is set*. In addition
> > the resumeKey the documentation speaks of is elusivly disguised as the
> > 'FileIndex' field of the response packet.
> > 
> > What makes this bug troubling is that the problem may manafest itself ever
> > so infrequently. To the best of my knowledge no one has ever encountered
> > this problem. [UPDATE: It has now been confirmed by one other user. See
	the jcifs archives for details] But miraculously I have stumbled apon it just now(and
> > fixed it BTW). When the problem occurs the client will appear to lock
> > up as it endlessly hogs CPU and bandwith reading the same set of files
> > over and over never reaching the end of the complete listing.
> > 
> > If you have encoutered this problem, avoiding the SmbFile.list() method
> > with NT should prevent the problem.
> > 
> > Thanks,
> > Mike
> > 
> > -- 
> > signature pending
> > 
> -- 
> Samba Team --     -)-----   Christopher R. Hertel
> jCIFS Team --   -)-----   ubiqx development, uninq.
> ubiqx Team --     -)-----   crh at

More information about the samba-technical mailing list