[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#352830: Race condition



XXXX@YYYY:~$ for i in `seq 10`; do ssh -o ControlMaster=auto -o
ControlPath=~/.ssh/ssh_control_%h_%p_%r www.xxx.yyy.zzz date & done
[11] 7155
[12] 7156
[13] 7157
[14] 7158
[15] 7159
[16] 7160
[17] 7161
[18] 7162
[19] 7163
[20] 7165
XXXX@YYYY:~$ XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 
XXXX@www.xxx.yyy.zzz's password: 

On Sat, 2007-10-27 at 03:28 -0400, Chris AtLee wrote:
> I get this w/ openssh-client 1:4.6p1-5 from sid.  I have
> ControlMaster=auto and ControlPath set in my ~/.ssh/config file.  What
> happens when you run this:
> 
> for i in `seq 10`; do ssh -o ControlMaster=auto -o
> ControlPath=~/.ssh/ssh_control_%h_%p_%r xxx.yy.zzz date &; done
> 
> On 10/27/07, Nicolas Valcarcel <nvalcarcel@gmail.com> wrote:
> > On sid i have get different results:
> >
> > XXX@YYYY:~$ for i in `seq 10`; do ssh www.xxx.yyy.xxx date& done
> > [11] 6147
> > [12] 6148
> > [13] 6149
> > [14] 6150
> > ssh_exchange_identification: Connection closed by remote host
> > ssh_exchange_identification: Connection closed by remote host
> > ssh_exchange_identification: Connection closed by remote host
> > [15] 6151
> > [16] 6152
> > [17] 6153
> > [18] 6154
> > ssh_exchange_identification: Connection closed by remote host
> > ssh_exchange_identification: Connection closed by remote host
> > ssh_exchange_identification: Connection closed by remote host
> > [19] 6155
> > [20] 6156
> > [11]   Exit 255                ssh www.xxx.yyy.xxx date
> > [12]   Exit 255                ssh www.xxx.yyy.xxx date
> > [13]   Exit 255                ssh www.xxx.yyy.xxx date
> > [14]   Exit 255                ssh www.xxx.yyy.xxx date
> > [15]   Exit 255                ssh www.xxx.yyy.xxx date
> > [16]   Exit 255                ssh www.xxx.yyy.xxx date
> > nxvl@LePew:~$ ssh_exchange_identification: Connection closed by remote
> > host
> > ssh_exchange_identification: Connection closed by remote host
> > ssh_exchange_identification: Connection closed by remote host
> > ssh_exchange_identification: Connection closed by remote host
> >
> >
> > Which version of debian are you running?
> >
> > On Fri, 2007-10-26 at 09:27 -0400, Chris AtLee wrote:
> > > I'd like to note that this problem also manifests as a race condition.
> > >  I have some scripts that execute multiple 'scp' commands in parallel,
> > > and I quite often see some of them fail with "ControlSocket ...
> > > already exists"
> > >
> > > It seems like what happens is scp shuts down the connection before
> > > deleting the control socket file, thus preventing other scp commands
> > > from running.  Or maybe the socket file is created before the
> > > connection is active?
> > >
> > > I can reproduce pretty easily with this:
> > >
> > > #!/bin/bash
> > > for i in `seq 10`; do
> > >    ssh host date&
> > > done
> > >
> > >
> > >
> > >
> > --
> > aka nxvl
> > key fingerprint: E140 4CC7 5E3C B6B4 DCA7 F6FD D22E 2FB4 A9BA 6877
> > gpg --keyserver keyserver.ubuntu.com --recv-keys A9BA6877
> > Yo uso Software Libre y tu?
> >
> >
-- 
aka nxvl
key fingerprint: E140 4CC7 5E3C B6B4 DCA7 F6FD D22E 2FB4 A9BA 6877
gpg --keyserver keyserver.ubuntu.com --recv-keys A9BA6877
Yo uso Software Libre y tu?

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: