1.5.3


Old Stuff

 www.your-freedom.net
 www.secure-tunnel.com

Ticket #83 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

default timeout is 0 and as a result 'expect' spins the CPU after starting a profile

Reported by: dre@mac.com Assigned to: andrei
Priority: high Milestone: AlmostVPN 0.9.6
Component: PreferencePanel Version: 0.9
Severity: major Keywords: expect hi cpu
Cc:

Description

After starting a profile which contains any type of tunnel ('almost vpn', 'drives', or 'tunnels'), the tunnel is successfully created, but the 'expect' process running as root is sucking all the cpu.

I have tried using different combinations of tunnel types, and can reproduce this every time. I have tried accounts using both password authentication and ssh public key authentication. For tunnels, I have tried both local and remote. Everything works, it's just that expect is using all the CPU.

I'm looking at the AlmostVPN log and my console log, but it doens't indicate any problems.

Not sure if this will help, but here is a sample of the expect process when it's in this state

http://www.dreness.com/bits/tech/expect_sample.txt

I don't really know enough about expect to debug this... Do you have a debug version of AlmostVPN, or any way to enable verbose logging of the actions taken by expect? I have tried adding -c "strace 4" prior to the heredoc for doSSH in the utils.sh file:

expect -c "strace 4" <<EOF ...

... but this does not work (probably incorrect usage).

Change History

11/30/05 18:08:00 changed by dre@mac.com

  • component changed from FAQ to PreferencePanel.

11/30/05 18:26:37 changed by dre@mac.com

In case it matters, my machine is a dual 800 with 1 GB ram.

I have also tried expect -d -c "strace 4" <<EOF with the same results.

11/30/05 18:50:12 changed by andrei

  • status changed from new to assigned.
  • severity changed from normal to major.
  • priority changed from normal to high.
  • version set to 0.9.
  • milestone set to AlmostVPN 0.9.6.
  • keywords set to expect hi cpu.

Make expect "spin" and while it is doing so, look into /tmp. You should see one or more files with names like

almostvpn.ssh.x.log

Could you please e-mail these file(s) to support@leapingbytes.com

Also, could you please try to ssh to server you are trying to connect from command line and e-mail me all you can see (I am interested in message server sends back to client on login)

11/30/05 20:33:25 changed by andrei

Can you please check what is "timeout" value in Account/Options. Is it possible that it is 0?

11/30/05 20:43:17 changed by dre@mac.com

Indeed it was 0. Changing it to 10 fixes the problem. I believe 0 was the default value, as I don't recall changing it... I don't quite understand why having a different timeout would cause expect to behave differently for me, since in all cases, the session actually starts up pretty fast. Anyway, thanks :)

11/30/05 20:49:46 changed by andrei

One of things expect react on is timeout and if it is '0', then we have nice tight loop.

Sorry, it looks like 0.9.5 is not very polished release. I am ashamed of myself.

11/30/05 21:00:17 changed by dre@mac.com

It's okay, you're still below the 1.0 mark, after all :) Besides, you've done a great job with this website. Makes it much easier for us to troubleshoot this stuff. Being this receptive to feedback / bug reports is also a plus.

Overall, I'm pretty impressed with your application. This is the most fully-featured solution of its kind that I have seen. Keep up the good work!

11/30/05 21:23:05 changed by andrei

  • summary changed from 'expect' spins the CPU after starting a profile to default timeout is 0 and as a result 'expect' spins the CPU after starting a profile.

12/01/05 01:47:38 changed by dre@mac.com

  • status changed from assigned to closed.
  • resolution set to fixed.

Solved in the updated 0.9.5+

Default timeout is now 10.