OpenSSH
[Top] [All Lists]

Re: sshd gets stuck: select() in packet_read_seqnr waits indefinitely

To: Matt Day <opensshbugs@fjarlq.com>
Subject: Re: sshd gets stuck: select() in packet_read_seqnr waits indefinitely
From: Darren Tucker <dtucker@zip.com.au>
Date: Thu, 15 Mar 2007 14:22:13 +1100
Cc: openssh-unix-dev@mindrot.org
Delivered-to: sp-com-lists@consult.net
Delivered-to: openssh-unix-dev-list1@securepoint.com
Delivered-to: openssh-unix-dev-tmda@mindrot.org
Delivered-to: openssh-unix-dev@mindrot.org
In-reply-to: <20070315025904.GA50787@fjarlq.com>
List-archive: <http://lists.mindrot.org/pipermail/openssh-unix-dev>
List-help: <mailto:openssh-unix-dev-request@mindrot.org?subject=help>
List-id: Development of portable OpenSSH <openssh-unix-dev.mindrot.org>
List-post: <mailto:openssh-unix-dev@mindrot.org>
List-subscribe: <http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev>, <mailto:openssh-unix-dev-request@mindrot.org?subject=subscribe>
List-unsubscribe: <http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev>, <mailto:openssh-unix-dev-request@mindrot.org?subject=unsubscribe>
References: <20070314185309.GA40932@fjarlq.com> <20070315001416.GA28880@gate.dtucker.net> <20070315011208.GA48513@fjarlq.com> <20070315024347.GA10841@gate.dtucker.net> <20070315025904.GA50787@fjarlq.com>
Reply-to: dtucker@zip.com.au
Sender: openssh-unix-dev-bounces+openssh-unix-dev-list1=securepoint.com@mindrot.org
User-agent: Mutt/1.5.11
On Wed, Mar 14, 2007 at 08:59:04PM -0600, Matt Day wrote:
> What about the timeout handling in packet_write_wait? Do you really
> want to proceed with the write() and then possibly loop back around
> to the select() call?

Yeah, that's a problem.  On platforms that return EAGAIN rather than
EWOULDBLOCK it'll just spin through packet_write_poll() repeatedly.

Probably best to capture the return from select() explicitly test for
a timeout.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

<Prev in Thread] Current Thread [Next in Thread>