zhoujianhanyu / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

connectbot enters busyloop (100% CPU) when an ssh tunnel breaks #299

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.ssh to Server-A, with port-forwarding 1234:Server-B:22
2.ssh to localhost:1234 (ssh-over-ssh, connecting to Server-B through A)
3.Lose/change connectivity (move from 3G to WiFi)

What is the expected output? What do you see instead?
The phone becomes unusable and eats battery.  The connectbot service
process takes 100% CPU.  strace of this process shows no syscalls,
indicating a busyloop with no external calls.  Upon killing connectbot the
phone resumes working normally.

What version of the product are you using (you can see this by using Menu
-> About in the Host List)?
1.6.2 (r480), but the bug existed in previous versions as well.

What type of system are you trying to connect to?
OpenSSH on Linux (on both servers)

If you are able to connect, what is the output of "echo $TERM", "uname -a",
and any other relevant information on the host?
The host appears to be irrelevant.  The problem occurs locally on the phone
when the TCP connection times out.

Please provide any additional information below.

The problem doesn't occur when a normal connection times out.  Only when
tunneling ssh-over-ssh and the tunnel's TCP connection times out.

Original issue reported on code.google.com by weiss.y...@gmail.com on 21 Apr 2010 at 11:12

GoogleCodeExporter commented 9 years ago
This might be fixed in SVN already.

Original comment by kenny@the-b.org on 23 May 2010 at 5:02

GoogleCodeExporter commented 9 years ago
The connectbot service process takes 100% CPU after auth.
Even if I close the connection, it continue to take 100%.
I was not able to test with the SVN r505 version ( see issue 315 )

Original comment by alexandr...@gmail.com on 24 Jun 2010 at 12:00

GoogleCodeExporter commented 9 years ago
Issue 315 is not blocking anymore.

Original comment by kenny@the-b.org on 4 Aug 2010 at 5:13

GoogleCodeExporter commented 9 years ago
Device: HTC Hero 2.1 ( official )
Version: ConnectBot-svn-r511-english.apk

ConnectBot is still using 100% cpu ( 70 to 90 using OSMonitor ) even after the 
connection was closed.

Its not only for ssh over ssh. To easily reproduce this bug, yo only have to 
connect to a ssh host with one dynamic port forward enabled.

Original comment by alexandr...@gmail.com on 4 Aug 2010 at 6:31

GoogleCodeExporter commented 9 years ago
On last svn version released today 
(ConnectBot-git-2010-09-02_00-47-27-english.apk) it doesn't have this problem 
but port mapping also doesn't work :(

Original comment by francisc...@gmail.com on 2 Sep 2010 at 8:28

GoogleCodeExporter commented 9 years ago
I get this same issue on the Samsung Epic 4G if i set up an ssh session with a 
single port forwarded to localhost and i turn off shell.

Original comment by jason.a....@gmail.com on 8 Sep 2010 at 3:31

GoogleCodeExporter commented 9 years ago
I get this with an htc legend running 2.1 update1.

Original comment by matthewv...@gmail.com on 13 Sep 2010 at 10:29

GoogleCodeExporter commented 9 years ago
Also can be reproduced on htc desire android 2.2 as follows:

create account on server with shell /sbin/nologin

connect to account with port forwarding enabled and the 
connectbot option "start shell session" disabled.

In this case cpu time immediately rises to 100%.

Original comment by deep...@gmail.com on 3 Oct 2010 at 10:42

GoogleCodeExporter commented 9 years ago
I'm not able to use port forwarding any more :( CPU usage is ok, but when I try 
to use any port mapping, it says there was a problem with the communications 
and simply doesn't work :(

Connectbot keeps running ok. If I go to console it is still running with no 
problems. Only port forwarding isn't.

Original comment by francisc...@gmail.com on 6 Nov 2010 at 2:15

GoogleCodeExporter commented 9 years ago
Also confirmed using:
 -connectbot 1.7.1
 -Nexus One (Froyo)
 -connection to "shell-less" account
 -public-key authentication (DSA)
 -no compression
 -Start shell session unchecked
 -Stay connected checked

Original comment by wbed...@gmail.com on 29 Dec 2010 at 1:37

GoogleCodeExporter commented 9 years ago
I agree, this is happening to me on my Desire Z, again, when connecting to a 
shell-less account and forwarding ports in v1.7.1.2010.10.08.  Otherwise, seems 
like a nice app!

Original comment by dfluf...@gmail.com on 3 Mar 2011 at 5:35

GoogleCodeExporter commented 9 years ago
This causes a major problem for me.  The CPU usage continues after the 
connection is closed.  The only way to get it to stop is to force close 
Connectbot

Original comment by krkee...@gmail.com on 18 Apr 2011 at 9:06

GoogleCodeExporter commented 9 years ago
Upon closer inspection this seems to only happen when I create a tunnel WITHOUT 
shell access.  

So my solution has been to enable rbash access for the tunnel user.  So far 
this fixes it.

Original comment by krkee...@gmail.com on 21 Apr 2011 at 1:31

GoogleCodeExporter commented 9 years ago
I encounter the same problem.

I am using the port forwarding feature, no shell and compression.

Would love to see these fixed! I am getting tired of connecting locally to kill 
the process.

Original comment by ryannath...@hotmail.com on 25 May 2011 at 6:23

GoogleCodeExporter commented 9 years ago
Same here with ConnectBot 1.7.1 & Android 2.3.3 on a HTC Sensation. Stopping 
the process via the builtin "Task Manager" did not help, org.connectbot process 
is still spinning.

Original comment by ckujau on 24 Jun 2011 at 10:45

GoogleCodeExporter commented 9 years ago
I have this problem too, connectbot 1.7.1(v1.7.1 2010.10.08)
my phone is motorola defy, android 2.2.2.
single localhost port forward without shell.
please help, and thank you

Original comment by johnw.m...@gmail.com on 7 Jul 2011 at 12:03

GoogleCodeExporter commented 9 years ago
I find the workaround.
when i check the shell sessions, the problem is gone.

but actually connectbot will not start the shell, even checked the shell 
sessions.

because i set the shell to "/bin/noshell", and just create the empty file,
touch /bin/noshell, and then connectbot still work with port forward.

hope this workaround work for you too.

Original comment by johnw.m...@gmail.com on 7 Jul 2011 at 1:51

GoogleCodeExporter commented 9 years ago
I'm still having this issue, even with no shell turned on. I have one dynamic 
tunnel set, and I've only noticed it stealing a heavy dose of CPU when it's 
lost a connection. Force Closing the program, then reopening and starting the 
tunnel seems to restore it to a reasonable amount of use.

Original comment by AlexSha...@gmail.com on 9 Feb 2012 at 8:23

GoogleCodeExporter commented 9 years ago
This problem is still happening to me - newly installed connectbot from Play 
Store (on 27/04/2012) using single port forward with no shell on an up-to-date 
Samsung SHG-T989 on T-mobile (US).  Connected with wifi.

Original comment by paulkgri...@gmail.com on 27 Apr 2012 at 6:49

GoogleCodeExporter commented 9 years ago
I can confirm the worked as reported by johnw.  Turning on shell sessions for 
the connection prevents 100% cpu busy, turning it off results in 100%.  Android 
2.3.3 on an Optimus One, connection via wifi, using multiple port forwards.

Original comment by troglite...@gmail.com on 6 Jun 2012 at 4:17

GoogleCodeExporter commented 9 years ago
Same issue. Galaxy Note. 100% cpu usage if shell is disabled in the options for 
the connection. Using port forwards.

Original comment by norb...@gmail.com on 13 Jun 2012 at 10:28

GoogleCodeExporter commented 9 years ago
Same problem on 2.3.6 droid 4... phone gets hot won't take a charge. Killing 
connectbot allows phone to charge... happens via comment #21 above.

I even got a dual usb for 1000mW charging cable!

Original comment by jeremy.f...@footclan.org on 25 Jul 2012 at 10:25

GoogleCodeExporter commented 9 years ago
Not ticking the "disable shell" option fixed it for me.

When I turned on disable shell and connected somewhere and then disconnected, 
the CPU usage for connectbot would stay at 100% even after disconnecting.

Original comment by nik...@gmail.com on 28 Jul 2012 at 10:55

GoogleCodeExporter commented 9 years ago
Can this issue happen on Android 4.0 or greater version? Or maybe the OS cause 
this issue?

Original comment by sxz1...@gmail.com on 17 Dec 2012 at 12:26

GoogleCodeExporter commented 9 years ago
This issue still occurs for me on Galaxy S3 Android 4.4.2. It doesn't hit 100%, 
but ConnectBot keeps running chewing CPU after I close the app, and each time I 
connect with the profile that is using the Disable Shell option, it piles on 
more CPU usage.

Original comment by cli...@gmail.com on 25 Sep 2014 at 11:32