This bug was fixed in the package cpustat - 0.01.25-1ubuntu0

cpustat (0.01.25-1ubuntu0) xenial; urgency=medium

  * Only add pid info to hash table if it is new (LP: #1631050)
    - fixes double free error on exit

 -- Colin King <>  Thu, 6 Oct 2016 17:17:18

** Changed in: cpustat (Ubuntu Xenial)
       Status: Fix Committed => Fix Released

You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs

  cache'd pid recycling adds cached info to hash again causing double
  free on exit cleanup

Status in cpustat package in Ubuntu:
  Fix Released
Status in cpustat source package in Xenial:
  Fix Released

Bug description:

  Cached pid info is added to the hash table even when it's a re-used pid info 
causing a double free on exit cleanup.  Only add pid info to hash table if it 
is newly allocated.

  [Test Case]
  Run cpustat for a long duration as follows:

  cpustat 1 -T -g

  ..and work through a lot of processes IDs until we re-use a PID, e.g.:

  stress-ng --fork 0 &

  and stop cpustat with SIGINT, one hits a double free as it exits

  [Regression Potential]

  Minimal, the fix stops an item being added to a cache'd hash list more
  than once, and that is a minimal impact on the main cpustat

  Upstream commit

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to