[OpenSIPS-Devel] [OpenSIPS/opensips] 96199d: load statistics: Fix an unsigned integer underflow...

Liviu Chircu noreply at github.com
Fri May 31 03:09:56 EDT 2019


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 96199dd55fd687eae33f2bb66b3249384b80aa94
      https://github.com/OpenSIPS/opensips/commit/96199dd55fd687eae33f2bb66b3249384b80aa94
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2019-05-31 (Fri, 31 May 2019)

  Changed paths:
    M pt_load.c

  Log Message:
  -----------
  load statistics: Fix an unsigned integer underflow bug

This integer subtraction bug was leading to occasional, seamlessly
random load1m and load10m statistic spikes, for example:

4 2 0
4 2 0
4 3 59
4 3 0
5 3 0

(cherry picked from commit 0e40f6d46a635eae7b9587d71c49041802d6cc4b)
(cherry picked from commit 9abf9fcf24fbb393a524f0288234c86fedb52a45)


  Commit: 60097425d0de465fbc3866b13146b851935e26e6
      https://github.com/OpenSIPS/opensips/commit/60097425d0de465fbc3866b13146b851935e26e6
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2019-05-31 (Fri, 31 May 2019)

  Changed paths:
    M pt_load.c

  Log Message:
  -----------
  load statistics: Fix a bunch of integer overflow bugs

Most of the summed up load statistics were skewed by a factor of 10, due
to a series of integer multiplications which was overflowing the 32-bit
result holder.

load, load1m, load10m before this patch (16 processes, 3 fully loaded):
12 99 9
12 99 9
12 101 10
13 103 10
13 104 10
12 106 10

... and after:

12 9 0
11 10 1
12 10 1
13 10 1

Fixes #1650

(cherry picked from commit 7f14b6a30a79e6156ae732d1cbb8f1e3f102e3d3)
(cherry picked from commit 319b1ba229dc25ec3ac903d3659a8e98dd85a0a2)


Compare: https://github.com/OpenSIPS/opensips/compare/1b970d85e4af...60097425d0de



More information about the Devel mailing list