Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2006 21:36:59 -0400
From:      "James Tanis" <jtanis@pycoder.org>
To:        "Michael Ortmann" <mortmann@googlemail.com>
Cc:        freebsd-sparc64@freebsd.org
Subject:   Re: panic: trap: memory address not aligned (tap/if_bridge/openvpn -> kgdb information)
Message-ID:  <65dcde740605271836p7ead1854j966f0be36da854f5@mail.gmail.com>
In-Reply-To: <4478D26A.8010304@googlemail.com>
References:  <4476C40B.7060709@googlemail.com> <65dcde740605261009w77a7524ao3db3be74659ffe03@mail.gmail.com> <4478D26A.8010304@googlemail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I don't really know why it has to be the kernel's fault as you said,
the error is memory address is not aligned, which unlike i386, is
illegal under sparc32/64. I'm no kernel hacker either, but it seems to
me that the userland program is attempting to access memory at an
inappropriate address. Honestly the error could be caused by anything,
but if you have searched Google (and you should have by now) you'll
see the error could be cause by a multitude of things, this was just
one idea. I've never even used openvpn. I may try installing it today
or tomorrow, if I put freebsd back on my ultra60 just to see if I get
the same thing.

On 5/27/06, Michael Ortmann <mortmann@googlemail.com> wrote:
> James Tanis schrieb:
> > I'd try recompiling with less, or even better, no optimization and see
> > if your still getting the same error.
>
> i thought its enough to compile the kernel with "makeoptions DEBUG=3D-g"
> in kernel config file, because its the kernel who crashes not a useland
> program and then to use the "kernel.debug" file. i even booted directly
> from that file after renaming it to "kernel".
>
> though i recompiled world and kernel now again with "CFLAGS=3D-g" in
> "rc.conf" following the procedure in "/usr/src/Makefile".
>
> before that i again did "make update" to sync with 6-STABLE.
>
> after that i get the exact same kernel panic as soon as i try to start
> openvpn:
>
> any hints of how i can help providing more debug information is welcome!
> im no kernel hacker, so the only thing i see is "atomic.h" from the
> sparc64 include directory and symbol "tl0_intr" i cant follow. the whole
> backtrace i was able to provice so far seems to point only to
> panic/trap/exception functions in the kernel hiding the real problem?
>
> regards,
> Michael Ortmann
>
> =3D=3D uname -a =3D
>
> FreeBSD server5.q-fin 6.1-STABLE FreeBSD 6.1-STABLE #0: Sat May 27
> 22:40:17 CEST 2006     eugene@server5.q-fin:/usr/obj/usr/src/sys/SERVER5
>   sparc64
>
> =3D=3D kernel conf =3D=3D
>
> machine    sparc64
> cpu        SUN4U
> ident      SERVER5
>
> makeoptions     DEBUG=3D-g                # Build kernel with gdb(1) debu=
g
> symbols
>
> [...]
>
> device     if_bridge
> device     tap
> device     pf
>
> =3D=3D kgdb kernel core =3D=3D
>
> server5# kgdb -n 0
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you =
are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for detail=
s.
> This GDB was configured as "sparc64-marcel-freebsd".
>
> Unread portion of the kernel message buffer:
> tap0: Ethernet address: 00:bd:00:02:3c:00
> panic: trap: memory address not aligned
> cpuid =3D 0
> Uptime: 2m27s
> Dumping 512 MB (1 chunks)
>    chunk at 0xa0000000: 536870912 bytes |
>
> #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
> 240             savectx(&dumppcb);
> (kgdb) bt
> #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
> #1  0x00000000c0143e18 in boot (howto=3D260) at
> /usr/src/sys/kern/kern_shutdown.c:409
> #2  0x00000000c0144274 in panic (fmt=3D0xc03010d0 "trap: %s") at
> /usr/src/sys/kern/kern_shutdown.c:565
> #3  0x00000000c02c2944 in trap (tf=3D0xd6437130) at
> /usr/src/sys/sparc64/sparc64/trap.c:369
> #4  0x00000000c0058fe0 in tl1_trap ()
> #5  0x00000000c01db208 in tapioctl (dev=3D0xfffff800b4c1f800,
> cmd=3D18446735280407978592, data=3D0x0, flag=3D2597064,
>      td=3D0x7fdffffd0a0) at atomic.h:278
> #6  0x00000000c0110eac in dev_refthread (dev=3D0xfffff800b765e100) at
> /usr/src/sys/kern/kern_conf.c:124
> #7  0x00000000c01112c4 in giant_ioctl (dev=3D0xfffff800b3ff6a00,
> cmd=3D2147772029, data=3D0xd643753c "", fflag=3D7,
>      td=3D0xfffff800a6622260) at /usr/src/sys/kern/kern_conf.c:288
> #8  0x00000000c00f17d4 in devfs_ioctl_f (fp=3D0xfffff800a6668780,
> com=3D2147772029, data=3D0xd643753c, cred=3D0xfffff800a40bc200,
>      td=3D0xfffff800a6622260) at /usr/src/sys/fs/devfs/devfs_vnops.c:407
> #9  0x00000000c01158dc in kern_fcntl (td=3D0xfffff800a6622260, fd=3D6,
> cmd=3D4, arg=3D4) at file.h:258
> #10 0x00000000c01150f8 in fcntl (td=3D0xfffff800a6622260, uap=3D0xd64378c=
0)
> at /usr/src/sys/kern/kern_descrip.c:339
> #11 0x00000000c02c2f44 in syscall (tf=3D0xd6437880) at
> /usr/src/sys/sparc64/sparc64/trap.c:592
> #12 0x00000000c0058dc0 in tl0_intr ()
> #13 0x0000000000000000 in ?? ()
> (kgdb) bt full
> #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
> No locals.
> #1  0x00000000c0143e18 in boot (howto=3D260) at
> /usr/src/sys/kern/kern_shutdown.c:409
>          first_buf_printf =3D 1
> #2  0x00000000c0144274 in panic (fmt=3D0xc03010d0 "trap: %s") at
> /usr/src/sys/kern/kern_shutdown.c:565
>          td =3D (struct thread *) 0xfffff800a6622260
>          bootopt =3D 260
>          newpanic =3D 0
>          ap =3D 0xd6437038
>          buf =3D "trap: memory address not aligned", '\0' <repeats 223 ti=
mes>
> #3  0x00000000c02c2944 in trap (tf=3D0xd6437130) at
> /usr/src/sys/sparc64/sparc64/trap.c:369
>          td =3D (struct thread *) 0xfffff800a6622260
>          p =3D (struct proc *) 0x40a77028
>          sticks =3D 0
>          error =3D -1070591792
>          sig =3D -1069997120
> #4  0x00000000c0058fe0 in tl1_trap ()
> No symbol table info available.
> #5  0x00000000c01db208 in tapioctl (dev=3D0xfffff800b4c1f800,
> cmd=3D18446735280407978592, data=3D0x0, flag=3D2597064,
>      td=3D0x7fdffffd0a0) at atomic.h:278
>          _tid =3D 18446735280407978592
>          tp =3D (struct tap_softc *) 0xfffff800b4c1f800
>          ifp =3D (struct ifnet *) 0xfffff800b4c1f800
>          f =3D 0
> #6  0x00000000c0110eac in dev_refthread (dev=3D0xfffff800b765e100) at
> /usr/src/sys/kern/kern_conf.c:124
>          csw =3D (struct cdevsw *) 0xc032d5d8
> #7  0x00000000c01112c4 in giant_ioctl (dev=3D0xfffff800b3ff6a00,
> cmd=3D2147772029, data=3D0xd643753c "", fflag=3D7,
>      td=3D0xfffff800a6622260) at /usr/src/sys/kern/kern_conf.c:288
>          retval =3D -1275106816
> #8  0x00000000c00f17d4 in devfs_ioctl_f (fp=3D0xfffff800a6668780,
> com=3D2147772029, data=3D0xd643753c, cred=3D0xfffff800a40bc200,
>      td=3D0xfffff800a6622260) at /usr/src/sys/fs/devfs/devfs_vnops.c:407
>          dev =3D (struct cdev *) 0xfffff800b3ff6a00
>          dsw =3D (struct cdevsw *) 0xc032d5d8
>          vp =3D (struct vnode *) 0x0
>          vpold =3D (struct vnode *) 0xfffff800a6668780
>          error =3D 0
>          i =3D -700222148
>          p =3D 0xfffff800a6668780 "=FF=FF=F8"
>          fgn =3D (struct fiodgname_arg *) 0xfffff800a6622260
> #9  0x00000000c01158dc in kern_fcntl (td=3D0xfffff800a6622260, fd=3D6,
> cmd=3D4, arg=3D4) at file.h:258
>          fdp =3D (struct filedesc *) 0xfffff800b4873200
>          flp =3D (struct flock *) 0x4
>          fp =3D (struct file *) 0xfffff800a6668780
>          p =3D (struct proc *) 0xfffff800a65e1730
>          pop =3D 0x0
>          vp =3D (struct vnode *) 0x4
>          newmin =3D 4
>          error =3D 0
>          flg =3D 64
>          tmp =3D 0
>          giant_locked =3D 1
> #10 0x00000000c01150f8 in fcntl (td=3D0xfffff800a6622260, uap=3D0xd64378c=
0)
> at /usr/src/sys/kern/kern_descrip.c:339
>          fl =3D {l_start =3D 4, l_len =3D 12884901888, l_pid =3D 0, l_typ=
e =3D 0,
> l_whence =3D 0}
>          arg =3D 4
>          error =3D 0
> #11 0x00000000c02c2f44 in syscall (tf=3D0xd6437880) at
> /usr/src/sys/sparc64/sparc64/trap.c:592
>          callp =3D (struct sysent *) 0xc031ad10
>          td =3D (struct thread *) 0xfffff800a6622260
>          args =3D {3594743745, 3221589432, 3221589052, 3221589048,
> 658472179200, 100, 0, -9178230156714049532}
>          argp =3D (register_t *) 0xd64378c0
>          p =3D (struct proc *) 0xfffff800a65e1730
>          sticks =3D 41
>          code =3D 92
>          tpc =3D 1084715044
>          reg =3D 0
>          regcnt =3D 6
>          narg =3D 3
>          error =3D 0
> #12 0x00000000c0058dc0 in tl0_intr ()
> No symbol table info available.
> #13 0x0000000000000000 in ?? ()
> No symbol table info available.
> _______________________________________________
> freebsd-sparc64@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-sparc64
> To unsubscribe, send any mail to "freebsd-sparc64-unsubscribe@freebsd.org=
"
>


--=20
James Tanis
jtanis@pycoder.org
http://pycoder.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?65dcde740605271836p7ead1854j966f0be36da854f5>