Discussion:
[ABRT PATCH] abrt-dump-oops: emit a message if throttling for a significant period of time
Denys Vlasenko
2013-09-01 18:12:04 UTC
Permalink
Signed-off-by: Denys Vlasenko <dvlasenk-H+wXaHxf7aLQT0dZR+***@public.gmane.org>
---
src/plugins/abrt-dump-oops.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/plugins/abrt-dump-oops.c b/src/plugins/abrt-dump-oops.c
index 39208f8..4e56d97 100644
--- a/src/plugins/abrt-dump-oops.c
+++ b/src/plugins/abrt-dump-oops.c
@@ -390,7 +390,10 @@ int main(int argc, char **argv)
{
/* Quadratic throttle time growth, but careful to not overflow in "n*n" */
int n = unreported_cnt > 30 ? 30 : unreported_cnt;
- sleep(n * n); /* max 15 mins */
+ n = n * n;
+ if (n > 9)
+ log(_("Sleeping for %d seconds"), n);
+ sleep(n); /* max 15 mins */
}

return errors;
--
1.8.1.4
Richard Marko
2013-09-09 13:49:40 UTC
Permalink
Pushed, thanks!
Post by Denys Vlasenko
---
src/plugins/abrt-dump-oops.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/plugins/abrt-dump-oops.c b/src/plugins/abrt-dump-oops.c
index 39208f8..4e56d97 100644
--- a/src/plugins/abrt-dump-oops.c
+++ b/src/plugins/abrt-dump-oops.c
@@ -390,7 +390,10 @@ int main(int argc, char **argv)
{
/* Quadratic throttle time growth, but careful to not overflow in "n*n" */
int n = unreported_cnt > 30 ? 30 : unreported_cnt;
- sleep(n * n); /* max 15 mins */
+ n = n * n;
+ if (n > 9)
+ log(_("Sleeping for %d seconds"), n);
+ sleep(n); /* max 15 mins */
}
return errors;
--
Richard Marko
Loading...