Re: suspected memory leak in sock slab / test7-pre4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

> in __write_lock_failed; there, EDI is c02d1f4c, which lies in irq_stat.

EAX is more useful, it points to lock.

This problem look different of described earlier. Now it is plain
deadlock, which is very easy to find.


> Hope this helps nailing it. I'll boot and go home now. Can try things
> tomorrow.

What a pity, since tomorrow I will be absent for week or so.

Try to apply the patch appended. It is BH watchdog, it does the
same thing as nmi watchdog, but catches softirq deadlocks.
I have no idea why standard kernel does not have this.
It will oops stuck cpu after 2 minutes.

Alexey



diff -ur ../vger3-000826/linux/kernel/timer.c linux/kernel/timer.c
--- ../vger3-000826/linux/kernel/timer.c	Wed Aug 23 23:04:40 2000
+++ linux/kernel/timer.c	Mon Aug 28 23:08:45 2000
@@ -670,8 +679,44 @@
 	calc_load(ticks);
 }
 
+#ifndef NO_ANK_FIX
+
+static struct {
+	unsigned long jiffies;
+} bh_watchdog[NR_CPUS];
+
+static inline void do_bh_watchdog(struct pt_regs *regs)
+{
+	/* This assumes x86 timer behaviour. */
+	if ((long)(jiffies - bh_watchdog[smp_processor_id()].jiffies) <= 60*HZ)
+		return;
+
+	bh_watchdog[smp_processor_id()].jiffies = jiffies;
+
+	printk("BH watchdog on CPU%d\n", smp_processor_id());
+		
+#ifndef __sparc__
+	if (1) {
+#ifdef __alpha__
+		extern void die_if_kernel(const char * str, struct pt_regs * regs, long err, unsigned long);
+		die_if_kernel("BH Watch Dog", regs, 0, 0);
+#else
+		extern void die(const char * str, struct pt_regs * regs, long err);
+		die("BH Watch Dog", regs, 0);
+#endif
+		printk("Killing %s, it does not help of course.\n", current->comm);
+		send_sig(SIGKILL, current, 1);
+	}
+#endif
+}
+#endif
+
+
 void timer_bh(void)
 {
+#ifndef NO_ANK_FIX
+	bh_watchdog[smp_processor_id()].jiffies = jiffies;
+#endif
 	update_times();
 	run_timer_list();
 }
@@ -687,6 +732,9 @@
 	mark_bh(TIMER_BH);
 	if (tq_timer)
 		mark_bh(TQUEUE_BH);
+#ifndef NO_ANK_FIX
+	do_bh_watchdog(regs);
+#endif
 }
 
 #if !defined(__alpha__) && !defined(__ia64__)
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux