panic: trap: memory address not aligned (tap/if_bridge/openvpn
-> kgdb information)
James Tanis
jtanis at pycoder.org
Fri May 26 10:10:23 PDT 2006
I'd try recompiling with less, or even better, no optimization and see
if your still getting the same error.
On 5/26/06, Michael Ortmann <mortmann at googlemail.com> wrote:
> hello,
>
> i installed freebsd 6.1 to a sparc64 (u60) and updated to 6-stable. this
> machine should become an openvpn-gateway. so after updating i build a
> new kernel with tap/if_bridge support and installed openvpn.
>
> the problem: as soon as i start openvpn (via /usr/local/etc/rc.d/openvpn
> start) the machine panics short after i see an arp address assignment to
> tap0. this problem is 100% reproduceable.
>
> so i want to provide additional debug information on request.
>
> because another freebsd system at i386 is stable for me with the same
> setup i guess its a sparc64-port issue.
>
> regards,
> Michael Ortmann
>
> == uname -a =
>
> FreeBSD server5.q-fin 6.1-STABLE FreeBSD 6.1-STABLE #0: Wed May 24
> 17:34:37 CEST 2006 root at server5.q-fin:/usr/obj/usr/src/sys/SERVER5
> sparc64
>
> == dmesg ==
>
> Copyright (c) 1992-2006 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> The Regents of the University of California. All rights reserved.
> FreeBSD 6.1-STABLE #0: Wed May 24 17:34:37 CEST 2006
> root at server5.q-fin:/usr/obj/usr/src/sys/SERVER5
> real memory = 536870912 (512 MB)
> avail memory = 510763008 (487 MB)
> cpu0: Sun Microsystems UltraSparc-II Processor (296.01 MHz CPU)
> cpu1: Sun Microsystems UltraSparc-II Processor (296.01 MHz CPU)
> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
> nexus0: <Open Firmware Nexus device>
> pcib0: <U2P UPA-PCI bridge> on nexus0
> pcib0: Psycho, impl 0, version 4, ign 0x7c0, bus B
> pcib0: [FAST]
> pcib0: [FAST]
> pcib0: [GIANT-LOCKED]
> pcib0: [GIANT-LOCKED]
> pcib0: [FAST]
> initializing counter-timer
> Timecounter "counter-timer" frequency 1000000 Hz quality 100
> pcib0 dvma: DVMA map: 0xfc000000 to 0xffffffff
> pci0: <OFW PCI bus> on pcib0
> ebus0: <PCI-EBus2 bridge> mem
> 0x70000000-0x70ffffff,0x71000000-0x717fffff at device 1.0 on pci0
> auxio0: <Sun Auxiliary I/O> addr
> 0x1400726000-0x1400726003,0x1400728000-0x1400728003,0x140072a000-0x140072a003,0x140072c000-0x140072c003,0x140072f000-0x140072f003
> on ebus0
> ebus0: <power> addr 0x1400724000-0x1400724003 (no driver attached)
> ebus0: <SUNW,pll> addr 0x1400504000-0x1400504002 (no driver attached)
> ebus0: <sc> addr 0x1400500000-0x1400500007 (no driver attached)
> sab0: <Siemens SAB 82532 v3.2> addr 0x1400400000-0x140040007f irq 43 on
> ebus0
> sab0: [FAST]
> sabtty0: <ttyz0> on sab0
> sabtty1: <ttyz1> on sab0
> uart0: <16550 or compatible> addr 0x14003083f8-0x14003083ff irq 41 on ebus0
> uart0: keyboard (1200,n,8,1)
> kbd0 at sunkbd0
> uart1: <16550 or compatible> addr 0x14003062f8-0x14003062ff irq 42 on ebus0
> ebus0: <ecpp> addr
> 0x14003043bc-0x14003043cb,0x1400300398-0x1400300399,0x1400700000-0x140070000f
> irq 34 (no driver attached)
> ebus0: <fdthree> addr
> 0x14003023f0-0x14003023f7,0x1400706000-0x140070600f,0x1400720000-0x1400720003
> irq 39 (no driver attached)
> eeprom0: <EEPROM/clock> addr 0x1400000000-0x1400001fff on ebus0
> eeprom0: model mk48t59
> eeprom0: hostid 80bb1058
> ebus0: <flashprom> addr 0x1000000000-0x10000fffff (no driver attached)
> pcm0: <Sun Audiocs> addr
> 0x1400200000-0x14002000ff,0x1400702000-0x140070200f,0x1400704000-0x140070400f,0x1400722000-0x1400722003
> irq 35,36 on ebus0
> pcm0: <CS4231A Codec Id. 10>
> hme0: <Sun HME 10/100 Ethernet> mem 0x100000-0x107fff at device 1.1 on pci0
> miibus0: <MII bus> on hme0
> qsphy0: <QS6612 10/100 media interface> on miibus0
> qsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> hme0: Ethernet address: 08:00:20:bb:10:58
> sym0: <875> port 0x1000-0x10ff mem 0x108000-0x1080ff,0x10a000-0x10afff
> at device 3.0 on pci0
> sym0: No NVRAM, ID 7, Fast-20, SE, parity checking
> sym0: [GIANT-LOCKED]
> sym1: <875> port 0x1400-0x14ff mem 0x10c000-0x10c0ff,0x10e000-0x10efff
> at device 3.1 on pci0
> sym1: No NVRAM, ID 7, Fast-20, SE, parity checking
> sym1: [GIANT-LOCKED]
> pcib1: <U2P UPA-PCI bridge> on nexus0
> pcib1: Psycho, impl 0, version 4, ign 0x7c0, bus A
> pcib1: [FAST]
> pci1: <OFW PCI bus> on pcib1
> creator0: <Creator3D> on nexus0
> creator0: console
> creator0: resolution 1280x1024
> syscons0: <System console> on nexus0
> syscons0: Unknown <16 virtual consoles, flags=0x300>
> Timecounters tick every 1.000 msec
> Waiting 5 seconds for SCSI devices to settle
> SMP: AP CPU #1 Launched!
> cd0 at sym0 bus 0 target 6 lun 0
> cd0: <TOSHIBA XM6201TASUN32XCD 1103> Removable CD-ROM SCSI-2 device
> cd0: 10.000MB/s transfers (10.000MHz, offset 16)
> cd0: Attempt to query device size failed: NOT READY, Medium not present
> da0 at sym0 bus 0 target 0 lun 0
> da0: <SEAGATE ST336737LC 0105> Fixed Direct Access SCSI-3 device
> da0: 40.000MB/s transfers (20.000MHz, offset 16, 16bit), Tagged Queueing
> Enabled
> da0: 35242MB (72176566 512 byte sectors: 255H 63S/T 4492C)
> Trying to mount root from ufs:/dev/da0a
>
> == /etc/rf.conf ==
>
> dumpdev="AUTO"
> ifconfig_hme0="inet 192.168.1.5 netmask 255.255.255.0"
> defaultrouter="192.168.1.1"
> hostname="server5.q-fin"
> sshd_enable="YES"
> #openvpn_enable="YES"
>
> --> as soon as the last line is enabled the machine crashes during boot
> when it starts openvpn
>
> == /usr/local/etc/openvpn/openvpn.conf ==
>
> port 1194
> proto udp # tcp or udp ?
> dev tap0 # tun = routed tunnel, tap = ethernet tunnel (ethernet
> bridging)
> ca ca.crt
> cert server.crt
> key server.key # keep this file secret
> dh dh1024.pem
> ifconfig-pool-persist ipp.txt
> server-bridge 192.168.1.5 255.255.255.0 192.168.1.64 192.168.1.79
> keepalive 10 120
> comp-lzo
> persist-key
> persist-tun
> #status openvpn-status.log
> verb 3
>
> == kernel conf ==
>
> machine sparc64
> cpu SUN4U
> ident SERVER5
>
> # To statically compile in device wiring instead of /boot/device.hints
> #hints "GENERIC.hints" # Default places to look for
> devices.
>
> makeoptions DEBUG=-g # Build kernel with gdb(1) debug
> symbols
>
> # Platforms supported
> # At this time all platforms are supported, as-is.
>
> #options SCHED_ULE # ULE scheduler
> options SCHED_4BSD # 4BSD scheduler
> #options PREEMPTION # Enable kernel thread preemption
> options INET # InterNETworking
> options INET6 # IPv6 communications protocols
> options FFS # Berkeley Fast Filesystem
> options SOFTUPDATES # Enable FFS soft updates support
> options UFS_ACL # Support for access control lists
> options UFS_DIRHASH # Improve performance on big directories
> #options MD_ROOT # MD is a potential root device
> #options NFSCLIENT # Network Filesystem Client
> #options NFSSERVER # Network Filesystem Server
> #options NFS_ROOT # NFS usable as /, requires NFSCLIENT
> #options MSDOSFS # MSDOS Filesystem
> options CD9660 # ISO 9660 Filesystem
> options PROCFS # Process filesystem (requires
> PSEUDOFS)
> options PSEUDOFS # Pseudo-filesystem framework
> options GEOM_GPT # GUID Partition Tables.
> options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!]
> options COMPAT_FREEBSD5 # Compatible with FreeBSD5
> options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
> options KTRACE # ktrace(1) support
> options SYSVSHM # SYSV-style shared memory
> options SYSVMSG # SYSV-style message queues
> options SYSVSEM # SYSV-style semaphores
> options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
> options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
> # output. Adds ~128k to driver.
> options ADAPTIVE_GIANT # Giant mutex is adaptive.
>
> # To make an SMP kernel, the next line is needed
> options SMP # Symmetric MultiProcessor Kernel
>
> # Standard busses
> device ebus
> device isa
> device pci
> device sbus
> device central
> device fhc
>
> # Floppy drives
> #device fdc
>
> # SCSI Controllers
> device sym # NCR/Symbios Logic (newer chipsets + those of
> `ncr')
>
> # SCSI peripherals
> device scbus # SCSI bus (required for SCSI)
> device ch # SCSI media changers
> device da # Direct Access (disks)
> device sa # Sequential Access (tape etc)
> device cd # CD
> device pass # Passthrough device (direct SCSI access)
> device ses # SCSI Environmental Services (and SAF-TE)
>
> # atkbdc0 controls both the keyboard and the PS/2 mouse
> device atkbdc # AT keyboard controller
> device atkbd # AT keyboard
> device psm # PS/2 mouse
>
> # syscons is the default console driver, resembling an SCO console
> device sc
> device creator # Creator, Creator3D and Elite3D
> framebuffers
> device splash # Splash screen and screen saver support
> options KBD_INSTALL_CDEV # install a CDEV entry in /dev
>
> #device ofw_console # Open Firmware console device
>
> # Builtin hardware
> device auxio # auxiliary I/O device
> device clkbrd # Clock Board (blinkenlight on Sun Exx00)
> device genclock # Generic clock interface
> device eeprom # eeprom (really a front-end for the
> MK48Txx)
> device mk48txx # Mostek MK48Txx clocks
> device rtc # rtc (really a front-end for the MC146818)
> device mc146818 # Motorola MC146818 and compatible clocks
>
> # Serial (COM) ports
> device sab # Siemens SAB82532 based serial ports
> device uart # Multi-uart driver
> device puc # Multi-channel uarts
>
> # Parallel port
> #device ppc
> #device ppbus # Parallel port bus (required)
> #device lpt # Printer
> #device plip # TCP/IP over parallel
> #device ppi # Parallel port interface device
> #device vpo # Requires scbus and da
>
> # PCI Ethernet NICs that use the common MII bus controller code.
> # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
> device miibus # MII bus support
> device hme # Sun HME (Happy Meal Ethernet)
> #device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
>
> # Pseudo devices.
> device loop # Network loopback
> device mem # Memory and kernel memory devices
> device random # Entropy device
> device ether # Ethernet support
> device tun # Packet tunnel.
> device pty # Pseudo-ttys (telnet etc)
> #device md # Memory "disks"
> #device gif # IPv6 and IPv4 tunneling
> #device faith # IPv6-to-IPv4 relaying (translation)
>
> # The `bpf' device enables the Berkeley Packet Filter.
> # Be aware of the administrative consequences of enabling this!
> # Note that 'bpf' is required for DHCP.
> device bpf # Berkeley packet filter
>
> #options GEOM_BDE
> #options ACCEPT_FILTER_HTTP
>
> device sound
> device snd_audiocs
>
> device if_bridge
> device tap
> device pf
> #device pflog
>
> == kgdb kernel core ==
>
> server5# kgdb /usr/obj/usr/src/sys/SERVER5/kernel.debug /var/crash/vmcore.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 details.
> This GDB was configured as "sparc64-marcel-freebsd".
>
> Unread portion of the kernel message buffer:
> tap0: Ethernet address: 00:bd:00:01:1d:00
> panic: trap: memory address not aligned
> cpuid = 0
> Uptime: 1m14s
> 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=260) at
> /usr/src/sys/kern/kern_shutdown.c:409
> #2 0x00000000c0144274 in panic (fmt=0xc0301010 "trap: %s") at
> /usr/src/sys/kern/kern_shutdown.c:565
> #3 0x00000000c02c2884 in trap (tf=0xd5afd130) at
> /usr/src/sys/sparc64/sparc64/trap.c:369
> #4 0x00000000c0058fe0 in tl1_trap ()
> #5 0x00000000c01db208 in tapioctl (dev=0xfffff800b5c47000,
> cmd=18446735280830307456, data=0x0, flag=2597064,
> td=0x7fdffffd0a0) at atomic.h:278
> #6 0x00000000c0110eac in dev_refthread (dev=0xfffff800b6b6db00) at
> /usr/src/sys/kern/kern_conf.c:124
> #7 0x00000000c01112c4 in giant_ioctl (dev=0xfffff800b64bc600,
> cmd=2147772029, data=0xd5afd53c "", fflag=7,
> td=0xfffff800bf8e5c80) at /usr/src/sys/kern/kern_conf.c:288
> #8 0x00000000c00f17d4 in devfs_ioctl_f (fp=0xfffff800a62ae0f0,
> com=2147772029, data=0xd5afd53c, cred=0xfffff800a7771600,
> td=0xfffff800bf8e5c80) at /usr/src/sys/fs/devfs/devfs_vnops.c:407
> #9 0x00000000c01158dc in kern_fcntl (td=0xfffff800bf8e5c80, fd=6,
> cmd=4, arg=4) at file.h:258
> #10 0x00000000c01150f8 in fcntl (td=0xfffff800bf8e5c80, uap=0xd5afd8c0)
> at /usr/src/sys/kern/kern_descrip.c:339
> #11 0x00000000c02c2e84 in syscall (tf=0xd5afd880) 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=260) at
> /usr/src/sys/kern/kern_shutdown.c:409
> first_buf_printf = 1
> #2 0x00000000c0144274 in panic (fmt=0xc0301010 "trap: %s") at
> /usr/src/sys/kern/kern_shutdown.c:565
> td = (struct thread *) 0xfffff800bf8e5c80
> bootopt = 260
> newpanic = 0
> ap = 0xd5afd038
> buf = "trap: memory address not aligned", '\0' <repeats 223 times>
> #3 0x00000000c02c2884 in trap (tf=0xd5afd130) at
> /usr/src/sys/sparc64/sparc64/trap.c:369
> td = (struct thread *) 0xfffff800bf8e5c80
> p = (struct proc *) 0x4091bfc8
> sticks = 0
> error = -1070591984
> sig = -1069997376
> #4 0x00000000c0058fe0 in tl1_trap ()
> No symbol table info available.
> #5 0x00000000c01db208 in tapioctl (dev=0xfffff800b5c47000,
> cmd=18446735280830307456, data=0x0, flag=2597064,
> td=0x7fdffffd0a0) at atomic.h:278
> _tid = 18446735280830307456
> tp = (struct tap_softc *) 0xfffff800b5c47000
> ifp = (struct ifnet *) 0xfffff800b5c47000
> f = 0
> #6 0x00000000c0110eac in dev_refthread (dev=0xfffff800b6b6db00) at
> /usr/src/sys/kern/kern_conf.c:124
> csw = (struct cdevsw *) 0xc032d518
> #7 0x00000000c01112c4 in giant_ioctl (dev=0xfffff800b64bc600,
> cmd=2147772029, data=0xd5afd53c "", fflag=7,
> td=0xfffff800bf8e5c80) at /usr/src/sys/kern/kern_conf.c:288
> retval = -1236548096
> #8 0x00000000c00f17d4 in devfs_ioctl_f (fp=0xfffff800a62ae0f0,
> com=2147772029, data=0xd5afd53c, cred=0xfffff800a7771600,
> td=0xfffff800bf8e5c80) at /usr/src/sys/fs/devfs/devfs_vnops.c:407
> dev = (struct cdev *) 0xfffff800b64bc600
> dsw = (struct cdevsw *) 0xc032d518
> vp = (struct vnode *) 0x0
> vpold = (struct vnode *) 0xfffff800a62ae0f0
> error = 0
> i = -709896900
> p = 0xfffff800a62ae0f0 "ÿÿø"
> fgn = (struct fiodgname_arg *) 0xfffff800bf8e5c80
> #9 0x00000000c01158dc in kern_fcntl (td=0xfffff800bf8e5c80, fd=6,
> cmd=4, arg=4) at file.h:258
> fdp = (struct filedesc *) 0xfffff800b64bce00
> flp = (struct flock *) 0x4
> fp = (struct file *) 0xfffff800a62ae0f0
> p = (struct proc *) 0xfffff800b5cb2000
> pop = 0x0
> vp = (struct vnode *) 0x4
> newmin = 4
> error = 0
> flg = 64
> tmp = 0
> giant_locked = 1
> #10 0x00000000c01150f8 in fcntl (td=0xfffff800bf8e5c80, uap=0xd5afd8c0)
> at /usr/src/sys/kern/kern_descrip.c:339
> fl = {l_start = 3585068785, l_len = 3222732972, l_pid = 0,
> l_type = 0, l_whence = 0}
> arg = 4
> error = 0
> #11 0x00000000c02c2e84 in syscall (tf=0xd5afd880) at
> /usr/src/sys/sparc64/sparc64/trap.c:592
> callp = (struct sysent *) 0xc031ac50
> td = (struct thread *) 0xfffff800bf8e5c80
> args = {3585068993, 3221589432, 3, 4098, -1, 0, 0, 0}
> argp = (register_t *) 0xd5afd8c0
> p = (struct proc *) 0xfffff800b5cb2000
> sticks = 42
> code = 92
> tpc = 1083293636
> reg = 0
> regcnt = 6
> narg = 3
> error = 0
> #12 0x00000000c0058dc0 in tl0_intr ()
> No symbol table info available.
> #13 0x0000000000000000 in ?? ()
> No symbol table info available.
> (kgdb) f 5
> #5 0x00000000c01db208 in tapioctl (dev=0xfffff800b5c47000,
> cmd=18446735280830307456, data=0x0, flag=2597064,
> td=0x7fdffffd0a0) at atomic.h:278
> 278 ATOMIC_GEN(ptr, uintptr_t *, uintptr_t, uintptr_t, 64);
> (kgdb) list 278
> 273 ATOMIC_GEN(32, uint32_t *, uint32_t, uint32_t, 32);
> 274
> 275 ATOMIC_GEN(long, u_long *, u_long, u_long, 64);
> 276 ATOMIC_GEN(64, uint64_t *, uint64_t, uint64_t, 64);
> 277
> 278 ATOMIC_GEN(ptr, uintptr_t *, uintptr_t, uintptr_t, 64);
> 279
> 280 #define atomic_fetchadd_int atomic_add_int
> 281 #define atomic_fetchadd_32 atomic_add_32
> 282
> (kgdb) list 27
> 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> CONTRACT, STRICT
> 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> ARISING IN ANY WAY
> 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> POSSIBILITY OF
> 25 * SUCH DAMAGE.
> 26 *
> 27 * from: FreeBSD: src/sys/i386/include/atomic.h,v 1.20 2001/02/11
> 28 * $FreeBSD: src/sys/sparc64/include/atomic.h,v 1.8.8.2
> 2005/10/06 18:12:06 jhb Exp $
> 29 */
> 30
> 31 #ifndef _MACHINE_ATOMIC_H_
> (kgdb) f 6
> #6 0x00000000c0110eac in dev_refthread (dev=0xfffff800b6b6db00) at
> /usr/src/sys/kern/kern_conf.c:124
> 124 dev_unlock();
> (kgdb) list 124
> 119 mtx_assert(&devmtx, MA_NOTOWNED);
> 120 dev_lock();
> 121 csw = dev->si_devsw;
> 122 if (csw != NULL)
> 123 dev->si_threadcount++;
> 124 dev_unlock();
> 125 return (csw);
> 126 }
> 127
> 128 void
> (kgdb) f 7
> #7 0x00000000c01112c4 in giant_ioctl (dev=0xfffff800b64bc600,
> cmd=2147772029, data=0xd5afd53c "", fflag=7,
> td=0xfffff800bf8e5c80) at /usr/src/sys/kern/kern_conf.c:288
> 288 retval = dev->si_devsw->d_gianttrick->
> (kgdb) list 288
> 283 giant_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int
> fflag, struct thread *td)
> 284 {
> 285 int retval;
> 286
> 287 mtx_lock(&Giant);
> 288 retval = dev->si_devsw->d_gianttrick->
> 289 d_ioctl(dev, cmd, data, fflag, td);
> 290 mtx_unlock(&Giant);
> 291 return (retval);
> 292 }
> (kgdb) f 8
> #8 0x00000000c00f17d4 in devfs_ioctl_f (fp=0xfffff800a62ae0f0,
> com=2147772029, data=0xd5afd53c, cred=0xfffff800a7771600,
> td=0xfffff800bf8e5c80) at /usr/src/sys/fs/devfs/devfs_vnops.c:407
> 407 error = dsw->d_ioctl(dev, com, data, fp->f_flag, td);
> (kgdb) list 407
> 402 else
> 403 error = copyout(p, fgn->buf, i);
> 404 dev_relthread(dev);
> 405 return (error);
> 406 }
> 407 error = dsw->d_ioctl(dev, com, data, fp->f_flag, td);
> 408 dev_relthread(dev);
> 409 if (error == ENOIOCTL)
> 410 error = ENOTTY;
> 411 if (error == 0 && com == TIOCSCTTY) {
> _______________________________________________
> freebsd-sparc64 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-sparc64
> To unsubscribe, send any mail to "freebsd-sparc64-unsubscribe at freebsd.org"
>
--
James Tanis
jtanis at pycoder.org
http://pycoder.org
More information about the freebsd-sparc64
mailing list