FreeBSD 9 64bit with ZFS crashes every 3 days

I'm trying the following patch from now, will report 2-3 days later whether the problem still persists.

http://people.freebsd.org/~rmacklem/namei-leak.patch
Code:
--- fs/nfsserver/nfs_nfsdport.c.sav	2012-04-25 16:50:05.000000000 -0400
+++ fs/nfsserver/nfs_nfsdport.c	2012-04-25 17:08:43.000000000 -0400
@@ -1047,6 +1047,8 @@ nfsvno_removesub(struct nameidata *ndp, 
 	else
 		vput(ndp->ni_dvp);
 	vput(vp);
+	if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0)
+		nfsvno_relpathbuf(ndp);
 	NFSEXITCODE(error);
 	return (error);
 }
@@ -1086,6 +1088,8 @@ out:
 	else
 		vput(ndp->ni_dvp);
 	vput(vp);
+	if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0)
+		nfsvno_relpathbuf(ndp);
 	NFSEXITCODE(error);
 	return (error);
 }
 
Seems the problem has been resolved by applying the patch above. My servers are running for more than two days, however the memory is still able to maintain 2GB free after flushing it.

I can assume that the memory leak issue is gone.

Below are the steps of applying the patch:
Code:
pkg_add -r wget
cd /usr/src/sys
/usr/local/bin/wget http://people.freebsd.org/~rmacklem/namei-leak.patch
patch < namei-leak.patch
cd /usr/src
make buildkernel
make installkernel

reboot

http://people.freebsd.org/~rmacklem/namei-leak.patch
Code:
--- fs/nfsserver/nfs_nfsdport.c.sav	2012-04-25 16:50:05.000000000 -0400
+++ fs/nfsserver/nfs_nfsdport.c	2012-04-25 17:08:43.000000000 -0400
@@ -1047,6 +1047,8 @@ nfsvno_removesub(struct nameidata *ndp, 
 	else
 		vput(ndp->ni_dvp);
 	vput(vp);
+	if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0)
+		nfsvno_relpathbuf(ndp);
 	NFSEXITCODE(error);
 	return (error);
 }
@@ -1086,6 +1088,8 @@ out:
 	else
 		vput(ndp->ni_dvp);
 	vput(vp);
+	if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0)
+		nfsvno_relpathbuf(ndp);
 	NFSEXITCODE(error);
 	return (error);
 }

May I know: will it merge into the next release of FreeBSD 9?
 
Back
Top