]> granicus.if.org Git - procps-ng/commit
top: forest view segmentation fault, the final solution
authorJim Warner <james.warner@comcast.net>
Tue, 6 Dec 2011 18:03:15 +0000 (12:03 -0600)
committerCraig Small <csmall@enc.com.au>
Sun, 11 Dec 2011 11:27:56 +0000 (22:27 +1100)
commitcd608f462e587ee648f4bd0b798e77a52dd66c13
tree7899f7848d67df7c856f9e43b86679e2a6b7000c
parent242be5194cb7bc30cc5922114e3570388f80a7ce
top: forest view segmentation fault, the final solution

With forest view mode under procps-ng-3.3.0, top would catch
a SEGV and exit.  The problem was thought to be related to
some linux version 3 anamoly.

In procps-ng-3.3.1, top was protected from abnormal exit and
would display the offending processes with the special orphan
notation '?', instead of the usual artwork.

As it turns out, the problem wasn't with linux and could
surface under a 2.6.xx kernel,  The cause was an occasional
abnormal ordering of tid/tgid/ppid which went unresolved
due to a progressive proc table scan in the recursive
function forest_add().

By default the proc table scan now restarts at the beginning.
However, a #define TREE_ONEPASS is provided should one wish
to restore the 3.3.1 behavior with its reduced overhead.
top.c
top.h