[Bug 1254] Race condition in ssh-agent AUTH_CONNECTION
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Wed Oct 25 06:23:00 EST 2006
http://bugzilla.mindrot.org/show_bug.cgi?id=1254
Summary: Race condition in ssh-agent AUTH_CONNECTION
Product: Portable OpenSSH
Version: 4.4p1
Platform: ix86
OS/Version: FreeBSD
Status: NEW
Keywords: patch
Severity: normal
Priority: P2
Component: ssh-agent
AssignedTo: bitbucket at mindrot.org
ReportedBy: ohannet at allez-oop.net
In function after_select(), case AUTH_CONNECTION, the do-loop which
handles socket reads will peg my CPU at close to 100% when errno is
EAGAIN.
I'm running FreeBSD 6.2 pre-release, with OpenSSH built from the ports
collection (security/openssh-portable).
The problem only occurs for me while running an automation script that
sends commands through ssh to about a hundred servers at at time, and I
have not been successful in identifying which server causes the
problem. But the bottom line is that the read fails with errno EAGAIN,
and continues to fail in a very tight loop until a timeout occurs at
some point.
My work-around was to introduce a tiny sleep before the continue
statement in that loop, which is apparently enough to allow some data
to become available for reading, and makes the problem go away.
I will attach my work-around as a patch, realizing that usleep() is
probably not available on all platforms.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-bugs
mailing list