When ^T'ing (ttyinfo) a zombie, calcru() is called and logs a 'negative time' message. To achieve this, only zombies must be in the foreground process group of the terminal. Fix: A patch (against 4-STABLE) is attached which prevents calcru() from being called on zombies from ttyinfo(). I don't know in what process states calcru() may be called exactly, but for the rest of /sys/kern it's only used for accounting, exiting and getrusage() and therefore cannot be called on zombies. (Perhaps this is or should be documented somewhere.) How-To-Repeat: Compile and run the negtime program. Pressing ^T after it has printed the message 'done' causes a log message 'calcru: negative time...'. (It may be necessary to do stty status ^t beforehand.)
State Changed From-To: open->closed Fixed in a different way in rev.1.237 of kern_exit.c in -current. ^T on zombies now gives correct results in -current. Worked around in a different way in 1.55.2.7 of kern_resource.c in RELENG_4. ^T on zombies now gives slightly out of date results in RELENG_4. The test program in the PR was very useful for investigating the bug. ps and friends aren't affected by the main bug, but they display completely wrong times for zombies (always 0). Resource usage is the main thing that is not discarded when a process exits, so it should be visible for zombies too.