Subject: Random segfaults
To: None <port-sparc@NetBSD.org>
From: Rui Paulo <rpaulo@NetBSD.org>
List: port-sparc
Date: 06/27/2005 22:17:03
Hi

I'm getting some random segfaults/bus errors/memory faults on my dual
SPARCstation-20. I did a full check at the Open Boot PROM and it reported
everything functional, so I'm guess this isn't hardware fault. Also,
I didn't had any problems with 2.0/2.0.2/2.0_STABLE.

I can't find the source of the problem, but probably someone with
more clue on what changed between 2.0 and 3.0 might be able to help me.

This doesn't happen only with perl, but with almost with every software,
i.e., sysctl, vi, sed, etc.

I also found out that if the load gets high the problem tends to happen
less frequently.

I've gathered some debug information (not really debug but it may help)
that you'll find below.

Any hint on how to further analyse this problem will be grealty appreciated!

Thanks!

# gdb -q /usr/pkg/bin/perl perl.core
(no debugging symbols found)...Core was generated by `perl'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols found)...
done.
Loaded symbols for /usr/libexec/ld.elf_so
Reading symbols from /usr/pkg/lib/perl5/5.8.6/sparc-netbsd-thread-multi/CORE/libperl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/pkg/lib/perl5/5.8.6/sparc-netbsd-thread-multi/CORE/libperl.so
Reading symbols from /usr/lib/libm.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libcrypt.so.0...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libcrypt.so.0
Reading symbols from /usr/lib/libpthread.so.0...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libpthread.so.0
Reading symbols from /usr/lib/libsparc_v8.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libsparc_v8.so.0
Reading symbols from /usr/lib/libc.so.12...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.12
#0  0x20080190 in Perl_gv_fetchpv ()
   from /usr/pkg/lib/perl5/5.8.6/sparc-netbsd-thread-multi/CORE/libperl.so
(gdb) 
(gdb) bt
#0  0x20080190 in Perl_gv_fetchpv ()
   from /usr/pkg/lib/perl5/5.8.6/sparc-netbsd-thread-multi/CORE/libperl.so
#1  0x2007d0e8 in S_init_predump_symbols ()
   from /usr/pkg/lib/perl5/5.8.6/sparc-netbsd-thread-multi/CORE/libperl.so
#2  0x20078908 in S_parse_body ()
   from /usr/pkg/lib/perl5/5.8.6/sparc-netbsd-thread-multi/CORE/libperl.so
#3  0x200785a4 in perl_parse ()
   from /usr/pkg/lib/perl5/5.8.6/sparc-netbsd-thread-multi/CORE/libperl.so
#4  0x000114bc in main ()
#5  0x000110e0 in ___start ()
(gdb) info reg
g0             0x0      0
g1             0x8af000 9105408
g2             0xfffff28c       -3444
g3             0x31cc0  203968
g4             0x31d00  204032
g5             0x0      0
g6             0x9000   36864
g7             0xffffffff       -1
o0             0x25000  151552
o1             0x32478  205944
o2             0x4      4
o3             0x20153f30       538263344
o4             0x6      6
o5             0x0      0
sp             0xefffe960       4026526048
o7             0x20080330       537396016
l0             0x0      0
l1             0x32478  205944
l2             0x201157d4       538007508
l3             0x20153f30       538263344
l4             0x6      6
l5             0x260a8  155816
l6             0x2568c  153228
l7             0x2016c514       538363156
i0             0x25000  151552
i1             0x23154400       588596224
i2             0x1      1
i3             0xf      15
i4             0xfffff348       -3256
i5             0x2568c  153228
fp             0xefffeac8       4026526408
i7             0x2007d0e0       537383136
y              0x0      0
psr            0x40901081       1083183233      icc:N--C, pil:0, s:1, ps:0, et:0, cwp:1
wim            0x0      0
tbr            0x0      0
pc             0x20080190       537395600
npc            0x20080194       537395604
fpsr           0x20     32      rd:N, tem:0, ns:0, ver:0, ftt:0, qne:0, fcc:=, aexc:1, cexc:0
cpsr           0x0      0

$ dmesg
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 3.0_BETA (GENERIC.MP) #0: Sun Jun 26 19:57:37 WEST 2005
        rpaulo@core.fnop.net:/home/rpaulo/netbsd-3/obj/sys/arch/sparc/compile/GENERIC.MP
total memory = 127 MB
avail memory = 120 MB
bootpath: /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
mainbus0 (root): SUNW,SPARCstation-20: hostid 7272a6fa
cpu0 at mainbus0: mid 8: TMS390Z50 v0 or TMS390Z55 @ 50 MHz, on-chip FPU
cpu0: physical 20K instruction (64 b/l), 16K data (32 b/l): cache enabled
cpu1 at mainbus0: mid 10: TMS390Z50 v0 or TMS390Z55 @ 50 MHz, on-chip FPU
cpu1: physical 20K instruction (64 b/l), 16K data (32 b/l): cache enabled
obio0 at mainbus0
clock0 at obio0 slot 0 offset 0x200000: mk48t08
timer0 at obio0 slot 0 offset 0x300000: delay constant 23
zs0 at obio0 slot 0 offset 0x100000 level 12 softpri 6
zstty0 at zs0 channel 0 (console i/o)
zstty1 at zs0 channel 1
zs1 at obio0 slot 0 offset 0x0 level 12 softpri 6
kbd0 at zs1 channel 0: baud rate 1200
ms0 at zs1 channel 1: baud rate 1200
fdc0 at obio0 slot 0 offset 0x700000 level 11: no drives attached
auxreg0 at obio0 slot 0 offset 0x800000
power0 at obio0 slot 0 offset 0xa01000 level 2
iommu0 at mainbus0 ioaddr 0xe0000000: version 0x3/0x1, page-size 4096, range 64MB
sbus0 at iommu0: clock = 25 MHz
dma0 at sbus0 slot 15 offset 0x400000: DMA rev 2
esp0 at dma0 slot 15 offset 0x800000 level 4: ESP200, 40MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
ledma0 at sbus0 slot 15 offset 0x400010: DMA rev 2
le0 at ledma0 slot 15 offset 0xc00000 level 6: address 08:00:20:72:a6:fa
le0: 8 receive buffers, 2 transmit buffers
bpp0 at sbus0 slot 15 offset 0x4800000 level 2 (ipl 3): DMA rev 2
SUNW,DBRIe at sbus0 slot 14 offset 0x10000 level 9 not configured
dma1 at sbus0 slot 0 offset 0x81000: DMA rev esc
esp1 at dma1 slot 0 offset 0x80000 level 3 (ipl 5): ESP200, 40MHz, SCSI ID 7
scsibus1 at esp1: 8 targets, 8 luns per target
lebuffer0 at sbus0 slot 0 offset 0x40000: 128K memory
le1 at lebuffer0 slot 0 offset 0x60000 level 4 (ipl 7): address 08:00:20:72:a6:fa
le1: 64 receive buffers, 16 transmit buffers
cgsix0 at sbus0 slot 2 offset 0x0 level 9: SUNW,501-1672, 1152 x 900, rev 8cgsix0: attached to /dev/fb

eccmemctl0 at mainbus0 ioaddr 0x0: version 0x0/0x2
Kernelized RAIDframe activated
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 3 lun 0: <IBM, DORS32160SUN2.1G, WA7A> disk fixed
sd0: 2063 MB, 6703 cyl, 5 head, 126 sec, 512 bytes/sect x 4226725 sectors
sd0: sync (100.00ns offset 15), 8-bit (10.000MB/s) transfers, tagged queueing
root on sd0a dumps on sd0b
root file system type: ffs
cpu0: booting secondary processors: cpu1

		-- Rui Paulo