Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2005 15:53:23 +0400
From:      Andrew Belashov <bel@orel.ru>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        freebsd-sparc64@FreeBSD.org
Subject:   Re: sparc64/80410: netgraph is causing crash with mpd on sparc64
Message-ID:  <434CF933.1020601@orel.ru>
In-Reply-To: <200509080711.j887Bokb036115@freefall.freebsd.org>
References:  <200509080711.j887Bokb036115@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello, Gleb!

Gleb Smirnoff wrote:
> Synopsis: netgraph is causing crash with mpd on sparc64
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: glebius
> State-Changed-When: Thu Sep 8 07:11:36 GMT 2005
> State-Changed-Why: 
>    Can you please merge the revision 1.57 of src/sys/netgraph/ng_ksocket.c
>  into your kernel and try to reproduce the problem.
> 
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=80410
> 

This revision does not resolve problem. The problem is sparc specific.
i386 has no alignment constraints (a small speed hit though).

===[debug log]=========================================================
This GDB was configured as "sparc64-portbld-freebsd5.4"...
panic: trap: memory address not aligned
panic messages:
---
panic: trap: memory address not aligned
cpuid = 0
KDB: enter: panic
panic: from debugger
cpuid = 0
boot() called on cpu#0
Uptime: 3m2s
Dumping 1024 MB (2 chunks)
  chunk at 0x80000000: 536870912 bytes |\^H
---
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:246
246             savectx(&dumppcb);
(kgdb) bt
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:246
#1  0x00000000c01829d8 in boot (howto=260)
    at /usr/src/sys/kern/kern_shutdown.c:411
#2  0x00000000c0183244 in panic (fmt=0xc03b4b80 "from debugger")
    at /usr/src/sys/kern/kern_shutdown.c:567
#3  0x00000000c0065b08 in db_panic (addr=3222937208, have_addr=0, count=-1,
    modif=0xe0258950 "") at /usr/src/sys/ddb/db_command.c:435
#4  0x00000000c0065c44 in db_command_loop ()
    at /usr/src/sys/ddb/db_command.c:349
#5  0x00000000c00686c8 in db_trap (type=107, code=0)
    at /usr/src/sys/ddb/db_main.c:210
#6  0x00000000c01a2468 in kdb_trap (type=107, code=0, tf=0x1)
    at /usr/src/sys/kern/subr_kdb.c:470
#7  0x00000000c0324f64 in trap (tf=0xe0258d20)
    at /usr/src/sys/sparc64/sparc64/trap.c:307
#8  0x00000000c01a1e78 in kdb_enter (msg=---Can't read userspace from dump, or kernel process---

) at /usr/src/sys/kern/subr_kdb.c:265
#9  0x00000000c01a1e70 in kdb_enter (msg=0xc03d29f0 "panic")
    at /usr/src/sys/kern/subr_kdb.c:265
#10 0x00000000c01832b4 in panic (fmt=0xc03eb5f0 "trap: %s") at atomic.h:278
#11 0x00000000c0324e7c in trap (tf=0xe0259120)
    at /usr/src/sys/sparc64/sparc64/trap.c:369
#12 0x00000000c022e920 in tcp_input (m=0xfffff800b08ac900, off0=64)
    at /usr/src/sys/netinet/tcp_input.c:538
#13 0x00000000c022e90c in tcp_input (m=0xfffff800b08ac900, off0=20)
    at /usr/src/sys/netinet/tcp_input.c:535
#14 0x00000000c0225210 in ip_input (m=0xfffff800b08ac900)
    at /usr/src/sys/netinet/ip_input.c:776
#15 0x00000000c020fbbc in netisr_processqueue (ni=0xc0453158)
    at /usr/src/sys/net/netisr.c:235
#16 0x00000000c020ff34 in swi_net (dummy=0x0) at atomic.h:278
#17 0x00000000c016a084 in ithread_loop (arg=0xfffff8008042f700)
    at /usr/src/sys/kern/kern_intr.c:547
#18 0x00000000c0168948 in fork_exit (callout=0xc0169f60 <ithread_loop>,
    arg=0xfffff8008042f700, frame=0xe0259880)
    at /usr/src/sys/kern/kern_fork.c:791
(kgdb) frame 14
#14 0x00000000c0225210 in ip_input (m=0xfffff800b08ac900)
    at /usr/src/sys/netinet/ip_input.c:776
776             (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen);
(kgdb) p ip
$1 = (struct ip *) 0xfffff800b081a035
------------------------------------^ (memory address not aligned)
(kgdb) p ip[0]
$2 = {ip_v = 0, ip_hl = 0, ip_tos = 0 '\0', ip_len = 0, ip_id = 0, ip_off = 0,
  ip_ttl = 0 '\0', ip_p = 6 '\006', ip_sum = 42107, ip_src = {
    s_addr = 167772162}, ip_dst = {s_addr = 168427777}}
(kgdb) p/x ip[0]
$3 = {ip_v = 0x0, ip_hl = 0x0, ip_tos = 0x0, ip_len = 0x0, ip_id = 0x0,
  ip_off = 0x0, ip_ttl = 0x0, ip_p = 0x6, ip_sum = 0xa47b, ip_src = {
    s_addr = 0xa000002}, ip_dst = {s_addr = 0xa0a0101}}


--
With Best Regards,
Andrew Belashov.



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