Subject: port-sparc64/29473: nfs + bus_dmamap_load_mbuf often results in a hang
To: None <port-sparc64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <heas@shrubbery.net>
List: netbsd-bugs
Date: 02/20/2005 23:50:00
>Number:         29473
>Category:       port-sparc64
>Synopsis:       nfs + bus_dmamap_load_mbuf often results in a hang
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 20 23:50:00 +0000 2005
>Originator:     john heasley
>Release:        NetBSD 2.99.16
>Organization:
	
>Environment:
	
	
System: NetBSD guelah 2.0F NetBSD 2.0F (andrey) #8: Tue Jun 22 01:00:05 UTC 2004 root@guelah:/sys/arch/sparc64/compile/andrey sparc64
Architecture: sparc64
Machine: sparc64
>Description:
gem(4) uses bus_dmamap_load_mbuf for tx.  With a sparc64 box as an NFS server,
this often results in the box hanging.  Here is one trace,

kdb breakpoint at 11ab560
Stopped in pid 379.1 (nfsd) at  netbsd:cpu_Debugger+0x4:        nop
db> bt
intr_list_handler(3f07cc0, 6, e0017ed0, 8, 119fa54, 0) at netbsd:intr_list_handler+0x10
sparc_interrupt(7, e802000, f6ff128, 299db17da57a38c7, 4a79ae022228b7bc, f6ff450) at netbsd:sparc_interrupt+0x1d4
_bus_dmamap_load_mbuf(3f15c00, 444b800, 3ec1500, 401, ffffffffffffffef, f6ff5f0) at netbsd:_bus_dmamap_load_mbuf+0xa4
gem_start(4444060, 16fc, 16f8, d6, f6ff5f0, 44447c0) at netbsd:gem_start+0x84
ether_output(0, 3ec1d00, 3ee8488, 800, 3ef3428, 40) at netbsd:ether_output+0x358
ip_output(3ef2720, 4444060, 3ee8480, 3ee8488, 0, 3ec1de0) at netbsd:ip_output+0x5c8
udp_output(3ee8480, 3ee8420, c6, 10, 6, 3a) at netbsd:udp_output+0x254
udp_usrreq(3ee6d80, 9, 3ef4130, 3ef2c20, 0, ddddad0) at netbsd:udp_usrreq+0x1f0
sosend(0, 0, 0, 3ef4130, 0, 0) at netbsd:sosend+0x3c4
nfs_send(3ee6d80, 3ef2c20, 3ef4130, 0, ddddad0, 6000) at netbsd:nfs_send+0x9c
nfssvc_nfsd(0, ddddad0, ddd5800, f6ffbd0, 2, 1839ae0) at netbsd:nfssvc_nfsd+0x64c
sys_nfssvc(0, f6ffdd0, f6ffdc0, 0, f6ffdd0, 0) at netbsd:sys_nfssvc+0x310
syscall(f6ffed0, 9b, 405369e0, f6ffdd0, 405369e0, 405369e4) at netbsd:syscall+0xd4
?(4, 202d78, 18, ffffffffffffcc50, 0, 0) at 0x1008cb8

(gdb) list *(_bus_dmamap_load_mbuf+0xa4)
0x11a0f18 is in _bus_dmamap_load_mbuf (../../../../arch/sparc64/sparc64/machdep.c:1127).
1122                            long incr;
1123
1124                            incr = PAGE_SIZE - (vaddr & PGOFSET);
1125                            incr = min(buflen, incr);
1126
1127                            if (pmap_extract(pmap_kernel(), vaddr, &pa) == FALSE) {
1128    #ifdef DIAGNOSTIC
1129                                    printf("_bus_dmamap_load_mbuf: pmap_extract failed %lx\n",
1130                                           vaddr);
1131    #endif

I have not investigated the cause.
>How-To-Repeat:
sparc64 + gem + NFS server.  ATM, my NFS client is a sparc64 w/ a hme, but I
doubt this matters.
>Fix:

>Unformatted: