From owner-freebsd-stable@FreeBSD.ORG Sun Jun 13 04:39:06 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CD13106566C for ; Sun, 13 Jun 2010 04:39:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 277B68FC15 for ; Sun, 13 Jun 2010 04:39:05 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o5D4cr8N088830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Jun 2010 07:38:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o5D4crFE080925; Sun, 13 Jun 2010 07:38:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o5D4crF8080924; Sun, 13 Jun 2010 07:38:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 13 Jun 2010 07:38:53 +0300 From: Kostik Belousov To: Rick Macklem Message-ID: <20100613043853.GR13238@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6eUvXotnMb6+obQB" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Dmitry Pryanishnikov , freebsd-stable@freebsd.org Subject: Re: nfsv4_server_enable="YES": link_elf: symbol svcpool_destroy undefined X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2010 04:39:06 -0000 --6eUvXotnMb6+obQB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 12, 2010 at 10:08:31PM -0400, Rick Macklem wrote: >=20 >=20 > On Sun, 13 Jun 2010, Dmitry Pryanishnikov wrote: >=20 > >Hello! > > > > I'm trying to start the experimental NFSv4 server in RELENG_8 w/o > >building it into the kernel, as nfsv4(4) suggests: > > > >... or start mountd(8) and nfsd(8) with the ``-e'' option to force use o= f=20 > >the > > experimental server. The nfsuserd(8) daemon must also be running. = =20 > > This > > will occur if > > > > nfs_server_enable=3D"YES" > > nfsv4_server_enable=3D"YES" > > nfsuserd_enable=3D"YES" > > > > are set in rc.conf(5). > > > >However, mountd fails to start nfsd; the same problem exists when > >doing it by hands: "kldload nfsd" gives > > > >kernel: link_elf: symbol svcpool_destroy undefined > > > >error. Can this problem be solved w/o building kernel with "options NFSD= "? > > > Well, if you build a kernel with any of the options that cause "krpc" > to be compiled into the kernel, it works. (I usually test with a GENERIC > kernel that has NFSCLIENT and NFSSERVER defined in it, so nfsd.ko loads > fine.) >=20 > Basically "nfsd" is defined as dependent on "nfscommon", then > "nfscommon" is defined as dependent on "krpc" and "nfssvc". This > gets everthing to load, but when it tries to load "nfsd.ko", it > can't find the symbols in "krpc.ko" or "nfssvc.ko" if they weren't > linked into the kernel. >=20 > For example, here's what I saw: > nfsv4-laptop# kldstat > Id Refs Address Size Name > 1 12 0xc0400000 d1f338 kernel > 4 1 0xc2eff000 1e000 nfsclient.ko > 5 1 0xc2ea9000 2000 nfs_common.ko > 6 2 0xc2f1d000 15000 krpc.ko > 11 1 0xc2fe3000 16000 nfscommon.ko > 12 1 0xc2fc5000 2000 nfssvc.ko > nfsv4-laptop# nm /boot/nkernel/krpc.ko | fgrep svcpool > 0000cdf0 t svcpool_active > 0000de40 t svcpool_create > 0000e590 t svcpool_destroy > 0000e1d0 t svcpool_maxthread_sysctl > 0000e2b0 t svcpool_minthread_sysctl >=20 > and "nfsd" wouldn't load because it couldn't find "svcpool_destroy", > just like you saw. >=20 > If you apply this patch and rebuild the module, it will find the > symbols. (Is that what is supposed to happen or is something broken?) >=20 > --- fs/nfsserver/nfs_nfsdport.c.sav 2010-06-12 20:27:53.000000000 -0400 > +++ fs/nfsserver/nfs_nfsdport.c 2010-06-12 20:37:09.000000000 -0400 > @@ -3147,4 +3147,6 @@ > MODULE_VERSION(nfsd, 1); > MODULE_DEPEND(nfsd, nfscommon, 1, 1, 1); > MODULE_DEPEND(nfsd, nfslockd, 1, 1, 1); > +MODULE_DEPEND(nfsd, krpc, 1, 1, 1); > +MODULE_DEPEND(nfsd, nfssvc, 1, 1, 1); I think the patch is right, this is how symbol resolution is supposed to work. --6eUvXotnMb6+obQB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkwUYNwACgkQC3+MBN1Mb4gNhgCfXc2SCgPEZTxtdAYgOm3oDiN5 QgcAoIAhG9fYLCaXtxAoDKTwzSwJccE+ =ELpO -----END PGP SIGNATURE----- --6eUvXotnMb6+obQB--