From: Joshua Lock <joshua.g.lock@linux.intel.com>
To: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: [yocto-autobuilder][PATCH] cleanup and restart crashed vnc server
Date: Wed, 31 Aug 2016 21:26:19 +0100 [thread overview]
Message-ID: <1472675179.2904.21.camel@linux.intel.com> (raw)
In-Reply-To: <1471450360.19448.6.camel@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 3028 bytes --]
On Wed, 2016-08-17 at 17:12 +0100, Joshua G Lock wrote:
> On Wed, 2016-08-17 at 16:09 +0000, Randle, William C wrote:
> > On Wed, 2016-08-17 at 16:59 +0100, Joshua G Lock wrote:
> >
> > > On Tue, 2016-08-16 at 17:09 -0700, Bill Randle wrote:
> > > > > > > > Use a common script to check for a running vnc server, and if
not
> > > > running
> > > > cleanup dangling lock files and restart the server.
> > > >
> > > > [YOCTO #8210]
> > > >
> > > > > > > > Signed-off-by: Bill Randle <william.c.randle@intel.com>
> > > > ---
> > > > > > > > bin/checkvnc
| 10
> > > > ++++++++++
> > > > > > > > .../site-packages/autobuilder/buildsteps/RunESDKSanityTests.py
| 3
> > > > +--
> > > > > > > > .../site-
packages/autobuilder/buildsteps/RunOeSelftest.py | 3
> > > > +--
> > > > > > > > .../site-
packages/autobuilder/buildsteps/RunSDKSanityTests.py | 3
> > > > +--
> > > > > > > > .../site-
packages/autobuilder/buildsteps/RunSanityTests.py | 3
> > > > +--
> > > > 5 files changed, 14 insertions(+), 8 deletions(-)
> > > > create mode 100755 bin/checkvnc
> > > >
> > > > diff --git a/bin/checkvnc b/bin/checkvnc
> > > > new file mode 100755
> > > > index 0000000..574ba48
> > > > --- /dev/null
> > > > +++ b/bin/checkvnc
> > > > @@ -0,0 +1,10 @@
> > > > +#!/bin/sh
> > > > +#
> > > > > > > > +# check if vnc server is running, and if not, cleanup and
restart
> > > > +#
> > > > +pid=$(pidof Xvnc)
> > > > +if [[ $? != 0 ]]; then
> > > > + echo "Xvnc not running, attempting restart"
> > > > + vncserver -kill :1
> > > > + vncserver
> > >
> > > > > > The vncserver is currently started with `vncserver :1`, whereas
this
> > > script just calls `vncserver` — is that intentional/desirable?
> > >
> > > > > > Would it be a little cleaner/more robust if we didn't assume only
one
> > > > > > Xvnc instance was running and instead write the pid of the
process we
> > > start to a file and use that file to check the status?
> > >
> > > Regards,
> > >
> > > Joshua
> > >
> > >
> >
> >
> >
> >
> > > > The vncserver program is a shell script and uses :1 as the default
display.
> >
> >
> >
> >
> >
> > > > > > > > The pid of Xvnc is written to a file already. The problem is, if
Xvmc crashes, the pid file (and lock file) are left around, so just
looking at the pid file existance, you can't tell if it's actually
running or not.
> >
>
>
> > > > Can we read the pid from the pidfile and do the tidy up if the
process isn't running? My main concern here is that we assume only a
single instance of Xvnc is running, I'm not sure if that is a safe
assumption to make?
It turns out we implicitly assume only one vncserver is running (on
display 1) in several places throughout the AB codebase. Therefore I've
pushed this change to master.
Thanks,
Joshua
[-- Attachment #2: Type: text/html, Size: 3320 bytes --]
prev parent reply other threads:[~2016-08-31 20:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 0:09 [yocto-autobuilder][PATCH] cleanup and restart crashed vnc server Bill Randle
2016-08-17 15:59 ` Joshua G Lock
2016-08-17 16:09 ` Randle, William C
2016-08-17 16:12 ` Joshua G Lock
2016-08-18 1:41 ` Randle, William C
2016-08-31 20:26 ` Joshua Lock [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472675179.2904.21.camel@linux.intel.com \
--to=joshua.g.lock@linux.intel.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.