Roger Hart created SSHD-711:
-------------------------------
Summary: Apache hangs sending file
Key: SSHD-711
URL: https://issues.apache.org/jira/browse/SSHD-711
Project: MINA SSHD
Issue Type: Bug
Affects Versions: 1.1.0
Reporter: Roger Hart
Priority: Minor
We're running 1.1.0 but I get the same problem with 1.2.0. When sending a file
to a particular server we have problems on some machines but not others. I've
attached a DEBUG log for a "good" machine and a "bad" machine. For the "bad"
machine, the system hangs midway through sending the file. Here are the final
log entries.
My theory is that "normally" you see a "Writing X bytes" message, followed by a
"Finished writing" message, followed by a "Read Y bytes" message. But on the
"bad" machine there seems to be 2 "Write" messages before the hang. I think
this is because there are 2 threads putting a write request in the write queue
and both are written out to the socket. I'm wondering if this can cause the max
packet size specified in the SSH_MSG_CHANNEL_OPEN_CONFIRMATION message to be
exceeded. The "good" machine has fewer threads than the "bad" machine, and
we've also observed that a smaller files is less likely to hit the problem.
Do you think this theory is valid?
Thanks,
Roger
10:29:22.448 7-Nov-16 -0800 | (lient.channel.ChannelSubsystem)
handleData(ChannelSubsystem[id=0,
recipient=0]-ClientSessionImpl[USER@/X.X.X.X:22][sftp]) SSH_MSG_CHANNEL_DATA
len=19
10:29:22.450 7-Nov-16 -0800 | (che.sshd.common.channel.Window)
waitForSpace(ChannelSubsystem[id=0,
recipient=0]-ClientSessionImpl[USER@/X.X.X.X:22][sftp]: client remote window)
available: 1073741779
10:29:22.450 7-Nov-16 -0800 | (che.sshd.common.channel.Window)
waitAndConsume(ChannelSubsystem[id=0,
recipient=0]-ClientSessionImpl[USER@/X.X.X.X:22][sftp]: client remote window) -
requested=32768, available=1073741779
10:29:22.463 7-Nov-16 -0800 | (shd.common.io.nio2.Nio2Session) Writing 32820
bytes
10:29:22.464 7-Nov-16 -0800 | (che.sshd.common.channel.Window)
waitForSpace(ChannelSubsystem[id=0,
recipient=0]-ClientSessionImpl[USER@/X.X.X.X:22][sftp]: client remote window)
available: 1073709011
10:29:22.464 7-Nov-16 -0800 | (che.sshd.common.channel.Window)
waitAndConsume(ChannelSubsystem[id=0,
recipient=0]-ClientSessionImpl[USER@/X.X.X.X:22][sftp]: client remote window) -
requested=31, available=1073709011
10:29:22.464 7-Nov-16 -0800 | (shd.common.io.nio2.Nio2Session) Writing 84 bytes
10:29:22.534 7-Nov-16 -0800 | (shd.common.io.nio2.Nio2Session) Finished writing
10:29:22.534 7-Nov-16 -0800 | (shd.common.io.nio2.Nio2Session) Finished writing
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)