code review 5970056: go.crypto/ssh: fix locking and corruption issues with s... (issue 5970056)

29 views
Skip to first unread message

kard...@gmail.com

unread,
Mar 31, 2012, 5:52:13 PM3/31/12
to golan...@googlegroups.com, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golan...@googlegroups.com (cc: a...@golang.org,
golan...@googlegroups.com),

I'd like you to review this change to
http://code.google.com/p/go.crypto


Description:
go.crypto/ssh: fix locking and corruption issues with server.
Fixes issue 3204.

Please review this at http://codereview.appspot.com/5970056/

Affected files:
M ssh/channel.go
M ssh/server.go
M ssh/session_test.go


kard...@gmail.com

unread,
Mar 31, 2012, 6:10:01 PM3/31/12
to golan...@googlegroups.com, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

kard...@gmail.com

unread,
Mar 31, 2012, 6:10:17 PM3/31/12
to golan...@googlegroups.com, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

da...@cheney.net

unread,
Apr 1, 2012, 3:34:10 AM4/1/12
to kard...@gmail.com, golan...@googlegroups.com, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Hello,

Thank you for tackling this. The CL you have submitted is very large and
it looks like it combines some source cleanups with some additions which
is hard for me to follow. Could I encourage you to submit a cleanup CL
first (reordering functions, theirId -> remoteId), which will make this
more complicated change easier to grok.

Cheers

Dave

http://codereview.appspot.com/5970056/

kard...@gmail.com

unread,
Apr 1, 2012, 11:30:08 AM4/1/12
to golan...@googlegroups.com, da...@cheney.net, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

kard...@gmail.com

unread,
Apr 1, 2012, 11:39:51 AM4/1/12
to golan...@googlegroups.com, da...@cheney.net, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
I would normally be ready to back you on this. However, in this case I
wasn't adjusting the existing code; I rewrote the interface function by
function, on occasion taking snippets from the existing code. I
couldn't get the existing code to fully work by just changing it. So
please ignore the delta and treat this as new code (which it is).

A few known issues here:
* We are adjusting the window every time we read. For large batch
sessions, this could ok be but not optimal. For terminal sessions this
is less ideal. Attempts to fix this have not been met with success so
far. This should be addressed in a followup CL.

* The defaultWindowSize const can be adjusted up to ~200000, but values
greater then that causes it to stop functioning correctly. This is less
of a critical issue, but I think it should still be addressed. This
leads me to believe something is still not quite right.

kard...@gmail.com

unread,
Apr 1, 2012, 3:32:32 PM4/1/12
to golan...@googlegroups.com, da...@cheney.net, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

kard...@gmail.com

unread,
Apr 1, 2012, 3:32:53 PM4/1/12
to golan...@googlegroups.com, da...@cheney.net, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

kard...@gmail.com

unread,
Apr 1, 2012, 3:40:39 PM4/1/12
to golan...@googlegroups.com, da...@cheney.net, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
I should talk to more people before mailing out a change set. After
writing out what didn't work, I realized what I could do to make it
behave correctly.

As far as I know, this should take care of all of the known issues, as
well as the two I listed below. Sorry for all the noise in the
meantime.

Regarding the defaultWindowSize: currently set at 32768 byte, I noticed
the openssh client has their's at ~2M byte. Later maybe want a server
option to set the window size?

Reply all
Reply to author
Forward
0 new messages