Forums

CPU counter goes on increasing even processes have been killed

Hi Support, There is a problem with your CPU counter. Even when I have killed my processes, CPU counter goes on increasing. I closed the specific console where process was running but nothing seems to be happening and counter goes on increasing..

Hi there -- sorry to hear that. I've reset your allowance so that you're out of the tarpit.

How did you kill the processes? Closing the console can sometimes fail to kill them properly (that's a bug and we're trying to work out what's causing it), while hitting control-C in a console should guarantee that they're killed.

I see you have two consoles open right now, so I've not killed anything just in case the processes I can see under your name are doing something important. But if you'd like me to clear stuff down, just let me know.

Just so you know -- I can see eight copies of the same Python file executing, all of which are using up quite a lot of CPU.

Hi Giles, I got into this problem by closing the console directly. While implementing an algorithm, I missed some conditions and program went into infinite loop. Even control-C was not working as I was using print statement for debugging. Those 8 copies of Python file are the processes that were eating up the CPU. I may face this problem again, so I will be contacting you through the forums. Thanks for your help.

Understood. If you get the same problem again, it may be worth hitting Control-C and then refreshing the browser window.

The reason Control-C doesn't seem to work when something prints out a lot of stuff very quickly is that the browser's own buffers and the browser-server connection can get flooded. But the browser-server channel is still working fine. So if you hit Control-C, it should get there -- and then when you refresh the console, it will reload with just the last few hundred lines of output, so you'll skip all the intervening stuff and get the tail of the output up to the interrupt.

Of course, there could be other problems that would make that fail. But 99% of the time it should work.

Don't forget to stand on one leg and hold your breath while performing the above...j/k

Apparently waving a chicken around your head at midnight can help too ;-)

More seriously -- the failing Control-C thing is tough, but we're looking into ways we could solve it. Basically, certain kinds of busy processes sometimes ignore the kill signals we send their parents, which should cascade down to them (and under normal circumstances, do). But they're not unkillable -- a kill -9 from root can stop them -- so perhaps there's some way we can identify and terminate them.

Yeah, as long as they don't become orphans, one would think there is a solution...☺