public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <andrewm@uow.edu.au>
To: Jeff Lessem <Jeff.Lessem@Colorado.EDU>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Too much memory causes crash when reading/writing to disk
Date: Tue, 17 Jul 2001 11:07:32 +1000	[thread overview]
Message-ID: <3B538FD4.9D4A0705@uow.edu.au> (raw)
In-Reply-To: <200107161539.JAA183448@ibg.colorado.edu>

Jeff Lessem wrote:
> 
> I have done a bit more work on the problem I reported in my message
> "Crashes reading and writing to disk".  To recap, on a machine with
> 8GB of RAM, either
> 
> dd if=/dev/zero bs=1G count=10 | split -b 1073741824
> 
> or
> 
> find /bigfulldisk -type f -exec cat {} \; > /dev/null
> 
> can reliably cause a crash.

It seems that one of your CPUs is stuck in an interrupt
routine.  Could you please try running with the below
patch?  Feed the output through ksymoops.

Also (but separately) try enabling the NMI watchdog with
the `nmi_watchdog=1' kernel boot parameter.

This one will be hard to hunt down.


--- linux-2.4.7-pre6/arch/i386/kernel/irq.c	Wed Jul  4 18:21:24 2001
+++ lk-ext3/arch/i386/kernel/irq.c	Tue Jul 17 11:03:54 2001
@@ -280,7 +280,7 @@ static inline void wait_on_irq(int cpu)
 
 		for (;;) {
 			if (!--count) {
-				show("wait_on_irq");
+				show_trace_smp();
 				count = ~0;
 			}
 			__sti();
--- linux-2.4.7-pre6/arch/i386/kernel/traps.c	Wed Jul  4 18:21:24 2001
+++ lk-ext3/arch/i386/kernel/traps.c	Tue Jul 17 11:04:58 2001
@@ -101,7 +101,7 @@ void show_trace(unsigned long * stack)
 	if (!stack)
 		stack = (unsigned long*)&stack;
 
-	printk("Call Trace: ");
+	printk(KERN_DEBUG "Call Trace: ");
 	i = 1;
 	module_start = VMALLOC_START;
 	module_end = VMALLOC_END;
@@ -119,8 +119,10 @@ void show_trace(unsigned long * stack)
 		if (((addr >= (unsigned long) &_stext) &&
 		     (addr <= (unsigned long) &_etext)) ||
 		    ((addr >= module_start) && (addr <= module_end))) {
-			if (i && ((i % 8) == 0))
-				printk("\n       ");
+			if (i && ((i % 8) == 0)) {
+				printk("\n");
+				printk(KERN_DEBUG "       ");
+			}
 			printk("[<%08lx>] ", addr);
 			i++;
 		}
@@ -153,13 +155,50 @@ void show_stack(unsigned long * esp)
 	for(i=0; i < kstack_depth_to_print; i++) {
 		if (((long) stack & (THREAD_SIZE-1)) == 0)
 			break;
-		if (i && ((i % 8) == 0))
-			printk("\n       ");
+		if (i && ((i % 8) == 0)) {
+			printk("\n");
+			printk(KERN_DEBUG "       ");
+		}
 		printk("%08lx ", *stack++);
 	}
 	printk("\n");
 	show_trace(esp);
 }
+
+static void show_trace_local(void)
+{
+	printk(KERN_DEBUG "CPU %d:\n", smp_processor_id());
+	show_trace(0);
+}
+
+#ifdef CONFIG_SMP
+static atomic_t trace_cpu;
+
+static void show_trace_one(void *dummy)
+{
+	while (atomic_read(&trace_cpu) != smp_processor_id())
+		;
+	show_trace_local();
+	atomic_inc(&trace_cpu);
+	while (atomic_read(&trace_cpu) != smp_num_cpus)
+		;
+}
+
+void show_trace_smp(void)
+{
+	atomic_set(&trace_cpu, 0);
+	smp_call_function(show_trace_one, 0, 1, 0);
+	show_trace_one(0);
+}
+
+#else
+
+void show_trace_smp(void)
+{
+	show_trace_local();
+}
+
+#endif
 
 static void show_registers(struct pt_regs *regs)
 {

  reply	other threads:[~2001-07-17  1:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-16 15:39 Too much memory causes crash when reading/writing to disk Jeff Lessem
2001-07-17  1:07 ` Andrew Morton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-17 13:22 Jeff Lessem
2001-07-17 14:00 ` Andrew Morton
2001-07-17 16:15   ` Jeff Lessem
2001-07-18  0:31     ` Andrew Morton
2001-07-18 16:17 Jeff Lessem
2001-07-19  6:33 ` Andrew Morton
2001-07-19 12:36 Jeff Lessem
2001-07-20 16:17 Matt_Domsch

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=3B538FD4.9D4A0705@uow.edu.au \
    --to=andrewm@uow.edu.au \
    --cc=Jeff.Lessem@Colorado.EDU \
    --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