]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: still make progress when throttling the manager loop 1783/head
authorVito Caputo <vito.caputo@coreos.com>
Thu, 5 Nov 2015 01:32:16 +0000 (17:32 -0800)
committerVito Caputo <vito.caputo@coreos.com>
Thu, 5 Nov 2015 01:32:16 +0000 (17:32 -0800)
Don't simply continue after sleeping, it potentially puts us in a state
of spinning doing nothing slowly, if the ratelimit_test() keeps
detecting the need for limiting.

Observed in vms after the host had been suspended for a while, on resume
systemd entered a loop of making zero progress spamming the console
with:
[431942.850090] systemd[1]: Looping too fast. Throttling execution a
little.

I see no reason to have a continue here, the intention should be to
throttle execution, not circumvent it altogether.

src/core/manager.c

index b13663e702fb364877a3eb5be38aefa0d80dd2a0..7c3a020c4af14fa97bbf017ee7dc2b99feaeb5bc 100644 (file)
@@ -2024,7 +2024,6 @@ int manager_loop(Manager *m) {
                         /* Yay, something is going seriously wrong, pause a little */
                         log_warning("Looping too fast. Throttling execution a little.");
                         sleep(1);
-                        continue;
                 }
 
                 if (manager_dispatch_load_queue(m) > 0)