Discussion:
[Wayland1.5]CPU occupancy rate of Weston is 99%
(too old to reply)
Yang Andy
2015-10-01 08:54:47 UTC
Permalink
Hi everyone
When i run QT-Application on wayland/weston,sometimes there is NG issue that CPU occupancy rate of Weston is 99%.
The probability of this NG issue is very low,but if the NG issue occur,CPU occupancy rate of Weston retains 99%.
Could anyone give me some advice on how to track the NG issue of weston?
And what factors could cause this issue?
Best regards.
Andy
Pekka Paalanen
2015-10-01 10:31:09 UTC
Permalink
On Thu, 1 Oct 2015 08:54:47 +0000
Yang Andy <***@hotmail.com> wrote:

> Hi everyone
> When i run QT-Application on wayland/weston,sometimes there is NG
> issue that CPU occupancy rate of Weston is 99%. The probability of
> this NG issue is very low,but if the NG issue occur,CPU occupancy
> rate of Weston retains 99%. Could anyone give me some advice on how
> to track the NG issue of weston? And what factors could cause this
> issue? Best regards. Andy

Hi,

you need to find out where Weston is spinning when it happens. Use gdb
to interrupt Weston several times and note the stack trace, or use a
profiling tool with stack traces.

List corruption often results in an endless loop in wl_list_for_each
etc.


Thanks,
pq
박성진
2015-10-01 10:49:56 UTC
Permalink
Dear Yang Andy,
You can trace the status of Weston with the following ways:

- Trace with WAYLAND_DEBUG environment variable
export WAYLAND_DEBUG=1
Run Weston
Watch what's going on...

- Trace with wchan : you can see which system call is called by a process
ps -aux | grep weston
cat /proc/{pid of Weston}/wchan (with root privilege)
The above command will display the system call called by Weston now.

- Trace with strace : you can see which system call is called by a process
continuously
e.g. strace -p {pid of Weston} -f
This will print a lot of system calls if it's not stuck in a specific
system call.
If Weston is doing somethings in a loop, system calls for those things
will be displayed.

- Trace with ltrace : you can see which library call is called by a process
continuously

- Trace with gdb

I hope this will helpful to you.
Thank and regards,
Sung-Jin Park


-----Original Message-----
From: wayland-devel [mailto:wayland-devel-***@lists.freedesktop.org] On
Behalf Of Pekka Paalanen
Sent: Thursday, October 01, 2015 7:31 PM
To: Yang Andy
Cc: wayland-***@lists.freedesktop.org
Subject: Re: [Wayland1.5]CPU occupancy rate of Weston is 99%

On Thu, 1 Oct 2015 08:54:47 +0000
Yang Andy <***@hotmail.com> wrote:

> Hi everyone
> When i run QT-Application on wayland/weston,sometimes there is NG
> issue that CPU occupancy rate of Weston is 99%. The probability of
> this NG issue is very low,but if the NG issue occur,CPU occupancy rate
> of Weston retains 99%. Could anyone give me some advice on how to
> track the NG issue of weston? And what factors could cause this issue?
> Best regards. Andy

Hi,

you need to find out where Weston is spinning when it happens. Use gdb to
interrupt Weston several times and note the stack trace, or use a profiling
tool with stack traces.

List corruption often results in an endless loop in wl_list_for_each etc.


Thanks,
pq
Yang Andy
2015-12-17 03:07:06 UTC
Permalink
Hi Everyone

I develop IVI software based on wayland/weston v1.5.

There is possibility that IVI system can not display screen at start up.

I analyze the log of this issue,and find the log information of weston dump and display 'wayland-0' is gone.

But weston-launch is running.

[error log]
jour.log(5550): Nov 27 14:36:25 localhost murphyd[235]: display 'wayland-0' is gone
jour.log(5576): Nov 27 14:36:26 localhost systemd[474]: weston.service: main process exited, code=exited, status=15/n/a

Could anyone give me some advice of this issue?

Thank you.

Andy
Bryce Harrington
2015-12-17 03:52:37 UTC
Permalink
On Thu, Dec 17, 2015 at 03:07:06AM +0000, Yang Andy wrote:
> Hi Everyone
>
> I develop IVI software based on wayland/weston v1.5.
>
> There is possibility that IVI system can not display screen at start up.
>
> I analyze the log of this issue,and find the log information of weston dump and display 'wayland-0' is gone.
>
> But weston-launch is running.
>
> [error log]
> jour.log(5550): Nov 27 14:36:25 localhost murphyd[235]: display 'wayland-0' is gone
> jour.log(5576): Nov 27 14:36:26 localhost systemd[474]: weston.service: main process exited, code=exited, status=15/n/a
>

Have you tried invoking weston directly, without use of weston-launch?

> Could anyone give me some advice of this issue?

Did it use to work? What's changed?

> Thank you.
>
> Andy
>

> _______________________________________________
> wayland-devel mailing list
> wayland-***@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Yang Andy
2015-12-17 08:01:20 UTC
Permalink
Hi Bryce

Thank you for your reply.

> Have you tried invoking weston directly, without use of weston-launch?

I did not change the relationship between weston-launch and weston.

In our system,there is necessary to run weston-launch and weston.


Andy
> Date: Wed, 16 Dec 2015 19:52:37 -0800
> From: ***@osg.samsung.com
> To: ***@hotmail.com
> CC: wayland-***@lists.freedesktop.org
> Subject: Re: [Wayland1.5]Issue of weston dump,display 'wayland-0' is gone
>
> On Thu, Dec 17, 2015 at 03:07:06AM +0000, Yang Andy wrote:
> > Hi Everyone
> >
> > I develop IVI software based on wayland/weston v1.5.
> >
> > There is possibility that IVI system can not display screen at start up.
> >
> > I analyze the log of this issue,and find the log information of weston dump and display 'wayland-0' is gone.
> >
> > But weston-launch is running.
> >
> > [error log]
> > jour.log(5550): Nov 27 14:36:25 localhost murphyd[235]: display 'wayland-0' is gone
> > jour.log(5576): Nov 27 14:36:26 localhost systemd[474]: weston.service: main process exited, code=exited, status=15/n/a
> >
>
> Have you tried invoking weston directly, without use of weston-launch?
>
> > Could anyone give me some advice of this issue?
>
> Did it use to work? What's changed?
>
> > Thank you.
> >
> > Andy
> >
>
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-***@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
Bryce Harrington
2015-12-17 08:09:40 UTC
Permalink
On Thu, Dec 17, 2015 at 08:01:20AM +0000, Yang Andy wrote:
> Hi Bryce
>
> Thank you for your reply.
>
> > Have you tried invoking weston directly, without use of weston-launch?
>
> I did not change the relationship between weston-launch and weston.
>
> In our system,there is necessary to run weston-launch and weston.

Well your log just says that weston didn't start up; but it doesn't
indicate why it didn't start up. So running weston directly, without
going through weston-launch, might give some further clues.

> Andy
> > Date: Wed, 16 Dec 2015 19:52:37 -0800
> > From: ***@osg.samsung.com
> > To: ***@hotmail.com
> > CC: wayland-***@lists.freedesktop.org
> > Subject: Re: [Wayland1.5]Issue of weston dump,display 'wayland-0' is gone
> >
> > On Thu, Dec 17, 2015 at 03:07:06AM +0000, Yang Andy wrote:
> > > Hi Everyone
> > >
> > > I develop IVI software based on wayland/weston v1.5.
> > >
> > > There is possibility that IVI system can not display screen at start up.
> > >
> > > I analyze the log of this issue,and find the log information of weston dump and display 'wayland-0' is gone.
> > >
> > > But weston-launch is running.
> > >
> > > [error log]
> > > jour.log(5550): Nov 27 14:36:25 localhost murphyd[235]: display 'wayland-0' is gone
> > > jour.log(5576): Nov 27 14:36:26 localhost systemd[474]: weston.service: main process exited, code=exited, status=15/n/a
> > >
> >
> > Have you tried invoking weston directly, without use of weston-launch?
> >
> > > Could anyone give me some advice of this issue?
> >
> > Did it use to work? What's changed?
> >
> > > Thank you.
> > >
> > > Andy
> > >
> >
> > > _______________________________________________
> > > wayland-devel mailing list
> > > wayland-***@lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> >
>
Yang Andy
2015-12-17 08:42:37 UTC
Permalink
Hi Bryce

In normal case,weston-launch and weston can run correctly.

In very minority case$B!$(Bthis issue occurs in the system startup phase.

So,i want to catch some information about weston coredump in which weston/weston-launch is launched by systmed.


Andy
> Date: Wed, 16 Dec 2015 19:52:37 -0800
> From: ***@osg.samsung.com
> To: ***@hotmail.com
> CC: wayland-***@lists.freedesktop.org
> Subject: Re: [Wayland1.5]Issue of weston dump,display 'wayland-0' is gone
>
> On Thu, Dec 17, 2015 at 03:07:06AM +0000, Yang Andy wrote:
> > Hi Everyone
> >
> > I develop IVI software based on wayland/weston v1.5.
> >
> > There is possibility that IVI system can not display screen at start up.
> >
> > I analyze the log of this issue,and find the log information of weston dump and display 'wayland-0' is gone.
> >
> > But weston-launch is running.
> >
> > [error log]
> > jour.log(5550): Nov 27 14:36:25 localhost murphyd[235]: display 'wayland-0' is gone
> > jour.log(5576): Nov 27 14:36:26 localhost systemd[474]: weston.service: main process exited, code=exited, status=15/n/a
> >
>
> Have you tried invoking weston directly, without use of weston-launch?
>
> > Could anyone give me some advice of this issue?
>
> Did it use to work? What's changed?
>
> > Thank you.
> >
> > Andy
> >
>
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-***@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
Pekka Paalanen
2015-12-17 10:20:55 UTC
Permalink
On Thu, 17 Dec 2015 08:42:37 +0000
Yang Andy <***@hotmail.com> wrote:

> Hi Bryce
>
> In normal case,weston-launch and weston can run correctly.
>
> In very minority casethis issue occurs in the system startup phase.

Hi,

sounds like you have a race in your systemd configuration. It could be
pretty much anything, we can't guess what sort of setup you have.

> So,i want to catch some information about weston coredump in which weston/weston-launch is launched by systmed.

Just getting the stdout and stderr outputs of Weston would be a start.

Launching weston using systemd is a fairly rare use case. You may want
to read through everything in
https://phabricator.freedesktop.org/T63
and especially check that
https://phabricator.freedesktop.org/T63#884
is not your issue.

Nothing you have said would refer to a Weston issue. Everything you
have said points to interaction or setup issues with systemd. In your
setup, you would have systemd capture Weston's stdout and stderr and
even the coredump.

By the way, systemd generally does not know when Weston's startup has
finished, so services depending on Weston may fail randomly. You might
be able to fix that by using Weston's systemd-notify plugin which is
new in an unreleased version of Weston. It will be part of 1.10 release.


Thanks,
pq
Loading...