Created attachment 130765 [details]
A backtrace from upowerd started from systemd and running into a busy loop (gdb)
There are a few downstream bugs on upower , showing that upower fails on kernels which do not have /proc/timer_stats present. This file was always optional (config flag CONFIG_TIMER_STATS) and recently has been removed from the kernel  at version 4.10, and some distros seem to have the change backported to 4.9 kernels.
Steps to reproduce:
1. open gnome-power-manager or start any other application that triggers calling the up_wakeups_poll_userspace_cb function.
The warning from  will be printed all the time.
What should happen:
Please do not use this function any more.
When reproducing this bug, I often get a busy loop in upowerd, after I start gnome-power-manager for the second time. See the backtrace attached.
I should add that the busy loop in upowerd happens also after gnome-power-statistics is closed, so upowerd is looping itself, and gnome-power-statistics is not to blame. A result of this loop is a massive memory leak.
Author: Richard Hughes <firstname.lastname@example.org>
Date: Sun Apr 23 20:22:02 2017 +0100
Do not spin in a loop when /proc/timer_stats cannot be written
Only set up the polling once the write has succeeded.