Public bug reported:

Lines 379 - 383 in sysinfo.c have the following code:

if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) {
        fputs("bad data in " LOADAVG_FILE "\n", stderr);
        free(savelocale);
        exit(1);
    }

At random, a program will exit when calling this function. If the
function succeeds the first time, it will succeed in all other attempts
to read /proc/loadavg. The file /proc/loadavg contains 5 numbers so
maybe only the first 3 should be read and the rest should just be
discarded.

** Affects: procps (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1618009

Title:
  using loadavg function in sysinfo.c errors out sometimes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/procps/+bug/1618009/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to