From nz@thiemo.net  Fri Apr 10 10:36:02 2009
Return-Path: <nz@thiemo.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 518E51065673
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Apr 2009 10:36:02 +0000 (UTC)
	(envelope-from nz@thiemo.net)
Received: from excalibur.ronald.org (excalibur.ronald.org [212.17.241.232])
	by mx1.freebsd.org (Postfix) with ESMTP id AA4D28FC14
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Apr 2009 10:36:01 +0000 (UTC)
	(envelope-from nz@thiemo.net)
Received: from styx.ham01.thiemo.net (port-195-158-176-42.dynamic.qsc.de [195.158.176.42])
	by excalibur.ronald.org (8.13.8+Sun/8.13.8) with ESMTP id n3AADSix008007
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Apr 2009 12:13:36 +0200 (CEST)
Received: from mygiea.ham01.thiemo.net (localhost [127.0.0.1])
	by styx.ham01.thiemo.net (8.14.3/8.14.3) with ESMTP id n3AADJ7T025112
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Apr 2009 12:13:23 +0200 (CEST)
Received: (from thiemo@localhost)
	by feynman.ham01.thiemo.net (8.14.3/8.14.3/Submit) id n3AA3QiC002444;
	Fri, 10 Apr 2009 12:03:26 +0200 (CEST)
	(envelope-from thiemo)
Message-Id: <200904101003.n3AA3QiC002444@feynman.ham01.thiemo.net>
Date: Fri, 10 Apr 2009 12:03:26 +0200 (CEST)
From: Thiemo Nordenholz <list+kilncd01jljrzlqt@thiemo.net>
Reply-To: Thiemo Nordenholz <list+kilncd01jljrzlqt@thiemo.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: security/cfs rc script needs "mntudp" option on 8-CURRENT
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         133563
>Category:       ports
>Synopsis:       security/cfs rc script needs "mntudp" option on 8-CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    crees
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 10 10:40:01 UTC 2009
>Closed-Date:    Wed Aug 17 10:52:27 UTC 2011
>Last-Modified:  Wed Aug 17 11:00:24 UTC 2011
>Originator:     Thiemo Nordenholz
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 8.0-CURRENT as of April 3, 2009
        Ports collection as of April 10, 2009


>Description:
	Installed and started the CFS port (cfs-1.4.1_5).
	
	When /usr/local/etc/rc.d/cfsd tries to mount the cfsd-bootstrap
	directory over local NFS (in cfsd_poststart()), mount_nfs will
	hang, causing a log entry every second:
	
	Apr  9 17:52:26 feynman kernel: TCP: [127.0.0.1]:616 to
	[127.0.0.1]:3049 tcpflags 0x2<SYN>; tcp_input: Connection attempt 
	to closed port
	
	Attempts to kill mount_nfs failed.
	
	The issue was solved by adding the "mntudp" option to the init
	script so that cfsd_poststart() now does:
	
	mount -o port="$cfsd_port",nfsv2,mntudp
		localhost:/usr/local/cfsd-bootstrap "$cfsd_mountpoint"
	
>How-To-Repeat:
	On 8-CURRENT:
	Install cfsd port, and prepare system as describe in the port's 
	pkg-message. Start cfsd, problem will occur.
>Fix:

	Add the "mntudp" option to /usr/local/etc/rc.d/cfsd.
	However, this needs only to be done on CURRENT systems - if I had
	a good idea how to integrate this in the port, I'd submit a patch,
	but making an OSVERSION dependant hack in the Makefile seems a bit
	dirty.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sylvio 
Responsible-Changed-By: sylvio 
Responsible-Changed-When: Sun May 9 01:39:54 UTC 2010 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133563 

From: Sylvio Cesar Teixeira <sylvio@FreeBSD.org>
To: bug-followup@FreeBSD.org, list+kilncd01jljrzlqt@thiemo.net
Cc:  
Subject: Re: ports/133563: security/cfs rc script needs "mntudp" option on
 8-CURRENT
Date: Sat, 08 May 2010 22:39:20 -0300

 Hi, do you have a patch to this?
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: sylvio 
State-Changed-When: Sun May 9 02:17:05 UTC 2010 
State-Changed-Why:  
- Waiting feedback of submitter. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133563 

From: Thiemo Nordenholz <listmember@thiemo.net>
To: Sylvio Cesar Teixeira <sylvio@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/133563: security/cfs rc script needs "mntudp" option on 8-CURRENT
Date: Mon, 10 May 2010 16:14:36 +0200

 Hi,
 
 > Hi, do you have a patch to this?
 
 No. As suggested in my "Fix" section, this seems to be release-dependent,
 and I had no good idea how to build this into the ports framework. Someone
 with more insight in the ports' Makefile workings might come up with a good
 idea easily... I hope.
 
 Cheers,
   Thiemo
 
 -- 
 Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629.
 Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml
Responsible-Changed-From-To: sylvio->freebsd-ports-bugs 
Responsible-Changed-By: sylvio 
Responsible-Changed-When: Tue Jul 20 13:29:19 UTC 2010 
Responsible-Changed-Why:  
back to pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133563 
State-Changed-From-To: feedback->open 
State-Changed-By: shaun 
State-Changed-When: Thu Sep 9 04:28:45 UTC 2010 
State-Changed-Why:  
Feedback received. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133563 

From: Yar Tikhiy <yar@freebsd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/133563: security/cfs rc script needs "mntudp" option on 8-CURRENT
Date: Fri, 14 Jan 2011 10:38:29 +1100

 Hi there,
 
 This problem report is still relevant.  Please note that the original
 discussion missed a few points.
 
 First of all, the suggested fix is not quite correct.  The mount
 option needed here is spelled "udp" not "mntudp", the difference being
 that "mntudp" is to force _mount_ protocol to UDP transport and it
 does so to NFS protocol, too, only as a side effect in more recent
 mount_nfs revisions.
 
 Cfsd is an old NFS daemon and it has no support for TCP transport
 soever.  Hence the error:
 
 [tcp] localhost:/usr/local/cfsd-bootstrap: nfsd: RPCPROG_NFS: RPC:
 Remote system error - Connection refused
 [tcp6] localhost:/usr/local/cfsd-bootstrap: nfsd: RPCPROG_NFS: RPC:
 Remote system error - Connection refused
 
 The fix indeed is FreeBSD version specific.  Unfortunately, historic
 mount_nfs revisions had no "udp" option because it was default.
 
 The workaround can be to use %%FOO%% magic to insert the udp option in
 cfsd.sh.in if the OS version is 8.x or newer.  The resulting mount_nfs
 opts need to look like this (in any order):
 
 udp,port="$cfsd_port",nfsv2
 
 Thanks,
 Yar

From: Yar Tikhiy <yar@freebsd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/133563: security/cfs rc script needs "mntudp" option on 8-CURRENT
Date: Thu, 5 May 2011 15:50:59 +1000

 FWIW, there is a simple workaround to this issue.  Just set cfsd_port
 in rc.conf as follows:
 
 cfsd_port="3049,udp"
 
 This argument will be passed to cfsd as well as to mount_nfs, but cfsd
 doesn't seem to care about the `,udp' trailer.  Cfsd expects a port
 number as its only argument but it doesn't seem to check if the
 argument is entirely numeric -- a bug very common to older code using
 atoi() or strtol(foo, NULL, ...).
 
 Yar
Responsible-Changed-From-To: freebsd-ports-bugs->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Wed Aug 17 10:44:35 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133563 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Wed Aug 17 10:52:26 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133563 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/133563: commit references a PR
Date: Wed, 17 Aug 2011 10:52:21 +0000 (UTC)

 crees       2011-08-17 10:52:12 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/cfs         Makefile 
     security/cfs/files   cfsd.sh.in 
   Log:
   Fix rc script to stop nfs hangs
   
   PR:             ports/133563
   Submitted by:   Thiemo Nordenholz <list@thiemo.net>, yar
   
   Revision  Changes    Path
   1.27      +1 -1      ports/security/cfs/Makefile
   1.3       +5 -3      ports/security/cfs/files/cfsd.sh.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
