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

Bug#352830: Race condition



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?
>
>




Reply to: