Public bug reported:

I have automation suite, which uses ssh to connect to servers.

Under high speed conditions (I was never able to reproduce this
manually, but many times in the script), ssh can stuck in an endless
loop, causing 100% CPU usage.

strace on it looks like this:

ioctl(5, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon echo ...}) = 
? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGTTOU {si_signo=SIGTTOU, si_code=SI_KERNEL} ---
rt_sigreturn({mask=[]})                 = -1 EINTR (Interrupted system call)
ioctl(5, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon echo ...}) = 
? ERESTARTSYS (To be restarted if SA_RESTART is set)
(repeated endlessly)

Command line during call:

timeout 120 ssh -o StrictHostKeyChecking=no -o
UserKnownHostsFile=/dev/null -o UpdateHostKeys=no -i
/tmp/DIBCTL_ssh_keylN8SGlprivate cloud-user@188.42.217.229 uname -a

(IP address and a private key are changed on every run).

This ssh script is called from a shell script, which is in turn called
by python supbrocess.check_call() function, with no special settings for
stdout/stderr/stdin (all connected to console).

backtrace:

#0  0x00007fe7ad8f4ed8 in tcsetattr () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x000055cbfd2544d6 in ?? ()
#2  0x000055cbfd22cf57 in ?? ()
#3  0x000055cbfd2064b0 in ?? ()
#4  0x000055cbfd208bdd in ?? ()
#5  0x000055cbfd208d28 in ?? ()
#6  0x000055cbfd230c59 in ?? ()
#7  0x000055cbfd2088a4 in ?? ()
#8  0x000055cbfd204b44 in ?? ()
#9  0x000055cbfd1f3f26 in ?? ()
#10 0x00007fe7ad8183f1 in __libc_start_main () from 
/lib/x86_64-linux-gnu/libc.so.6
#11 0x000055cbfd1f5b0a in ?? ()

Package versions:
ii  libc6:amd64                           2.24-3ubuntu1                         
      amd64        GNU C Library: Shared libraries
ii  openssh-client                        1:7.3p1-3build1                       
      amd64        secure shell (SSH) client, for secure access to remote 
machines

uname:
Linux 4.8.0-26-generic #28-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 
x86_64 x86_64 GNU/Linux

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: ssh (not installed)
ProcVersionSignature: Ubuntu 4.8.0-26.28-generic 4.8.0
Uname: Linux 4.8.0-26-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: X-Cinnamon
Date: Fri Dec  2 13:29:50 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-07-19 (1231 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release i386 (20130423.1)
SourcePackage: openssh
UpgradeStatus: Upgraded to zesty on 2016-11-22 (9 days ago)

** Affects: openssh (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug zesty

** Description changed:

  I have automation suite, which uses ssh to connect to servers.
  
- Under high speed conditions (run from the script, never was able to
- reproduce manually), ssh can stuck in endless loop, causing 100% CPU
- usage.
+ Under high speed conditions (I was never able to reproduce this
+ manually, but many times in the script), ssh can stuck in an endless
+ loop, causing 100% CPU usage.
  
  strace on it looks like this:
  
  ioctl(5, TCGETS, {B38400 opost isig icanon echo ...}) = 0
  ioctl(5, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon echo ...}) 
= ? ERESTARTSYS (To be restarted if SA_RESTART is set)
  --- SIGTTOU {si_signo=SIGTTOU, si_code=SI_KERNEL} ---
  rt_sigreturn({mask=[]})                 = -1 EINTR (Interrupted system call)
  ioctl(5, TCGETS, {B38400 opost isig icanon echo ...}) = 0
  ioctl(5, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon echo ...}) 
= ? ERESTARTSYS (To be restarted if SA_RESTART is set)
  (repeated endlessly)
  
  Command line during call:
  
  timeout 120 ssh -o StrictHostKeyChecking=no -o
  UserKnownHostsFile=/dev/null -o UpdateHostKeys=no -i
  /tmp/DIBCTL_ssh_keylN8SGlprivate cloud-user@188.42.217.229 uname -a
  
  (IP address and a private key are changed on every run).
  
  This ssh script is called from a shell script, which is in turn called
  by python supbrocess.check_call() function, with no special settings for
  stdout/stderr/stdin (all connected to console).
  
  backtrace:
  
  #0  0x00007fe7ad8f4ed8 in tcsetattr () from /lib/x86_64-linux-gnu/libc.so.6
  #1  0x000055cbfd2544d6 in ?? ()
  #2  0x000055cbfd22cf57 in ?? ()
  #3  0x000055cbfd2064b0 in ?? ()
  #4  0x000055cbfd208bdd in ?? ()
  #5  0x000055cbfd208d28 in ?? ()
  #6  0x000055cbfd230c59 in ?? ()
  #7  0x000055cbfd2088a4 in ?? ()
  #8  0x000055cbfd204b44 in ?? ()
  #9  0x000055cbfd1f3f26 in ?? ()
  #10 0x00007fe7ad8183f1 in __libc_start_main () from 
/lib/x86_64-linux-gnu/libc.so.6
  #11 0x000055cbfd1f5b0a in ?? ()
  
  Package versions:
  ii  libc6:amd64                           2.24-3ubuntu1                       
        amd64        GNU C Library: Shared libraries
  ii  openssh-client                        1:7.3p1-3build1                     
        amd64        secure shell (SSH) client, for secure access to remote 
machines
  
  uname:
  Linux 4.8.0-26-generic #28-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 
x86_64 x86_64 GNU/Linux
  
  ProblemType: Bug
  DistroRelease: Ubuntu 17.04
  Package: ssh (not installed)
  ProcVersionSignature: Ubuntu 4.8.0-26.28-generic 4.8.0
  Uname: Linux 4.8.0-26-generic x86_64
  ApportVersion: 2.20.3-0ubuntu8
  Architecture: amd64
  CurrentDesktop: X-Cinnamon
  Date: Fri Dec  2 13:29:50 2016
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2013-07-19 (1231 days ago)
  InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release i386 (20130423.1)
  SourcePackage: openssh
  UpgradeStatus: Upgraded to zesty on 2016-11-22 (9 days ago)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1646813

Title:
  ssh (client) stucks in an endless loop with 100% CPU

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1646813/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to