mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nikita V. Youshchenko" <yoush@cs.msu.su>
To: debian-kernel@lists.debian.org, linux-kernel@vger.kernel.org
Subject: Status field in ps output for threaded programs in 2.6 kernel
Date: Wed, 12 May 2004 14:07:22 +0400	[thread overview]
Message-ID: <200405121407.22551@zigzag.lvk.cs.msu.su> (raw)

Hello.

Today I faced a situation that confused me.

One moment I found that on our server there is almost 100% CPU load in 
system state. However, ps and top and other tools could not locate any 
process eating CPU.

The situation was permanent - several minutes passed, still almost 100% CPU 
in system state, still no visible running processes.

I executed chkrootkit and it found lots of "hidden processes" - ones for 
which /proc/N/ exists (i.e. it is possible to cd there), but N is not in 
ps output (and even not in ls /proc output).

I checked /proc/N/cmdline for some of such "hidden" pids; it looks like 
they represent threads. 
Well, maybe it is how NPTL threads work: for each thread a hidden /proc 
entry exists.
And it is chkrootkit's problem that is reports this (normal) case as 
possible LKM installed.

However, in my case, CPU-eating entities were found among thise hidden 
pids! They belonged to the same process (locally developed app, probably 
hanged), and this process was listed in ps output with status "S". After 
process was killed, CPU load went to 0%.

Looks like kernel bug: displayed status of threaded process should not be 
"S" if some threads are active. And CPU usage statistics should correspond 
to all threads.

This happened on a Debian testing/unstable system, running kernel package 
kernel-image-2.6.5-1-k7-smp 2.6.5-4.

             reply	other threads:[~2004-05-12 10:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-12 10:07 Nikita V. Youshchenko [this message]
2004-05-12 10:19 ` Mihai Rusu
2004-05-12 21:52 Albert Cahalan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200405121407.22551@zigzag.lvk.cs.msu.su \
    --to=yoush@cs.msu.su \
    --cc=debian-kernel@lists.debian.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®