[jcifs] threading

Dan Dumont dan at canofsleep.com
Sun Feb 23 10:36:42 EST 2003


I am sad to report that it behaves the same way on FreeBSD 4.7-release
using Java 1.3.1 also.


-----Original Message-----
From: jcifs-bounces+dan=canofsleep.com at lists.samba.org
[mailto:jcifs-bounces+dan=canofsleep.com at lists.samba.org] On Behalf Of
Dan Dumont
Sent: Saturday, February 22, 2003 5:59 PM
To: 'Christopher R. Hertel'
Cc: jcifs at samba.org
Subject: RE: [jcifs] threading

OS: winXP
JVM: 1.3.1

-----Original Message-----
From: Christopher R. Hertel [mailto:crh at ubiqx.mn.org] 
Sent: Saturday, February 22, 2003 5:51 PM
To: Dan Dumont
Cc: jcifs at samba.org
Subject: Re: [jcifs] threading

[On List]

On Sat, Feb 22, 2003 at 04:36:20PM -0500, Dan Dumont wrote:
:
> this is the error I get when the thread finally dies:
> jcifs.smb.SmbException: Connection timed out: connect
> 	at jcifs.smb.SmbTransport.send(SmbTransport.java:476)
> 	at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:664)
> 	at jcifs.smb.SmbTree.treeConnect(SmbTree.java:116)
> 	at jcifs.smb.SmbFile.connect(SmbFile.java:514)
> 	at jcifs.smb.SmbFile.connect0(SmbFile.java:484)
> 	at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:460)
> 	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1325)
> 	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1237)
> 	at T2Crawler.<init>(T2Crawler.java:91)
> 	at T2Crawler.main(T2Crawler.java:114)

The connect() function on a Unix box can block if the socket is not set
to
non-blocking before the call is made.  It would take some testing (the
same JDK on the same OS platform) but it is *possible* (remotely) that
there's a bug in that is causing the connect() attempt (or equivalent
for
your platform) to block (thus blocking the process, rather than just the
Java thread).  If that happened, and if the Java threads all exist
within
a single OS-level process, then you would see the threads suspend until 
the blocking system call completes.

There are a *lot* of assumptions in that description.  The reason I'm
pursuing this, though, is that I *have* seen it.  It was a long time ago
on an SGI platform.  The blocking was caused when the JVM made a call to
the OS's DNS name resolution functions.  All threads would halt until
the
name resolution completed (or timed out).  Name resolution also blocks
(on
Unix-y systems).

I really don't have enough information to do more than guess, and what 
I've given you is a wild guess.

Can you give us the OS and JVM version again?

Chris -)-----

-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development,
uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org








More information about the jcifs mailing list