Port-alpha archive

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

Re: Self baked kernel panics



And now for some completely unexpected behaviour. 
When using:
COPTS+=-Os -mcpu=21164a
instead of just
COPTS+=-mcpu=21164a
the kernel doesn't panic and boots up fine. And is smallest so far, as a nice 
side effect. Will test with -O2 tonight. 

However, for my first kernels (also for the generic I supplied the trace) I 
had
COPTS+="-mcpu=21164a"
instead of
COPTS+=-mcpu=21164a (-> quotation marks) in my mk.conf.
Nevertheless, also after rebuilding without quotation marks my kernel still 
panics, if -mcpu is, but -Os is not set. 
In case this obiously wrong setting affects the trace, I will gladly recompile 
GENERIC and resubmit the results


Am Freitag, 8. Februar 2008 schrieb Ede Wolf:
> First of all: Compiling the Kernel without COPTS+="-mcpu=21164a" in mk.conf
> makes it about 30% smaller and it does not panic upon boot. So it is
> somehow related to this flag. Blame code or gcc, who knows. However, my
> Custom Kernel boots fine now.
>
> Still, here are the traces. I admit, I have no clue what I am doing, but
> may it be helpful. If you need other data, just let me know.
>
> db> x/i 0xfffffc00004ea978
> netbsd:isp_start+0x440: stq_u   zero,4(t0)
>
> db> x/i 0xfffffc00004ea978,20
> netbsd:isp_start+0x440: stq_u   zero,4(t0)
> netbsd:isp_start+0x444: stq_u   zero,c(t0)
> netbsd:isp_start+0x448: stq_u   zero,14(t0)
> netbsd:isp_start+0x44c: stq_u   zero,1c(t0)
> netbsd:isp_start+0x450: stq_u   zero,24(t0)
> netbsd:isp_start+0x454: stq_u   zero,2c(t0)
> netbsd:isp_start+0x458: stq_u   zero,34(t0)
> netbsd:isp_start+0x45c: stl     zero,38(t0)
> netbsd:isp_start+0x460: stl     zero,3c(t0)
> netbsd:isp_start+0x464: ldq     t1,88(s6)
> netbsd:isp_start+0x468: lda     t0,1(zero)
> netbsd:isp_start+0x46c: stb     t0,1(t1)
> netbsd:isp_start+0x470: ldq     t1,88(s6)
> netbsd:isp_start+0x474: lda     t0,4(zero)
> netbsd:isp_start+0x478: stb     t0,0(t1)
> netbsd:isp_start+0x47c: ldq     t1,88(s6)
> netbsd:isp_start+0x480: lda     t0,2(zero)
> netbsd:isp_start+0x484: stw     t0,a(t1)
> netbsd:isp_start+0x488: ldl     t0,80(s6)
> netbsd:isp_start+0x48c: and     t0,#0xff,t0
> netbsd:isp_start+0x490: sll     t0,#0x7,t0
> netbsd:isp_start+0x494: and     t0,#0xff,t1
> netbsd:isp_start+0x498: ldq     t0,88(s6)
> netbsd:isp_start+0x49c: stb     t1,9(t0)
> netbsd:isp_start+0x4a0: ldq     t0,e0(s6)
> netbsd:isp_start+0x4a4: ldq     a0,90(s6)
> netbsd:isp_start+0x4a8: ldq     a1,88(s6)
> netbsd:isp_start+0x4ac: or      zero,t0,a2
> netbsd:isp_start+0x4b0: bsr     ra,netbsd:isp_put_request+0x8
> netbsd:isp_start+0x4b4: ldq     t0,90(s6)
> netbsd:isp_start+0x4b8: ldwu    t0,38a(t0)
> netbsd:isp_start+0x4bc: zapnot  t0,#0x3,t0
>
> db> x/i 0xfffffe000c589a66
> 0xfffffe000c589a66:     sts     f23,-1(v0)
>
> db> x/i 0xfffffe000c589a66,20
> 0xfffffe000c589a66:     sts     f23,-1(v0)
> 0xfffffe000c589a6a:     bgt     a0,0xfffffe000c58cbce
> 0xfffffe000c589a6e:     stt     f5,-1(at)
> 0xfffffe000c589a72:     call_pal 0x68
> 0xfffffe000c589a76:             hw_ldl  t5,0(t7)
> 0xfffffe000c589a7a:     bgt     v0,0xfffffe000c589bba
> 0xfffffe000c589a7e:     sts     f20,-1(t10)
> 0xfffffe000c589a82:     bgt     a0,0xfffffe000c58cbe6
> 0xfffffe000c589a86:     call_pal 0x4ffff
> 0xfffffe000c589a8a:     call_pal halt
> 0xfffffe000c589a8e:     sts     f20,0(t10)
> 0xfffffe000c589a92:     bgt     a0,0xfffffe000c58cbf6
> 0xfffffe000c589a96:             hw_ldq_l-c/?r   t1,-1(at)
> 0xfffffe000c589a9a:     bgt     v0,0xfffffe000c589bda
> 0xfffffe000c589a9e:     sts     f22,-1(t7)
> 0xfffffe000c589aa2:     bgt     a0,0xfffffe000c58cc06
> 0xfffffe000c589aa6:     br      t7,0xfffffe000c5c9aa6
> 0xfffffe000c589aaa:     bgt     v0,0xfffffe000c589b12
> 0xfffffe000c589aae:     sts     f25,-1(v0)
> 0xfffffe000c589ab2:     bgt     a0,0xfffffe000c589b22
> 0xfffffe000c589ab6:     stq_u   a3,-1(v0)
> 0xfffffe000c589aba:     bgt     v0,0xfffffe000c58d9da
> 0xfffffe000c589abe:     call_pal 0xffff
> 0xfffffe000c589ac2:     call_pal halt
> 0xfffffe000c589ac6:     jmp     sp,(t10),0xfffffe000c589aca
> 0xfffffe000c589aca:     bgt     v0,0xfffffe000c589c0a
> 0xfffffe000c589ace:     sts     f22,-1(t10)
> 0xfffffe000c589ad2:     bgt     a0,0xfffffe000c58cc36
> 0xfffffe000c589ad6:             hw_rei
> 0xfffffe000c589ada:     bgt     v0,0xfffffe000c589c1a
> 0xfffffe000c589ade:     sts     f24,-1(t7)
> 0xfffffe000c589ae2:     bgt     a0,0xfffffe000c58cc46
>
>
> db> x/i 0xfffffc00004ea890
> netbsd:isp_start+0x358: or      zero,v0,t0
>
> db> x/i 0xfffffc00004ea890,20
> netbsd:isp_start+0x358: or      zero,v0,t0
> netbsd:isp_start+0x35c: beq     t0,netbsd:isp_start+0x398
> netbsd:isp_start+0x360: ldq     a0,90(s6)
> netbsd:isp_start+0x364: lda     a1,10(zero)
> netbsd:isp_start+0x368: ldah    t0,-23(gp)
> netbsd:isp_start+0x36c: lda     a2,5cb6(t0)
> netbsd:isp_start+0x370: ldq     pv,3cd0(gp)
> netbsd:isp_start+0x374: jsr     ra,(pv),netbsd:isp_get_ct_hdr+0x84
> netbsd:isp_start+0x378: ldah    gp,91(ra)
> netbsd:isp_start+0x37c: lda     gp,52b8(gp)
> netbsd:isp_start+0x380: ldq     t1,f0(s6)
> netbsd:isp_start+0x384: lda     t0,3(zero)
> netbsd:isp_start+0x388: stl     t0,88(t1)
> netbsd:isp_start+0x38c: lda     t0,66(zero)
> netbsd:isp_start+0x390: stq     t0,138(s6)
> netbsd:isp_start+0x394: br      zero,netbsd:isp_start+0xc38
> netbsd:isp_start+0x398: lda     t0,9e(s6)
> netbsd:isp_start+0x39c: stq     t0,88(s6)
> netbsd:isp_start+0x3a0: ldq     t0,90(s6)
> netbsd:isp_start+0x3a4: ldbu    t0,385(t0)
> netbsd:isp_start+0x3a8: and     t0,#0xff,t0
> netbsd:isp_start+0x3ac: and     t0,#0x30,t0
> netbsd:isp_start+0x3b0: beq     t0,netbsd:isp_start+0x638
> netbsd:isp_start+0x3b4: ldq     t0,90(s6)
> netbsd:isp_start+0x3b8: ldbu    t0,336(t0)
> netbsd:isp_start+0x3bc: cmpeq   t0,#0x8,t0
> netbsd:isp_start+0x3c0: bne     t0,netbsd:isp_start+0x3e4
> netbsd:isp_start+0x3c4: ldq     t0,90(s6)
> netbsd:isp_start+0x3c8: ldbu    t0,336(t0)
> netbsd:isp_start+0x3cc: cmpeq   t0,#0xa,t0
> netbsd:isp_start+0x3d0: bne     t0,netbsd:isp_start+0x3e4
> netbsd:isp_start+0x3d4: ldq     t0,90(s6)
>
>
> x/i 0xfffffc00004ea890
> netbsd:isp_start+0x358: or      zero,v0,t0
>
> db> x/i 0xfffffc00004ea890,20
> netbsd:isp_start+0x358: or      zero,v0,t0
> netbsd:isp_start+0x35c: beq     t0,netbsd:isp_start+0x398
> netbsd:isp_start+0x360: ldq     a0,90(s6)
> netbsd:isp_start+0x364: lda     a1,10(zero)
> netbsd:isp_start+0x368: ldah    t0,-23(gp)
> netbsd:isp_start+0x36c: lda     a2,5cb6(t0)
> netbsd:isp_start+0x370: ldq     pv,3cd0(gp)
> netbsd:isp_start+0x374: jsr     ra,(pv),netbsd:isp_get_ct_hdr+0x84
> netbsd:isp_start+0x378: ldah    gp,91(ra)
> netbsd:isp_start+0x37c: lda     gp,52b8(gp)
> netbsd:isp_start+0x380: ldq     t1,f0(s6)
> netbsd:isp_start+0x384: lda     t0,3(zero)
> netbsd:isp_start+0x388: stl     t0,88(t1)
> netbsd:isp_start+0x38c: lda     t0,66(zero)
> netbsd:isp_start+0x390: stq     t0,138(s6)
> netbsd:isp_start+0x394: br      zero,netbsd:isp_start+0xc38
> netbsd:isp_start+0x398: lda     t0,9e(s6)
> netbsd:isp_start+0x39c: stq     t0,88(s6)
> netbsd:isp_start+0x3a0: ldq     t0,90(s6)
> netbsd:isp_start+0x3a4: ldbu    t0,385(t0)
> netbsd:isp_start+0x3a8: and     t0,#0xff,t0
> netbsd:isp_start+0x3ac: and     t0,#0x30,t0
> netbsd:isp_start+0x3b0: beq     t0,netbsd:isp_start+0x638
> netbsd:isp_start+0x3b4: ldq     t0,90(s6)
> netbsd:isp_start+0x3b8: ldbu    t0,336(t0)
> netbsd:isp_start+0x3bc: cmpeq   t0,#0x8,t0
> netbsd:isp_start+0x3c0: bne     t0,netbsd:isp_start+0x3e4
> netbsd:isp_start+0x3c4: ldq     t0,90(s6)
> netbsd:isp_start+0x3c8: ldbu    t0,336(t0)
> netbsd:isp_start+0x3cc: cmpeq   t0,#0xa,t0
> netbsd:isp_start+0x3d0: bne     t0,netbsd:isp_start+0x3e4
> netbsd:isp_start+0x3d4: ldq     t0,90(s6)
>
>
> db> x/i 0xfffffc0000a697c0
> netbsd:cia_swiz_mem_read_2:     lda     sp,-30(sp)
>
> db> x/i 0xfffffc0000a697c0,20
> netbsd:cia_swiz_mem_read_2:     lda     sp,-30(sp)
> netbsd:cia_swiz_mem_read_2+0x4: stq     ra,0(sp)
> netbsd:cia_swiz_mem_read_2+0x8: stq     s6,8(sp)
> netbsd:cia_swiz_mem_read_2+0xc: or      zero,sp,s6
> netbsd:cia_swiz_mem_read_2+0x10:        stq     a0,10(s6)
> netbsd:cia_swiz_mem_read_2+0x14:        stq     a1,18(s6)
> netbsd:cia_swiz_mem_read_2+0x18:        stq     a2,20(s6)
> netbsd:cia_swiz_mem_read_2+0x1c:        mb
> netbsd:cia_swiz_mem_read_2+0x20:        ldq     t0,18(s6)
> netbsd:cia_swiz_mem_read_2+0x24:        srl     t0,#0x3f,t0
> netbsd:cia_swiz_mem_read_2+0x28:        beq
> t0,netbsd:cia_swiz_mem_read_2+0x
> 44
> netbsd:cia_swiz_mem_read_2+0x2c:        ldq     t1,18(s6)
> netbsd:cia_swiz_mem_read_2+0x30:        ldq     t0,20(s6)
> netbsd:cia_swiz_mem_read_2+0x34:        addq    t1,t0,t0
> netbsd:cia_swiz_mem_read_2+0x38:        ldwu    t0,0(t0)
> netbsd:cia_swiz_mem_read_2+0x3c:        stq     t0,28(s6)
> netbsd:cia_swiz_mem_read_2+0x40:        br
> zero,netbsd:cia_swiz_mem_read_2+
> 0x88
> netbsd:cia_swiz_mem_read_2+0x44:        ldq     t1,18(s6)
> netbsd:cia_swiz_mem_read_2+0x48:        ldq     t0,20(s6)
> netbsd:cia_swiz_mem_read_2+0x4c:        addq    t1,t0,t2
> netbsd:cia_swiz_mem_read_2+0x50:        addl    zero,t2,t0
> netbsd:cia_swiz_mem_read_2+0x54:        addl    zero,t0,t0
> netbsd:cia_swiz_mem_read_2+0x58:        or      zero,t0,t1
> netbsd:cia_swiz_mem_read_2+0x5c:        and     t1,#0x3,t1
> netbsd:cia_swiz_mem_read_2+0x60:        sll     t2,#0x5,t0
> netbsd:cia_swiz_mem_read_2+0x64:        or      t0,#0x8,t0
> netbsd:cia_swiz_mem_read_2+0x68:        ldl     t2,0(t0)
> netbsd:cia_swiz_mem_read_2+0x6c:        s8addq  t1,#0x0,t0
> netbsd:cia_swiz_mem_read_2+0x70:        addl    zero,t0,t1
> netbsd:cia_swiz_mem_read_2+0x74:        zapnot  t2,#0xf,t0
> netbsd:cia_swiz_mem_read_2+0x78:        srl     t0,t1,t0
> netbsd:cia_swiz_mem_read_2+0x7c:        addl    zero,t0,t0
>
>
> db> x/i 0xfffffc000fbe9ba0
> 0xfffffc000fbe9ba0:     call_pal 0xe50368
>
> db> x/i 0xfffffc000fbe9ba0,20
> 0xfffffc000fbe9ba0:     call_pal 0xe50368
> 0xfffffc000fbe9ba4:     bgt     zero,0xfffffc000fbe8ba8
> 0xfffffc000fbe9ba8:     call_pal halt
> 0xfffffc000fbe9bac:     call_pal halt
> 0xfffffc000fbe9bb0:     ? 0xfbe9cb0 ?
> 0xfffffc000fbe9bb4:     bgt     zero,0xfffffc000fbe8bb8
> 0xfffffc000fbe9bb8:     ? 0xfbe9aa0 ?
> 0xfffffc000fbe9bbc:     bgt     zero,0xfffffc000fbe8bc0
> 0xfffffc000fbe9bc0:     ? 0xfbf96c8 ?
> 0xfffffc000fbe9bc4:     bgt     zero,0xfffffc000fbe8bc8
> 0xfffffc000fbe9bc8:     call_pal halt
> 0xfffffc000fbe9bcc:     call_pal halt
> 0xfffffc000fbe9bd0:     ? 0xfbf9768 ?
> 0xfffffc000fbe9bd4:     bgt     zero,0xfffffc000fbe8bd8
> 0xfffffc000fbe9bd8:     call_pal 0xe52b30
> 0xfffffc000fbe9bdc:     bgt     zero,0xfffffc000fbe8be0
> 0xfffffc000fbe9be0:     call_pal halt
> 0xfffffc000fbe9be4:     call_pal halt
> 0xfffffc000fbe9be8:     call_pal halt
> 0xfffffc000fbe9bec:     call_pal halt
> 0xfffffc000fbe9bf0:     call_pal 0x4
> 0xfffffc000fbe9bf4:     call_pal 0x7
> 0xfffffc000fbe9bf8:     call_pal cflush
> 0xfffffc000fbe9bfc:     call_pal osf1_wrent
> 0xfffffc000fbe9c00:     ? 0xfdd9f48 ?
> 0xfffffc000fbe9c04:     bgt     zero,0xfffffc000fbe8c08
> 0xfffffc000fbe9c08:     call_pal halt
> 0xfffffc000fbe9c0c:     call_pal 0x5
> 0xfffffc000fbe9c10:     call_pal halt
> 0xfffffc000fbe9c14:     call_pal halt
> 0xfffffc000fbe9c18:     call_pal halt
> 0xfffffc000fbe9c1c:     call_pal halt
>
> Am Freitag, 8. Februar 2008 schrieb Michael L. Hitch:
> > On Thu, 7 Feb 2008, Ede Wolf wrote:
> > > CPU 0: fatal kernel trap:
> > >
> > > CPU 0    trap entry = 0x4 (unaligned access fault)
> > > CPU 0    a0         = 0xfffffe000c589a66
> > > CPU 0    a1         = 0x2c
> > > CPU 0    a2         = 0x1f
> > > CPU 0    pc         = 0xfffffc00004ea978
> > > CPU 0    ra         = 0xfffffc00004ea890
> > > CPU 0    pv         = 0xfffffc0000a697c0
> > > CPU 0    curlwp    = 0xfffffc000fbe9ba0
> > > CPU 0        pid = 3, comm = scsibus1
> > >
> > > panic: trap
> > > Stopped in pid 3.1 (scsibus1) at        netbsd:cpu_Debugger+0x14:
> > > or z
> > > ero,s6,sp
> > >
> > >
> > > And now for the backtrace:
> >
> >    Another thing you can get is the failing instruction (Using the pc
> > value from the trap information above):
> >
> > db> x/i 0xfffffc00004ea978
> >
> >    Maybe even several instructions (to help me figure out where in the
> > code the trap occurred):
> >
> > db> x/i 0xfffffc00004ea978,20
> >
> > --
> > Michael L. Hitch                    mhitch%montana.edu@localhost
> > Computer Consultant
> > Information Technology Center
> > Montana State University    Bozeman, MT     USA



Home | Main Index | Thread Index | Old Index