Re: RE: Strange rpc.statd and mount_nfs
On 11-Jun-00 Matthew Dillon wrote: :Here is a rather suspicious fix, I have not looked at rpc call :use in detail: : :--- mount_nfs.c.origSat Jun 10 11:08:19 2000 :+++ mount_nfs.c Sat Jun 10 11:09:06 2000 :@@ -784,10 +784,11 @@ :warnx("%s", clnt_sperror(clp, :"bad MNT RPC")); :} else { :- auth_destroy(clp-cl_auth); :- clnt_destroy(clp); :retrycnt = 0; :} :+ auth_destroy(clp-cl_auth); :+ clnt_destroy(clp); :+ so = RPC_ANYSOCK; Good catch! This patch looks good to me, I am going to go ahead and commit it. Resetting 'so' is good code form, but I went through the rpc code and it wasn't an operational bug ... the rpc code can overwrite so in the case of a failure but only with '-1', which is RPC_ANYSOCK anyway. Still, it's good not to make assumptions. -Matt Without the "so = RPC_ANYSOCK" and no other changes, the "weak credential" failure turned into a "bad file descriptor" failure, so I think the non -1 socket fd is being reused. Perhaps the initialization of "so" should be moved into the retry loop. Jonathan Hanna [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RE: Strange rpc.statd and mount_nfs
::- auth_destroy(clp-cl_auth); ::- clnt_destroy(clp); ::retrycnt = 0; ::} ::+ auth_destroy(clp-cl_auth); ::+ clnt_destroy(clp); ::+ so = RPC_ANYSOCK; : : Good catch! This patch looks good to me, I am going to go ahead : and commit it. : : Resetting 'so' is good code form, but I went through the rpc code : and it wasn't an operational bug ... the rpc code can overwrite so : in the case of a failure but only with '-1', which is RPC_ANYSOCK : anyway. Still, it's good not to make assumptions. : : -Matt : :Without the "so = RPC_ANYSOCK" and no other changes, the "weak credential" :failure turned into a "bad file descriptor" failure, so I think the non -1 :socket fd is being reused. Perhaps the initialization of "so" should be moved :into the retry loop. : :Jonathan Hanna [EMAIL PROTECTED] Hmm. Yes, there does appear to be an issue there. The 'goto tryagain' on line 777 is leaving the clp and al_auth allocated as well, so there is a memory leak there too. I'll do a whole cleanup on the code and post a more involved patch. -Matt Matthew Dillon [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Strange rpc.statd and mount_nfs
As was pointed out, rcp.statd is supposed to have a large VSZ, but mount_nfs should not and my swap was getting used up. mount_nfs will do an RPC clntudp_create for every attempt, but only a clnt_destroy after a success. Here is a rather suspicious fix, I have not looked at rpc call use in detail: --- mount_nfs.c.origSat Jun 10 11:08:19 2000 +++ mount_nfs.c Sat Jun 10 11:09:06 2000 @@ -784,10 +784,11 @@ warnx("%s", clnt_sperror(clp, "bad MNT RPC")); } else { - auth_destroy(clp-cl_auth); - clnt_destroy(clp); retrycnt = 0; } + auth_destroy(clp-cl_auth); + clnt_destroy(clp); + so = RPC_ANYSOCK; } } if (--retrycnt 0) { On 08-Jun-00 Jonathan Hanna wrote: I am running a fairly recent current and noticed my swap seemed a little overused. bash-2.02$ uname -a FreeBSD roller.pangolin-systems.com 5.0-CURRENT FreeBSD 5.0-CURRENT #41: Sun May 14 11:50:20 PDT 2000 [EMAIL PROTECTED] sy stems.com:/home/src/sys/compile/ROLLER i386 bash-2.02$ uptime 11:27PM up 3 days, 5:15, 7 users, load averages: 0.21, 0.17, 0.14 ps shows: ... 0 212 1 29 2 0 2630360 select IWs ??0:00.00 rpc.stat This is expected. This looks big. 0 1382 1 0 2 0 3716 352 select I ??0:01.02 xterm -geometry 80x25 -fg springgree ... 1000 1504 1 0 10 0 86368 408 nanslp Is??0:07.93 nfs -o bg -o noauto ghost-p1:/home/j This seems rather large as well. Not expected. ... I do remember an nfs mount failing and perhaps being backgrounded. This was it, in normal circumstances the problem would not show up. I guess I shouldn't be leaving failing mounts around! Jonathan Hanna [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RE: Strange rpc.statd and mount_nfs
:Here is a rather suspicious fix, I have not looked at rpc call :use in detail: : :--- mount_nfs.c.origSat Jun 10 11:08:19 2000 :+++ mount_nfs.c Sat Jun 10 11:09:06 2000 :@@ -784,10 +784,11 @@ :warnx("%s", clnt_sperror(clp, :"bad MNT RPC")); :} else { :- auth_destroy(clp-cl_auth); :- clnt_destroy(clp); :retrycnt = 0; :} :+ auth_destroy(clp-cl_auth); :+ clnt_destroy(clp); :+ so = RPC_ANYSOCK; Good catch! This patch looks good to me, I am going to go ahead and commit it. Resetting 'so' is good code form, but I went through the rpc code and it wasn't an operational bug ... the rpc code can overwrite so in the case of a failure but only with '-1', which is RPC_ANYSOCK anyway. Still, it's good not to make assumptions. -Matt To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Strange rpc.statd and mount_nfs
I have the same problem with 4.0-STABLE, cvsup'ed June 2. I just turned rpc.statd off in /etc/rc.conf. Tom Schottle [EMAIL PROTECTED] Jonathan Hanna wrote: I am running a fairly recent current and noticed my swap seemed a little overused. bash-2.02$ uname -a FreeBSD roller.pangolin-systems.com 5.0-CURRENT FreeBSD 5.0-CURRENT #41: Sun May 14 11:50:20 PDT 2000 [EMAIL PROTECTED] stems.com:/home/src/sys/compile/ROLLER i386 bash-2.02$ uptime 11:27PM up 3 days, 5:15, 7 users, load averages: 0.21, 0.17, 0.14 ps shows: 0 212 1 29 2 0 2630360 select IWs ??0:00.00 rpc.statd To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Strange rpc.statd and mount_nfs
Tom Schottle writes: I have the same problem with 4.0-STABLE, cvsup'ed June 2. I just turned rpc.statd off in /etc/rc.conf. Tom Schottle [EMAIL PROTECTED] Jonathan Hanna wrote: I am running a fairly recent current and noticed my swap seemed a little overused. bash-2.02$ uname -a FreeBSD roller.pangolin-systems.com 5.0-CURRENT FreeBSD 5.0-CURRENT #41: Sun May 14 11:50:20 PDT 2000 [EMAIL PROTECTED] stems.com:/home/src/sys/compile/ROLLER i386 bash-2.02$ uptime 11:27PM up 3 days, 5:15, 7 users, load averages: 0.21, 0.17, 0.14 ps shows: 0 212 1 29 2 0 2630360 select IWs ??0:00.00 rpc.stat d This question has been correctly answered in the past. Look in the mail archives. --- Gary Jennejohn / [EMAIL PROTECTED] [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message