Re: Testing new nfs and VIMAGE
For the list: Attached patch works. /glz --On May 28, 2011 19:28:43 -0400 Rick Macklem rmack...@uoguelph.ca wrote: It worked when I added CURVNET_SET/CURVNET_RESTORE around the RTFREE_LOCKED macro too. Attached a complete patch. Thank you. and thanks for finding/reporting/testing it. I've attached another variant of the patch that maybe you could try? (I don't think it's necessary to do twice, so I just moved the CURVNET_RESTORE() to after the RTFREE_LOCKED() macro instead.) I don't know if you are a committer for this stuff or not? If you are feel free to commit whichever variant of the patch you find works and prefer. If not, maybe bz@ could either commit it or review it? (or whoever is doing the VIMAGE stuff these days?) rick --- fs/nfsclient/nfs_clport.c.sav 2011-05-04 19:12:10.0 -0400 +++ fs/nfsclient/nfs_clport.c 2011-05-28 19:14:30.0 -0400 @@ -943,6 +943,7 @@ nfscl_getmyip(struct nfsmount *nmp, int sad.sin_family = AF_INET; sad.sin_len = sizeof (struct sockaddr_in); sad.sin_addr.s_addr = sin-sin_addr.s_addr; + CURVNET_SET(TD_TO_VNET(curthread)); rt = rtalloc1((struct sockaddr *)sad, 0, 0UL); if (rt != NULL) { if (rt-rt_ifp != NULL @@ -956,6 +957,7 @@ nfscl_getmyip(struct nfsmount *nmp, int } RTFREE_LOCKED(rt); } + CURVNET_RESTORE(); #ifdef INET6 } else if (nmp-nm_nam-sa_family == AF_INET6) { struct sockaddr_in6 sad6, *sin6; @@ -966,6 +968,7 @@ nfscl_getmyip(struct nfsmount *nmp, int sad6.sin6_family = AF_INET6; sad6.sin6_len = sizeof (struct sockaddr_in6); sad6.sin6_addr = sin6-sin6_addr; + CURVNET_SET(TD_TO_VNET(curthread)); rt = rtalloc1((struct sockaddr *)sad6, 0, 0UL); if (rt != NULL) { if (rt-rt_ifp != NULL @@ -980,6 +983,7 @@ nfscl_getmyip(struct nfsmount *nmp, int } RTFREE_LOCKED(rt); } + CURVNET_RESTORE(); #endif } return (retp); ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Testing new nfs and VIMAGE
--On Friday, May 27, 2011 7:03 PM -0400 Rick Macklem rmack...@uoguelph.ca wrote: And the attached core.txt got eaten. http://people.hidden-powers.com/~glz/core.txt.3 /glz --On May 27, 2011 10:37:32 +0200 Goran Lowkrantz g...@hidden-powers.com wrote: I have been testing VIMAGE a lot lately to see how it works an all my test cases works as expected except when I use NFSv4 from an NFS client with a kerrel with VIMAGE enabled. All other permutations work and this error is very specific. All crashes occurs when trying to read or write to an NFS v4 volume. I have seen it on both i386 and amd64. # 12 0xc0a73c15 in rt_tables_get_rnh (table=0, fam=2) at /usr/src/sys/net/route.c:153 static __inline struct radix_node_head ** rt_tables_get_rnh_ptr(int table, int fam) { struct radix_node_head **rnh; KASSERT(table = 0 table rt_numfibs, (%s: table out of bounds., __func__)); KASSERT(fam = 0 fam (AF_MAX+1), (%s: fam out of bounds., __func__)); /* rnh is [fib=0][af=0]. */ --- rnh = (struct radix_node_head **)V_rt_tables; /* Get the offset to the requested table and fam. */ rnh += table * (AF_MAX+1) + fam; return (rnh); } Any ideas? Cores and dumps are available plus a vmware player setup to test and debug. I know diddly about VIMAGE, but you could try the attached patch which imitates what is done other places. If the patch isn't attached, you can find it at: http://people.freebsd.org/~rmacklem/vnet.patch rick It worked when I added CURVNET_SET/CURVNET_RESTORE around the RTFREE_LOCKED macro too. Attached a complete patch. Thank you. /glz --- fs/nfsclient/nfs_clport.c.orig 2011-05-19 03:35:52.0 +0200 +++ fs/nfsclient/nfs_clport.c 2011-05-28 11:03:16.563178326 +0200 @@ -943,7 +943,9 @@ nfscl_getmyip(struct nfsmount *nmp, int sad.sin_family = AF_INET; sad.sin_len = sizeof (struct sockaddr_in); sad.sin_addr.s_addr = sin-sin_addr.s_addr; + CURVNET_SET(TD_TO_VNET(curthread)); rt = rtalloc1((struct sockaddr *)sad, 0, 0UL); + CURVNET_RESTORE(); if (rt != NULL) { if (rt-rt_ifp != NULL rt-rt_ifa != NULL @@ -954,7 +956,9 @@ nfscl_getmyip(struct nfsmount *nmp, int laddr.s_addr = sin-sin_addr.s_addr; retp = (u_int8_t *)laddr; } + CURVNET_SET(TD_TO_VNET(curthread)); RTFREE_LOCKED(rt); + CURVNET_RESTORE(); } #ifdef INET6 } else if (nmp-nm_nam-sa_family == AF_INET6) { @@ -966,7 +970,9 @@ nfscl_getmyip(struct nfsmount *nmp, int sad6.sin6_family = AF_INET6; sad6.sin6_len = sizeof (struct sockaddr_in6); sad6.sin6_addr = sin6-sin6_addr; + CURVNET_SET(TD_TO_VNET(curthread)); rt = rtalloc1((struct sockaddr *)sad6, 0, 0UL); + CURVNET_RESTORE(); if (rt != NULL) { if (rt-rt_ifp != NULL rt-rt_ifa != NULL @@ -978,7 +984,9 @@ nfscl_getmyip(struct nfsmount *nmp, int retp = (u_int8_t *)laddr6; *isinet6p = 1; } + CURVNET_SET(TD_TO_VNET(curthread)); RTFREE_LOCKED(rt); + CURVNET_RESTORE(); } #endif } ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Testing new nfs and VIMAGE
I have been testing VIMAGE a lot lately to see how it works an all my test cases works as expected except when I use NFSv4 from an NFS client with a kerrel with VIMAGE enabled. All other permutations work and this error is very specific. All crashes occurs when trying to read or write to an NFS v4 volume. I have seen it on both i386 and amd64. #12 0xc0a73c15 in rt_tables_get_rnh (table=0, fam=2) at /usr/src/sys/net/route.c:153 static __inline struct radix_node_head ** rt_tables_get_rnh_ptr(int table, int fam) { struct radix_node_head **rnh; KASSERT(table = 0 table rt_numfibs, (%s: table out of bounds., __func__)); KASSERT(fam = 0 fam (AF_MAX+1), (%s: fam out of bounds., __func__)); /* rnh is [fib=0][af=0]. */ ---rnh = (struct radix_node_head **)V_rt_tables; /* Get the offset to the requested table and fam. */ rnh += table * (AF_MAX+1) + fam; return (rnh); } Any ideas? Cores and dumps are available plus a vmware player setup to test and debug. /glz Dump header from device /dev/da0p3 Architecture: i386 Architecture Version: 2 Dump Length: 105414656B (100 MB) Blocksize: 512 Dumptime: Fri May 27 09:54:13 2011 Hostname: vserver.test.ismobile.com Magic: FreeBSD Kernel Dump Version String: FreeBSD 9.0-CURRENT #2: Fri May 27 03:45:23 CEST 2011 r...@nfsserver.test.hidden-powers.com:/usr/obj/usr/src/sys/VSERVER Panic String: from debugger Dump Parity: 3851082861 Bounds: 3 Dump Status: good --- There is hopeful symbolism in the fact that flags do not wave in a vacuum. -- Arthur C. Clarke ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Testing new nfs and VIMAGE
And the attached core.txt got eaten. http://people.hidden-powers.com/~glz/core.txt.3 /glz --On May 27, 2011 10:37:32 +0200 Goran Lowkrantz g...@hidden-powers.com wrote: I have been testing VIMAGE a lot lately to see how it works an all my test cases works as expected except when I use NFSv4 from an NFS client with a kerrel with VIMAGE enabled. All other permutations work and this error is very specific. All crashes occurs when trying to read or write to an NFS v4 volume. I have seen it on both i386 and amd64. # 12 0xc0a73c15 in rt_tables_get_rnh (table=0, fam=2) at /usr/src/sys/net/route.c:153 static __inline struct radix_node_head ** rt_tables_get_rnh_ptr(int table, int fam) { struct radix_node_head **rnh; KASSERT(table = 0 table rt_numfibs, (%s: table out of bounds., __func__)); KASSERT(fam = 0 fam (AF_MAX+1), (%s: fam out of bounds., __func__)); /* rnh is [fib=0][af=0]. */ ---rnh = (struct radix_node_head **)V_rt_tables; /* Get the offset to the requested table and fam. */ rnh += table * (AF_MAX+1) + fam; return (rnh); } Any ideas? Cores and dumps are available plus a vmware player setup to test and debug. /glz Dump header from device /dev/da0p3 Architecture: i386 Architecture Version: 2 Dump Length: 105414656B (100 MB) Blocksize: 512 Dumptime: Fri May 27 09:54:13 2011 Hostname: vserver.test.ismobile.com Magic: FreeBSD Kernel Dump Version String: FreeBSD 9.0-CURRENT #2: Fri May 27 03:45:23 CEST 2011 r...@nfsserver.test.hidden-powers.com:/usr/obj/usr/src/sys/VSERVER Panic String: from debugger Dump Parity: 3851082861 Bounds: 3 Dump Status: good --- There is hopeful symbolism in the fact that flags do not wave in a vacuum. -- Arthur C. Clarke ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org --- There is hopeful symbolism in the fact that flags do not wave in a vacuum. -- Arthur C. Clarke ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Testing new nfs and VIMAGE
And the attached core.txt got eaten. http://people.hidden-powers.com/~glz/core.txt.3 /glz --On May 27, 2011 10:37:32 +0200 Goran Lowkrantz g...@hidden-powers.com wrote: I have been testing VIMAGE a lot lately to see how it works an all my test cases works as expected except when I use NFSv4 from an NFS client with a kerrel with VIMAGE enabled. All other permutations work and this error is very specific. All crashes occurs when trying to read or write to an NFS v4 volume. I have seen it on both i386 and amd64. # 12 0xc0a73c15 in rt_tables_get_rnh (table=0, fam=2) at /usr/src/sys/net/route.c:153 static __inline struct radix_node_head ** rt_tables_get_rnh_ptr(int table, int fam) { struct radix_node_head **rnh; KASSERT(table = 0 table rt_numfibs, (%s: table out of bounds., __func__)); KASSERT(fam = 0 fam (AF_MAX+1), (%s: fam out of bounds., __func__)); /* rnh is [fib=0][af=0]. */ --- rnh = (struct radix_node_head **)V_rt_tables; /* Get the offset to the requested table and fam. */ rnh += table * (AF_MAX+1) + fam; return (rnh); } Any ideas? Cores and dumps are available plus a vmware player setup to test and debug. I know diddly about VIMAGE, but you could try the attached patch which imitates what is done other places. If the patch isn't attached, you can find it at: http://people.freebsd.org/~rmacklem/vnet.patch rick --- fs/nfsclient/nfs_clport.c.sav 2011-05-04 19:12:10.0 -0400 +++ fs/nfsclient/nfs_clport.c 2011-05-27 18:52:11.0 -0400 @@ -943,7 +943,9 @@ nfscl_getmyip(struct nfsmount *nmp, int sad.sin_family = AF_INET; sad.sin_len = sizeof (struct sockaddr_in); sad.sin_addr.s_addr = sin-sin_addr.s_addr; + CURVNET_SET(TD_TO_VNET(curthread)); rt = rtalloc1((struct sockaddr *)sad, 0, 0UL); + CURVNET_RESTORE(); if (rt != NULL) { if (rt-rt_ifp != NULL rt-rt_ifa != NULL @@ -966,7 +968,9 @@ nfscl_getmyip(struct nfsmount *nmp, int sad6.sin6_family = AF_INET6; sad6.sin6_len = sizeof (struct sockaddr_in6); sad6.sin6_addr = sin6-sin6_addr; + CURVNET_SET(TD_TO_VNET(curthread)); rt = rtalloc1((struct sockaddr *)sad6, 0, 0UL); + CURVNET_RESTORE(); if (rt != NULL) { if (rt-rt_ifp != NULL rt-rt_ifa != NULL ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org