[jcifs] Thread deadlock

Jason Scherer jscherer at blackfintech.com
Thu Mar 20 05:11:58 EST 2003


I am using Windows 2000 server and Sun JDK 1.3.1.  The samba api is being
used to go from one Windows 2000 server to another Windows 2000 server.
After looking at this more, I think you are right that it isn't deadlock. 
What seems to happen is this:The file that is being copied from the source machine to the destination
machine is created on the destination machine with 0 bytes, and then the
process hangs.  Using the samba api I can delete the 0 byte file but if I
try to do anything else with the file I get an "invalid file handle"
error.
I have waited 30 minutes for the process to timeout, but it never seems to
timeout.
One time the process gets in this state, and the next time it runs fine
with the same set of files so it isn't the files that are being copied
that are the problem.
> I don't think this is a deadlock. The JCIFS-WriterThread is waiting in
> the ready state while JCIFS-SmbTransport is waiting for a response to
> some message (probably an SMB_COM_READ_ANDX response). The client is
> just waiting for a response. It could be some other kind of bug but I
> don't think it's a deadlock.
>
> So you tried waiting for this to timeout and it hangs indefinately? How
> long did you wait? You should get "Timeout waiting for response from
> server". If you don't then it's possible that it's just getting dead
> air after sending a SYN packet but you should get "Connection timeout"
> after ~1 min 15 seconds. If it hangs indefinately it's probably some
> other kind of bug.
>
> Also please let us know what your platform and JVM implementation is.
>
> Mike
>
>> -----Original Message-----
>> From:	Jason Scherer [SMTP:jscherer at blackfintech.com]
>> Sent:	Tuesday, March 18, 2003 11:23 AM
>> To:	Michael_B_Allen at ml.com
>> Cc:	jcifs at lists.samba.org
>> Subject:	RE: [jcifs] Thread deadlock
>>
>> Here is a full thread dump:
>>
>> Full thread dump:
>>
>> "JCIFS-WriterThread" daemon prio=5 tid=0x896ca50 nid=0x9d8 waiting on
>> monitor [0x924f000..0x924fdbc]
>>         at java.lang.Object.wait(Native Method)
>>         at java.lang.Object.wait(Unknown Source)
>>         at jcifs.smb.SmbFile$WriterThread.run(SmbFile.java:1531)
>>
>> "JCIFS-SmbTransport" daemon prio=5 tid=0x78b020 nid=0x8fc runnable
>> [0x920f000..0x920fdbc]
>>         at java.net.SocketInputStream.socketRead(Native Method)
>>         at java.net.SocketInputStream.read(Unknown Source)
>>         at
>>         jcifs.netbios.SessionServicePacket.readPacketType(SessionServicePacket.java:68)>>         at
>>         jcifs.netbios.SocketInputStream.read(SocketInputStream.java:73)
>>         at
>>         jcifs.netbios.SocketInputStream.read(SocketInputStream.java:39)
>>         at java.io.FilterInputStream.read(Unknown Source)
>>         at java.io.PushbackInputStream.read(Unknown Source)
>>         at jcifs.smb.SmbTransport.run(SmbTransport.java:304)
>>         at java.lang.Thread.run(Unknown Source)
>>
>>





More information about the jcifs mailing list