Subject: fixing kernel backtraces?
To: None <port-evbmips@netbsd.org>
From: David Young <dyoung@pobox.com>
List: port-evbmips
Date: 05/05/2007 16:16:14
NetBSD/evbmips backtraces appear to be truncated.  Any ideas what
breaks them?

  Starting utd6.
  got message of size 24 on Sat May  5 15:35:20 2007
  RTM_IFANNOUNCE: iface arrival/departure: len 24, if# 10, what: arrival
  Mutex error: lockdebug_barrier: spin lock held
  
  lock address : 0x00000000c012a600 type     :               spin
  shared holds :                  0 exclusive:                  1
  shares wanted:                  0 exclusive:                  0
  current cpu  :                  0 last held:                  0
  current lwp  : 0x00000000814cad40 last held: 0x00000000814cad40
  last locked  : 0x00000000801bed90 unlocked : 0x00000000801bef80
  owner field  : 000000000000000000 wait/spin:                0/1
  
  panic: LOCKDEBUG
  Stopped in pid 1503.1 (utd6) at netbsd:cpu_Debugger+0x4:        jr      ra
  		bdslot: nop
  db> bt 
  801cd9f8+88c (81ff0000,d,0,0) ra 8016f584 sz 0
  panic+184 (81ff0000,d,0,0) ra 80167c6c sz 48
  80167b88+e4 (81ff0000,d,0,0) ra 0 sz 0
  User-level: pid 1503.1
  db> 

Compare with the backtrace on i386 for the same trap:

  db> bt
  cpu_Debugger(0,c0100d80,8,c69187d8,7) at netbsd:cpu_Debugger+0x4
  panic(c033b453,c033a68f,c030f859,c033b480,c69527c0) at netbsd:panic+0x145
  lockdebug_abort1(c033b480,c0384100,297,c0230c89,c0384100) at netbsd:lockdebug_abort1+0x55
  lockdebug_barrier(0,1,0,0,1000073) at netbsd:lockdebug_barrier+0xb3
  mutex_vector_enter(c03813d0,0,0,0,7) at netbsd:mutex_vector_enter+0x1cd
  fork1(c03815a0,9e,14,0,0) at netbsd:fork1+0x1e
  kthread_create1(c0297460,c0721000,0,c0721014,c0721000) at netbsd:kthread_create1+0x2e
  gre_kick(c0385530,c6929da0,c691897c,c6929da0,c038d5c0) at netbsd:gre_kick+0x5b
  gre_ioctl(c0721000,8020696b,c6918b88,c6918b88,20) at netbsd:gre_ioctl+0xaef
  in_control(c05c6ca8,8020696b,c6918b88,c0721000,c6929da0) at netbsd:in_control+0x572 
  ifioctl(c05c6ca8,8020696b,c6918b88,c6929da0,0) at netbsd:ifioctl+0x42f
  sys_ioctl(c6929da0,c6918c48,c6918c68,bfbfeaa0,c02b5d33) at netbsd:sys_ioctl+0x1c9
  syscall_plain() at netbsd:syscall_plain+0xb4
  --- syscall (number 54) ---
  0xbbba2d87:
  db>

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933