[jcifs] Deadlock in Java code.

Matthew Tippett matthew at casero.com
Tue Dec 3 03:01:17 EST 2002


If a remote system goes down while a connection is active, the following
deadlock seems to occur.  Derived by <CTRL-\> under Linux.

Regards,

Matthew

Found one Java-level deadlock:
=============================
"JCIFS-SmbTransport":
   waiting to lock monitor 0x808749c (object 0x447c21a0, a 
jcifs.smb.SmbTree),
   which is held by "Thread-9"
"Thread-9":
   waiting to lock monitor 0x808814c (object 0x447ab990, a 
jcifs.smb.SmbSession),
   which is held by "JCIFS-SmbTransport"

Java stack information for the threads listed above:
===================================================
"JCIFS-SmbTransport":
	at jcifs.smb.SmbTree.treeDisconnect(SmbTree.java:130)
	- waiting to lock <0x447c21a0> (a jcifs.smb.SmbTree)
	at jcifs.smb.SmbSession.logoff(SmbSession.java:121)
	- locked <0x447ab990> (a jcifs.smb.SmbSession)
	at jcifs.smb.SmbTransport.tryClose(SmbTransport.java:280)
	at jcifs.smb.SmbTransport.run(SmbTransport.java:403)
	at java.lang.Thread.run(Thread.java:536)
"Thread-9":
	at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:94)
	- waiting to lock <0x447ab990> (a jcifs.smb.SmbSession)
	at jcifs.smb.SmbSession.send(SmbSession.java:85)
	at jcifs.smb.SmbTree.treeConnect(SmbTree.java:123)
	- locked <0x447c21a0> (a jcifs.smb.SmbTree)
	at jcifs.smb.SmbFile.connect(SmbFile.java:496)
	at jcifs.smb.SmbFile.connect0(SmbFile.java:466)
	at jcifs.smb.SmbFile.queryPath(SmbFile.java:839)
	at jcifs.smb.SmbFile.exists(SmbFile.java:914)
	at
com.casero.eden.service.cifs.CIFSProvider.exists(CIFSProvider.java:262)
	at 
com.casero.abode.file.ZoneManagerThread.pollOpzone(ZoneManagerThread.jav
a:145)
	at
com.casero.abode.file.ZoneManagerThread.run(ZoneManagerThread.java:104)
	at java.lang.Thread.run(Thread.java:536)

Found 1 deadlock.


-----

The information contained in this message is proprietary of Casero Inc.,
protected from disclosure, and may be privileged. The information is
intended to be conveyed only to the designated recipient(s) of the
message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or
copying of this communication is strictly prohibited and may be
unlawful. If you have received this communication in error, please
notify us immediately by replying to the message and deleting it from
your computer. Thank you.




More information about the jcifs mailing list