Re: CPU at 100%, no refresh, known bug, but what to do?

Mike Miller <[email protected]> Thu, 4 Oct 2012 14:17:59 -0500 (CDT)
Newsgroups gmane.network.vnc.user,gmane.network.vnc.realvnc.general
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--1702920797-1889121680-1349377978=:31634
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; FORMAT=flowed
Content-Transfer-Encoding: 8BIT
Content-ID: <[email protected]>

On Thu, 4 Oct 2012, Patrick Steranka wrote:

> I would start by nicing the Xvnc it's only allowed to eat the CPU when 
> other things do not need to run. It's not a fix but it's a technique 
> I've used to help fix a box that has a run-away process.

That's a good idea when there is a single CPU and it's hard to run any 
commands because Xvnc is in the way.  In my case there are two quad-core 
chips so I have 8 CPUs and only one was at 100%, I believe.  Anyway, it 
was easy to ssh in and do things -- it wasn't slow.

In the end I decided to kill Xvnc, but before I did it I used reptyr to 
attach to running ssh jobs and bash shells and exit them properly, saving 
the bash command histories.  That was great -- I'd never heard of reptyr 
until a couple of days ago.

I used ssh to attach to the Ubuntu box with Xvnc running and I ran this 
command:

ps aux | grep ssh

That showed me these ssh processes and a few extraneous things:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
mbmiller  3520  0.0  0.0  46944  4668 pts/5    S+   Jul25   0:23 ssh -X Server
mbmiller  4602  0.0  0.0  47720  5544 pts/9    S+   Aug09   1:07 ssh -X Server
mbmiller 25614  0.0  0.0  45584  3344 pts/11   S+   Sep24   0:00 ssh -X Server

I launched an xterm from which I would try to recapture those ssh 
sessions.  I was missing the reptyr binary, so I installed it like so:

sudo apt-get install reptyr

The reptyr man page told me that I had to do this to allow reptyr to work 
(I could change the 0 back to 1 after finishing):

$ sudo su
root# echo 0 > /proc/sys/kernel/yama/ptrace_scope
root# exit

After that I just ran reptyr for each process, for example:

reptyr 3520

A few lines of text would appear (the last saying "Set the controlling 
tty"), I'd hit "enter" and it would give me my command prompt from my old 
shell.  I was then able to save command histories, etc.

Mike


> ________________________________
> From: Mike Miller <[email protected]>
> To: VNC List <[email protected]> 
> Sent: Tuesday, October 2, 2012 4:11 AM
> Subject: CPU at 100%, no refresh, known bug, but what to do?
> 
> Here's the bug...
>
> https://bugs.launchpad.net/ubuntu/+source/vnc4/+bug/819473
>
> ...and I assume that is what has happened to me.  I'm running Xvnc at 100% CPU and I can connect to it, but the screen won't refresh.  I have a lot of stuff running there and I don't want to kill all of it, so I'm hoping there's some trick to make it refresh again.
>
> Any ideas?
>
> Do I just have to give up and kill Xvnc?
>
> Thanks in advance.
>
> Mike
>
> --
> Michael B. Miller, Ph.D.
> Minnesota Center for Twin and Family Research
> Department of Psychology
> University of Minnesota
--1702920797-1889121680-1349377978=:31634
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
VNC-List mailing list
[email protected]
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

--1702920797-1889121680-1349377978=:31634--