yash069 / puttycyg

Automatically exported from code.google.com/p/puttycyg
0 stars 0 forks source link

cthelper.exe process creates 3.5 KB/sec of 'other' io even when the window is idle #42

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Please read the FAQ and check existing issues before creating a new issue.

What steps will reproduce the problem?
1.  Open up puttycyg
2.  use task manager or process explorer to view i/o usage of cthelper.exe
3.

What is the expected result?  What happens instead?

I have a pretty slow hard drive on my laptop and sometimes my computer freezes 
and upon further investigation I found that the disk queue length (windows 
control panel -> administrative services -> performance) was > 10,000...  I 
began closing all my programs one by one to try to identify the culprit and to 
my amazement, it was cthelper.exe.  Once I closed that process the disk queue 
dropped and my laptop's responsiveness returned to normal.  I wasn't even 
tailing a file in my puttycyg window, it was idle.  Very odd.  What does that 
process do?  Is there anyway to tone down its IO chattiness?

PutTTYcyg version: 20091228
Cygwin version: 1.7.3
Windows version: XP SP2

If you are experiencing performance issues, do you have a multi-core system
or multiple CPUs?

intel dual core p8600 @ 2.40GHz

Do you have any firewall software installed?

Please attach your PuTTY configuration.  Use this Windows command to create
putty.reg:
REG EXPORT HKEY_CURRENT_USER\Software\SimonTatham\PuTTY putty.reg

Please provide any additional information below.

Original issue reported on code.google.com by permina...@gmail.com on 10 Jun 2010 at 2:28

Attachments:

GoogleCodeExporter commented 8 years ago
Since I happened to be in the neighborhood (see also issue 39) I put a loop 
around the call to select() in cthelper.c, and added a timeout... A timeout of 
a second or more does nothing interesting, but I/O seems to increase in inverse 
proportion to timeouts under a second, e.g. a timeout of .5 seconds causes the 
I/O to double, even though .5 seconds is an eternity for a modern PC. :) I 
tried to do a minimally-complete test case outside of puttycyg but had a tough 
time... select() on e.g. stdin/stdout didn't seem to have a problem, but I 
couldn't easily replicate the pipe created by setup_child/pty_fork/etc. Wonder 
if that's relevant...

Original comment by shane.be...@gmail.com on 8 Jul 2010 at 12:14

GoogleCodeExporter commented 8 years ago
The I/O is all being done inside the call to select().  Looking at 
winsup/cygwin/select.cc, it seems likely that we are looping in 
select_stuff::wait() -- not sure why.  We should have a pipe, a tty (master) 
and a socket; maybe one of these is difficult to wait on, or maybe the  
combination is difficult to multiplex?

I'll try and build a debugging version of cygwin1 and see if I can pin it down. 
 No promise on a timeline. :)

Original comment by medgar123 on 29 Oct 2010 at 12:02