public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Runaway cron task on 2.5.63/4 bk?
@ 2003-03-09  7:30 Kevin Brosius
  2003-03-09  8:08 ` Andrew Morton
  0 siblings, 1 reply; 12+ messages in thread
From: Kevin Brosius @ 2003-03-09  7:30 UTC (permalink / raw)
  To: kernel

Second attempt to send this after not seeing it post after about a day. 
Anyone else have kernel posting problems?

I started seeing the cron task runaway, using 100% CPU continuously on a
single CPU with
2.5.63+bk and now with 2.5.64 (about two weeks now.)  No other
apps/tasks seem to be affected, that I've noticed.  It seems to take
upwards of 8 hours running the kernel for this to occur.

top shows:

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
  594 root      25   0  1428  620  1364 R    49.9  0.1 195:23 cron

(This is a dual processor Athlon, so CPU0 is at 100% at the moment.) 
This is repeatable.  Leaving the box running overnight, or all day, and
the cron process is running 100% again after several hours.  This does
not occur in prior 2.5 kernels, or in 2.4.19.

Any idea what's causing this?  What additional info on the process would
be helpful?  kernel .config file at
http://kevb.net/files/linux2564_config

-- 
Kevin

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Runaway cron task on 2.5.63/4 bk?
@ 2003-03-10 23:33 Linus Torvalds
  2003-03-12  3:45 ` [PATCH] " george anzinger
  0 siblings, 1 reply; 12+ messages in thread
From: Linus Torvalds @ 2003-03-10 23:33 UTC (permalink / raw)
  To: Felipe Alfaro Solana; +Cc: akpm, george, cobra, linux-kernel


On Tue, 11 Mar 2003, Felipe Alfaro Solana wrote:
>  
> why not sleep(0)? 

I think a much more likely (and correct) usage for big sleep values is 
more something like this:

	do_with_timeout(xxx, int timeout)
	{
		struct timespec ts;

		... set up some async event ..
		ts.tv_nsec = 0;
		ts.tv_sec = timeout;
		while (nanosleep(&ts, &ts)) {
			if (async event happened)
				return happy;
		}
		.. tear down the async event if it didn't happen ..
	}

and here the natural thing to do in user space is to just make the "no 
timeout" case be a huge value.

At which point it is a _bug_ in the kernel if we return early with some 
random error code.

		Linus


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-03-12  9:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-09  7:30 Runaway cron task on 2.5.63/4 bk? Kevin Brosius
2003-03-09  8:08 ` Andrew Morton
2003-03-09  8:17   ` Andrew Morton
2003-03-09 16:28     ` [PATCH] " Todd Mokros
2003-03-10 19:42     ` george anzinger
2003-03-10 19:49       ` Linus Torvalds
2003-03-10 22:21         ` george anzinger
2003-03-10 22:29           ` Andrew Morton
2003-03-10 22:46             ` george anzinger
  -- strict thread matches above, loose matches on Subject: below --
2003-03-10 23:33 Linus Torvalds
2003-03-12  3:45 ` [PATCH] " george anzinger
2003-03-12  4:57   ` Andrew Morton
2003-03-12 10:09     ` george anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox