After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 708975 - kerberos code still doing 100% cpu problem
kerberos code still doing 100% cpu problem
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: Kerberos
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-09-28 01:16 UTC by Ray Strode [halfline]
Modified: 2013-09-30 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
goaidentity: print warning if timerfd I/O fails (2.38 KB, patch)
2013-09-28 01:16 UTC, Ray Strode [halfline]
committed Details | Review
identity: check proper cancellable from timer source ready callback (5.73 KB, patch)
2013-09-28 01:16 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2013-09-28 01:16:46 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.
Comment 1 Ray Strode [halfline] 2013-09-28 01:16:50 UTC
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.
Comment 2 Ray Strode [halfline] 2013-09-28 01:16:54 UTC
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.
Comment 3 Ray Strode [halfline] 2013-09-29 17:03:15 UTC
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 4 Debarshi Ray 2013-09-30 09:17:01 UTC
Comment on attachment 255963 [details] [review]
goaidentity: print warning if timerfd I/O fails

Looks good to me.
Comment 5 Debarshi Ray 2013-09-30 09:17:20 UTC
Comment on attachment 255964 [details] [review]
identity: check proper cancellable from timer source ready callback

Looks good to me.
Comment 6 Debarshi Ray 2013-09-30 09:25:43 UTC
Committed and push to master, gnome-3-10 and gnome-3-8.