GNOME Bugzilla – Bug 708975
kerberos code still doing 100% cpu problem
Last modified: 2013-09-30 09:26:20 UTC
We're, apparently, still getting 100% cpu busy loop problems in the kerberos code. See the downstream report here: https://bugzilla.redhat.com/show_bug.cgi?id=1005619 I found one of the people who was reliably reproducing the bug in meat-space, at a Starbucks and we figured out what was going on. I'll attach a couple of patches that should address the problem.
Created attachment 255963 [details] [review] goaidentity: print warning if timerfd I/O fails Reading from a timerfd shouldn't fail, but if it does we should print what's going on.
Created attachment 255964 [details] [review] identity: check proper cancellable from timer source ready callback on_timer_source_ready is called in two cases: 1) When the timer fires 2) When the input stream cancellable is cancelled We attempt to check for this latter case up front at the start of the function and react appropriately. We do this by checking if self->priv->cancellable is cancelled. Unforunately, checking self->priv->cancellable isn't always right, because self->priv->cancellable isn't always the cancellable associated with the input stream. They can get out of sync, when for instance, the alarm expiration time is changed. In this case the old input stream cancellable will get cancelled, and self->priv->cancellable will get set to the new cancellable. This commit makes sure the on_timer_source_ready callback always checks the cancellable associated with the input stream. It accomplishes this by allocating a GTask and using that as the callback data instead of the alarm object directly.
We're getting some positive feedback from the patch in Fedora: https://admin.fedoraproject.org/updates/FEDORA-2013-17920/gnome-online-accounts-3.8.3-3.fc19 Debarshi, do you mind given this a quick once over to make sure there's no glaring problems with it? Assuming it checks out basic review, I think we're good to go.
Comment on attachment 255963 [details] [review] goaidentity: print warning if timerfd I/O fails Looks good to me.
Comment on attachment 255964 [details] [review] identity: check proper cancellable from timer source ready callback Looks good to me.
Committed and push to master, gnome-3-10 and gnome-3-8.