qmlscene is busy and there is heap growth when running idle apps

Bug #1210124 reported by Colin Ian King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtdeclarative-opensource-src (Ubuntu)
New
Undecided
Unassigned

Bug Description

I've been using health-check from my PPA (ppa:colin-king/white) to observe idle states of various phone apps and I'm seeing poll/epoll spinning at ~10 polls a second and some heap growth even when idle.

1. polling on idle consumes power, although small, it will accumulate when a user has multiple idle apps running
2. the heap growth is slow but will add up if an app is running for many hours.

 Attached is the system activity on two idle apps:

1. /usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene /usr/share/ubuntu-filemanager-app/ubuntu-filemanager-app

2. /usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene /usr/share/ubuntu-calculator-app/ubuntu-calculator-app

I'm observing:

Top polling system calls:
  PID Process Syscall Rate/Sec Infinite Zero Minimum Maximum Average
                                                           Timeouts Timeouts Timeout Timeout Timeout
  2666 qmlscene poll 5.6278 0 4 0.0 sec 3.0 sec 1.7 sec
  2674 qmlscene epoll_wait 4.9650 0 0 5.0 sec 5.0 sec 5.0 sec
  2686 qmlscene epoll_wait 0.2000 0 0 5.0 sec 5.0 sec 5.0 sec
 Total 10.7928 0 4

so ~10Hz of polling.

Also, heap growth:

Change in memory (K/second):
  PID Process Type Size RSS PSS
  2666 qmlscene Heap 0.00 0.39 0.39 (growing slowly)

Since the RSS + PSS are growing I guess this is an anonymous mem-mapped region that is slowly filling up and populating physical pages and at sometime we may run out and the underying user space memory allocator will map a larger region for more heap. But as it is, it seems that the physical pages are slowly getting used which generally points to a slow leak somewhere. I suggest running valgrind on qmlscene to see if it can spot any heap leakages.

Revision history for this message
Colin Ian King (colin-king) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :

Any update on this bug? It seems to be gettting no attention.

summary: - qmlscene is busy and their is heap growth when running idle apps
+ qmlscene is busy and there is heap growth when running idle apps
Revision history for this message
Colin Ian King (colin-king) wrote :

Recent updates see a lot of improvements, the epoll_wait()'s have now been fixed.

sudo health-check -p 5991
CPU usage:
  PID Process USR% SYS% TOTAL%
  5991 qmlscene 0.00 0.00 0.00 (idle)

Wakeups:
  PID Process Wake/Sec Kernel Functions
  5991 qmlscene 0.02 (hrtimer_start_range_ns, hrtimer_wakeup) (very low)

Context Switches:
  PID Process Voluntary Involuntary Total
                             Ctxt Sw/Sec Ctxt Sw/Sec Ctxt Sw/Sec
  5991 qmlscene 0.00 0.00 0.00 (idle)

File I/O operations:
 No file I/O operations detected.

System calls traced:
  PID Process Syscall Count Rate/Sec
  5991 qmlscene poll 1 0.0167

Top polling system calls:
  PID Process Syscall Rate/Sec Infinite Zero Minimum Maximum Average
                                                           Timeouts Timeouts Timeout Timeout Timeout
  5991 qmlscene poll 0.0167 0 0 263.4 sec 263.4 sec 263.4 sec

Distribution of poll timeout times:
                                                            10.0 100.0 1.0 10.0 100.0 1.0 10.0 100.0
                                                    up to to to to to to to to or more
                                              Zero 9.9 99.9 999.9 9.9 99.9 999.9 9.9 99.9 Infinite
  PID Process Syscall sec usec usec usec msec msec msec sec sec sec Wait
  5991 qmlscene poll 0 - - - - - - - - 1 0

Polling system call analysis:
 No bad polling discovered.

Per Process Memory (K):
  PID Process Type Size RSS PSS
  5991 qmlscene Stack 136 72 72
  5991 qmlscene Heap 116216 5640 5640
  5991 qmlscene Mapped 84288 41488 25211

Change in memory (K/second):
  PID Process Type Size RSS PSS
  5991 qmlscene Mapped 0.00 0.13 0.13 (growing slowly)

Open Network Connections:
 None.

no longer affects: touch-preview-images
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

This is not an bug in qtchooser.

affects: qtchooser (Ubuntu) → qtdeclarative-opensource-src (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.