[Wayland1.5]CPU occupancy rate of Weston is 99%

박성진 sj76.park at samsung.com
Thu Oct 1 03:49:56 PDT 2015


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-bounces at lists.freedesktop.org] On
Behalf Of Pekka Paalanen
Sent: Thursday, October 01, 2015 7:31 PM
To: Yang Andy
Cc: wayland-devel at 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 <williamyang13 at 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



More information about the wayland-devel mailing list