Jukka Salmi | 1 Feb 2008 02:00
Picon

Re: SATA controller recommendation for sparc64

Manuel Bouyer --> port-sparc64 (2007-11-10 16:14:32 +0100):
> Promise SATA adapters should work in a sparc64.

I'm just initialising a RAIDframe mirror on two SATA disks connected
to a Promise SATA300 TX4 controller in a Sun Blade 100, and there are
lots of lost interrupts...

Sun Blade 100 (UltraSPARC-IIe), No Keyboard
Copyright 1998-2002 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.5, 512 MB memory installed, Serial #50874347.
[...]
NetBSD 4.99.52 (INSTALL) #0: Thu Jan 31 20:59:09 CET 2008
[...]
ppb0 at pci0 dev 5 function 0: Digital Equipment DC21152 PCI-PCI Bridge (rev. 0x03)
pci1 at ppb0 bus 1
pdcsata0 at pci1 dev 0 function 0
pdcsata0: Promise PDC40718 SATA300 controller (rev. 0x02)
pdcsata0: interrupting at ivec 19                        
atabus2 at pdcsata0 channel 0    
atabus3 at pdcsata0 channel 1
atabus4 at pdcsata0 channel 2
atabus5 at pdcsata0 channel 3
[...]
pdcsata0 port 0: device present, speed: 3.0Gb/s                       
pdcsata0 port 1: device present, speed: 3.0Gb/s
[...]
wd1 at atabus2 drive 0pdcsata0:0:0: lost interrupt         
	type: ata tc_bcount: 512 tc_skip: 0       
: <SAMSUNG HD321KJ>                        
wd1: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors
(Continue reading)

Julian Coleman | 1 Feb 2008 09:30
Picon

NetBSD 4 crash in netbsd:ipsec_setspidx()

Hi,

Has anyone else seen this crash on NetBSD 4?

  kernel trap 34: mem address not aligned
  Stopped at      netbsd:ipsec_setspidx+0x20:     ld              [%g2 + 0x20], %g1

Backtrace is:

  db> bt
  ipsec_setspidx_mbuf(0, 18, 5aef210, 0, e00179d8, 1000000) at netbsd:ipsec_setspidx_mbuf+0x3c
  ipsec6_getpolicybyaddr(0, 1, 1, e0017bac, e0017ba8, 5) at netbsd:ipsec6_getpolicybyaddr+0x48
  ipsec6_in_reject_so(5aef210, 0, ffffffffffffffff, c000000, 28, 0) at
netbsd:ipsec6_in_reject_so+0x88 lo0, addresses 127.0.0.1/8 (loopback)
  ip6_input(5aef210, 5aef210, 0, 0, 1ff0020611c, 1) at netbsd:ip6_input+0x960
  ip6intr(5aef210, 10a00010, 1700, 1ff00200000, 1, 4000) at netbsd:ip6intr+0x28
  softnet(1, 0, e0017ed0, 0, 1403fa0, 13113c0) at netbsd:softnet+0x5c
  sparc_interrupt(0, 0, 14c0c98, 0, ffffffffffffffff, ffffffffffffc078) at netbsd:
  sparc_interrupt+0x1d4
  microtime(fb70120, 0, 160ecc0, 0, fda3570, 27) at netbsd:microtime+0x14
  mi_switch(fb70120, 0, 0, ef81f10, 2, 0) at netbsd:mi_switch+0x148

I'm not using IPSEC.  Kernel is 4.0_STABLE.

Thanks,

J

--

-- 
  My other computer also runs NetBSD    /        Sailing at Newbiggin
(Continue reading)

Matthias Scheler | 1 Feb 2008 14:23
Picon
Favicon

4.99.51 kernel crashes while detecting a PCI card


	Hello,

when I tried out a 4.99.51 kernel on my ULTRA60 to check whether
PR port-sparc64/3034 is fixed it paniced when it detected the PCI-X card:

bge0 at pci1 dev 1 function 0: Broadcom BCM5701 Gigabit Ethernet
cpu0: data fault: pc=12eac80 addr=0
kernel trap 30: data access exception
Stopped in pid 0.1 (system) at  netbsd:pci_conf_read:   ldx             [%o0 + %g0], %g1
db> bt
config_attach_loc(3aacd00, 1808be8, 1c053bc, 1c05358, 1, 12c6600) at netbsd:config_attach_loc+0x158
pci_probe_device(0, f0088f1400800800, 0, 0, 0, 0) at netbsd:pci_probe_device+0x254
sparc64_pci_enumerate_bus(3ab9000, 13a2ca8, 0, 42, 40, 181cc00) at netbsd:sparc64_pci_enumerate_bus+0x324
pcirescan(3ab9000, 1448278, 13a2ca8, 3ab9037, 0, 3ab9037) at netbsd:pcirescan+0x10
pciattach(0, 3ab9000, 1c057d8, 1810800, 1813000, 2) at netbsd:pciattach+0x14c
config_attach_loc(3ab9000, 1808ac8, 0, 1c057d8, 1, 12e90c0) at netbsd:config_attach_loc+0x158
psycho_attach(3aadf00, 3aaa200, 1c059f0, 1810800, 1813000, 2) at netbsd:psycho_attach+0x4f8
config_attach_loc(3aaa200, 1808a98, 0, 1c059f0, 1, 13142a0) at netbsd:config_attach_loc+0x158
mainbus_attach(0, 3aadf00, 0, 1810800, 1464800, 1314000) at netbsd:mainbus_attach+0x474
config_attach_loc(3aadf00, 1808858, 0, 0, 1, 7) at netbsd:config_attach_loc+0x158
cpu_configure(1469000, 1208ae0, 0, 1810800, 1814c00, 146a9d8) at netbsd:cpu_configure+0x1d0
configure(185f0b8, 2, 187c400, 12526c0, 1468ca0, 1884c00) at netbsd:configure+0x3c         
main(0, 11ebe40, ffffffffffffe000, 1fff, 1889800, 1c02000) at netbsd:main+0x1dc
cpu_initialize(f0067260, 0, 10fc00, fff83d00, 10ea78, fff83e00) at netbsd:cpu_initialize+0xf8

Any ideas? The machines boots fine with a very old 4.99.18 kernel.

	Kind regards

(Continue reading)

Martin Husemann | 1 Feb 2008 15:17
Picon

Re: 4.99.51 kernel crashes while detecting a PCI card

On Fri, Feb 01, 2008 at 01:23:51PM +0000, Matthias Scheler wrote:
> Any ideas? The machines boots fine with a very old 4.99.18 kernel.

This is probably an unaligned pci_conf_read() call - can you build a 
netbsd.gdb kernel and locate the caller of it?

Martin

matthew green | 1 Feb 2008 16:58
Picon
Favicon

re: 4.99.51 kernel crashes while detecting a PCI card


   when I tried out a 4.99.51 kernel on my ULTRA60 to check whether
   PR port-sparc64/3034 is fixed it paniced when it detected the PCI-X card:

   bge0 at pci1 dev 1 function 0: Broadcom BCM5701 Gigabit Ethernet
   cpu0: data fault: pc=12eac80 addr=0

null pointer access.

this seem very strange, and i do not think it has to do with
pci_conf_read().

   kernel trap 30: data access exception
   Stopped in pid 0.1 (system) at  netbsd:pci_conf_read:   ldx             [%o0 + %g0], %g1
   db> bt
   config_attach_loc(3aacd00, 1808be8, 1c053bc, 1c05358, 1, 12c6600) at netbsd:config_attach_loc+0x158
   pci_probe_device(0, f0088f1400800800, 0, 0, 0, 0) at netbsd:pci_probe_device+0x254
   sparc64_pci_enumerate_bus(3ab9000, 13a2ca8, 0, 42, 40, 181cc00) at netbsd:sparc64_pci_enumerate_bus+0x324

can you instrument this function to see where it dies?

thanks.

.mrg.

Julian Coleman | 1 Feb 2008 17:28
Picon

Re: NetBSD 4 crash in netbsd:ipsec_setspidx()

> I'm not using IPSEC.  Kernel is 4.0_STABLE.

Maybe the problem isn't with IPSEC at all.  I've just had another crash on
a kernel built without IPSEC:

  panic: lockmgr: no context

Backtrace is:

  lockmgr(1874e20, 1, 0, 57020312000, 1, 4000) at netbsd:lockmgr+0xa9c
  uvm_fault_internal(1874e18, 1874e18, 1, 0, 4, 4) at netbsd:uvm_fault_internal+0xd4
  data_access_fault(e0017700, 30, 12d55f4, 57020312000, 57020313160, 400) at netbsd:data_access_fault+0xd4
  ?(1899d68, 5aedb30, ffffffffffffffff, 20, 201, 5a77400) at 0x1008708
  m_freem(726f757020313130, 815c, 94, 5c, 35, 90) at netbsd:m_freem+0x4c
  tcp_input(5aedb30, 20, 4, 4, ed35838, 0) at netbsd:tcp_input+0x1b14
  tcp6_input(101, e0017c84, 6, c000000, 28, 0) at netbsd:tcp6_input+0x70
  ip6_input(5aedb30, 5aedb30, 0, 0, 1ff0020611c, 1) at netbsd:ip6_input+0x8d4
  ip6intr(5aedb30, 1080010, 1700, 1ff00200000, 1, 4000) at netbsd:ip6intr+0x28
  softnet(1, 0, e0017ed0, ffffffffffffc940, 13e6260, 0) at netbsd:softnet+0x5c
  sparc_interrupt(0, 0, 14a2f58, 0, ffffffffffffffff, 0) at netbsd:sparc_interrupt+0x1d4
  microtime(fb4b880, 0, 0, 0, 0, 0) at netbsd:microtime+0x14
  mi_switch(fb4b880, 0, 78, 0, 0, 1816420) at netbsd:mi_switch+0x148

This crash happened whilst I was playing with ipf (trying to get it not to
block IPv6 ICMP).  From the db> prompt, `show mbuf` gave:

  MBUF 0x13f1fa4
  trap type 0x34: cpu 0, pc=12d4060 npc=12bdf40 pstate=ffffffff991d0006<PRIV,IE>
  kernel trap 34: mem address not aligned

(Continue reading)

Matthias Scheler | 2 Feb 2008 01:18
Picon
Favicon

Re: 4.99.51 kernel crashes while detecting a PCI card

On Fri, Feb 01, 2008 at 03:17:02PM +0100, Martin Husemann wrote:
> On Fri, Feb 01, 2008 at 01:23:51PM +0000, Matthias Scheler wrote:
> > Any ideas? The machines boots fine with a very old 4.99.18 kernel.
> 
> This is probably an unaligned pci_conf_read() call - can you build a 
> netbsd.gdb kernel and locate the caller of it?

How what I do that?

In the past I've used a crash dump and "netbsd.gdb" to figure out such
things. But I cannot can a crash dump in this case because the machine
doesn't even finish auto configuration

	Kind regards

--

-- 
Matthias Scheler                                  http://zhadum.org.uk/

Martin Husemann | 2 Feb 2008 01:52
Picon

Re: 4.99.51 kernel crashes while detecting a PCI card

On Sat, Feb 02, 2008 at 12:18:27AM +0000, Matthias Scheler wrote:
> How what I do that?

Matt is right, this is not an unaligned access but a null pointer deref.
Just build the same kernel with makeoptions DEBUG=-g, then do

  gdb netbsd.gdb

and check the pc that the crash reported, like "list *(0xXXXXX)".

Martin

Matthias Scheler | 2 Feb 2008 11:55
Picon
Favicon

Re: 4.99.51 kernel crashes while detecting a PCI card

On Sat, Feb 02, 2008 at 01:52:25AM +0100, Martin Husemann wrote:
> On Sat, Feb 02, 2008 at 12:18:27AM +0000, Matthias Scheler wrote:
> > How what I do that?
> 
> Matt is right, this is not an unaligned access but a null pointer deref.
> Just build the same kernel with makeoptions DEBUG=-g, then do
> 
>   gdb netbsd.gdb
> 
> and check the pc that the crash reported, like "list *(0xXXXXX)".

I've built a new kernel with debugging symbols the stack trace looks
like this now:

config_attach_loc(3aacd00, 1808be8, 1c053bc, 1c05358, 1, 12c65c0) at netbsd:config_attach_loc+0x158
pci_probe_device(0, f0088f1400800800, 0, 0, 0, 0) at netbsd:pci_probe_device+0x254
sparc64_pci_enumerate_bus(3ab9000, 13a2ce8, 0, 42, 40, 181cc00) at netbsd:sparc64_pci_enumerate_bus+0x324
pcirescan(3ab9000, 14482c0, 13a2ce8, 3ab9037, 0, 3ab9037) at netbsd:pcirescan+0x10
pciattach(0, 3ab9000, 1c057d8, 1810800, 1813000, 2) at netbsd:pciattach+0x14c
config_attach_loc(3ab9000, 1808ac8, 0, 1c057d8, 1, 12e9080) at netbsd:config_attach_loc+0x158
psycho_attach(3aadf00, 3aaa200, 1c059f0, 1810800, 1813000, 2) at netbsd:psycho_attach+0x4f8
config_attach_loc(3aaa200, 1808a98, 0, 1c059f0, 1, 1314260) at netbsd:config_attach_loc+0x158
mainbus_attach(0, 3aadf00, 0, 1810800, 1464800, 1314000) at netbsd:mainbus_attach+0x474
config_attach_loc(3aadf00, 1808858, 0, 0, 1, 7) at netbsd:config_attach_loc+0x158
cpu_configure(1469000, 1208ac0, 0, 1810800, 1814c00, 146a9c8) at netbsd:cpu_configure+0x1d0
configure(185f0b8, 2, 187c400, 1252680, 1468c90, 1884c00) at netbsd:configure+0x3c         
main(0, 11ebe00, ffffffffffffe000, 1fff, 1889800, 1c02000) at netbsd:main+0x1dc
cpu_initialize(f0067260, 0, 10fc00, fff83d00, 10ea78, fff83e00) at netbsd:cpu_initialize+0xf8

And here is what "gdb" found:
(Continue reading)

Matthias Scheler | 2 Feb 2008 12:58
Picon
Favicon

Re: 4.99.51 kernel crashes while detecting a PCI card

On Sat, Feb 02, 2008 at 10:55:02AM +0000, Matthias Scheler wrote:
> And here is what "gdb" found:
> 
> (gdb) list *(config_attach_loc+0x158)
> 0x1221798 is in config_attach_loc (/src/NetBSD-current/src/sys/kern/subr_autoconf.c:1276).
> 1271
> 1272    #if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS)
> 1273            if (splash_progress_state)
> 1274                    splash_progress_update(splash_progress_state);
> 1275    #endif
> 1276            (*dev->dv_cfattach->ca_attach)(parent, dev, aux);
> 1277    #if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS)
> 1278            if (splash_progress_state)
> 1279                    splash_progress_update(splash_progress_state);
> 1280    #endif

I realized that the backtrace didn't give the right function. Here is
what disassembling at the report instruction pointer prints out:

0x12eac60 is in pci_conf_read (/src/NetBSD-current/src/sys/arch/sparc64/dev/pci_machdep.c:379).
374     /* assume we are mapped little-endian/side-effect */
375     pcireg_t
376     pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg)
377     {
378             struct psycho_pbm *pp = pc->cookie;
379             struct psycho_softc *sc = pp->pp_sc;
380             pcireg_t val = (pcireg_t)~0;
381     
382             DPRINTF(SPDB_CONF, ("pci_conf_read: tag %lx reg %x ", 
383                     (long)tag, reg));
(Continue reading)


Gmane