projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
664d6e9
)
processes: Fix 'delay_rate' race condition
author
Pavel Rochnyack
<pavel2000@ngs.ru>
Wed, 19 Dec 2018 12:57:04 +0000
(19:57 +0700)
committer
Pavel Rochnyack
<pavel2000@ngs.ru>
Wed, 19 Dec 2018 12:57:04 +0000
(19:57 +0700)
When ts_delay_by_tgid() failed (for example, when observable process
terminates), `ps->delay` fields are not updated and remain set to zero.
This interpreted as counter overflow and produces spike.
Issue: #3026
src/processes.c
patch
|
blob
|
history
diff --git
a/src/processes.c
b/src/processes.c
index
ce4cc65
..
171dde9
100644
(file)
--- a/
src/processes.c
+++ b/
src/processes.c
@@
-587,7
+587,8
@@
static void ps_list_add(const char *name, const char *cmdline,
entry->cpu_system_counter);
#if HAVE_LIBTASKSTATS
- ps_update_delay(ps, pse, entry);
+ if (entry->has_delay)
+ ps_update_delay(ps, pse, entry);
#endif
}
}