linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Ed Tomlinson <tomlins@cam.org>
Cc: linux-mm@kvack.org
Subject: Re: 35-mm1 triggers watchdog
Date: Tue, 17 Sep 2002 13:12:22 -0700	[thread overview]
Message-ID: <3D878CA6.DE7BADDD@digeo.com> (raw)
In-Reply-To: <200209170738.48565.tomlins@cam.org>

Ed Tomlinson wrote:
> 
> Hi Andrew,
> 
> I have had 35-mm1 reboot twice via the software watchdog.  What is the best
> way to debug this.  I do have a serial term and can rebuild patched with the
> kernel debugger, just need some instructions on how to catch the stall and
> what info to gather.  Is there a good FAQ on kernel debugger?

Normally ksymoops will tell you where it was locked when
the NMI watchdog hit.  Aren't you getting a stack trace?

Kernel debugger?  kgdb.sourceforge.net, with patches from
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.35/2.5.35-mm1/experimental/

You're best off cross-compiling so the source, vmlinux, etc are on the
workstation and you copy kernels to the test box.

umm,

- patch the kernel
- enable kgdb in config
- build it, lilo it, add:

	gdb gdbbaud=115200 gdbttyS=ttyS1

  to the kernel boot line.

- Put my .gdbinit in $HOME.

- reboot test box

- gdb vmlinux
  rmt
  (gdb) c

- Run test, wait for NMI watchdog.

Sometimes it's a bit hard to work out _why_ the target trapped into
the debugger, so I changed kgdb to deliver a SIGEMT in response to
NMI rather than SIGBUS/SIGSEGV.






set editing on
set radix 0x0a

define rmt
set remotebaud 115200
target remote /dev/ttyS0
end

define comm25
p ((struct thread_info *)((int)$esp & ~0x1fff))->task->comm
end

define task25
p ((struct thread_info *)((int)$esp & ~0x1fff))->task
end

define thread25
p ((struct thread_info *)((int)$esp & ~0x1fff))
end

define reboot
	maintenance packet r
end

#process information macros
define psname
	if $arg0 == 0 
		set $athread =  init_tasks[0]
	else 
		set $athread = pidhash[(($arg0 >> 8) ^ $arg0) & 1023]
	end
	if $athread != 0 
		while $athread->pid != $arg0 && $athread != 0
			set $athread = $athread->hash_next
		end
		if $athread != 0 
			printf "%d %s\n", $arg0, (char*)$athread->comm
		end
	end
end
define ps
	set $initthread = init_tasks[0]
	set $athread = init_tasks[0]
	printf "%d %s\n", $athread->pid, (char*)($athread->comm)
	set $athread = $athread->next_task
	while $athread != ($initthread)
		if ($athread->pid) != (0)
			printf "%d %s\n", $athread->pid, (char*)$athread->comm
		end
		set $athread = $athread->next_task
	end
end


define page_states
printf "Dirty: %dK\n", (page_states[0].nr_dirty + page_states[1].nr_dirty + page_states[2].nr_dirty + page_states[3].nr_dirty) * 4
printf "Writeback: %dK\n", (page_states[0].nr_writeback + page_states[1].nr_writeback + page_states[2].nr_writeback + page_states[3].nr_writeback) * 4
printf "Pagecache: %dK\n", (page_states[0].nr_pagecache + page_states[1].nr_pagecache + page_states[2].nr_pagecache + page_states[3].nr_pagecache) * 4
printf "Page Table Pages: %d\n", (page_states[0].nr_page_table_pages + page_states[1].nr_page_table_pages + page_states[2].nr_page_table_pages + page_states[3].nr_page_table_pages) * 4
printf "nr_reverse_maps: %d\n", page_states[0].nr_reverse_maps + page_states[1].nr_reverse_maps + page_states[2].nr_reverse_maps + page_states[3].nr_reverse_maps
end


define offsetof
	set $off = &(((struct $arg0 *)0)->$arg1)
	printf "%d 0x%x\n", $off, $off
end

# list_entry list type member
define list_entry
	set $off = (int)&(((struct $arg1 *)0)->$arg2)
	set $addr = (int)$arg0
	set $res = $addr - $off
	printf "0x%x\n", $res
end
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

  reply	other threads:[~2002-09-17 20:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-17  4:43 dbench on tmpfs OOM's William Lee Irwin III
2002-09-17  4:58 ` Andrew Morton
2002-09-17  5:01   ` Martin J. Bligh
2002-09-17  5:14     ` Andrew Morton
2002-09-17  5:18       ` Martin J. Bligh
2002-09-17  5:15   ` William Lee Irwin III
2002-09-17  5:31     ` Andrew Morton
2002-09-17  6:43       ` Christoph Rohland
2002-09-17  7:01       ` Hugh Dickins
2002-09-17  7:27         ` William Lee Irwin III
2002-09-17  8:02           ` Andrew Morton
2002-09-17 11:38             ` 35-mm1 triggers watchdog Ed Tomlinson
2002-09-17 20:12               ` Andrew Morton [this message]
2002-09-17  7:57         ` dbench on tmpfs OOM's Christoph Rohland
2002-12-10  5:28         ` William Lee Irwin III

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=3D878CA6.DE7BADDD@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-mm@kvack.org \
    --cc=tomlins@cam.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