From owner-freebsd-stable@FreeBSD.ORG Sun Jun 13 01:52:17 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 07AD91065678 for ; Sun, 13 Jun 2010 01:52:17 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id B0EFE8FC12 for ; Sun, 13 Jun 2010 01:52:16 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEANvWE0yDaFvG/2dsb2JhbACef3G9SoUaBA X-IronPort-AV: E=Sophos;i="4.53,409,1272859200"; d="scan'208";a="80460236" Received: from amazon.cs.uoguelph.ca ([131.104.91.198]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 12 Jun 2010 21:52:14 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by amazon.cs.uoguelph.ca (Postfix) with ESMTP id D4B66210174; Sat, 12 Jun 2010 21:52:15 -0400 (EDT) X-Virus-Scanned: amavisd-new at amazon.cs.uoguelph.ca Received: from amazon.cs.uoguelph.ca ([127.0.0.1]) by localhost (amazon.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eCEYt+nuDM+W; Sat, 12 Jun 2010 21:52:14 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by amazon.cs.uoguelph.ca (Postfix) with ESMTP id CFAC4210170; Sat, 12 Jun 2010 21:52:14 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o5D28VI20450; Sat, 12 Jun 2010 22:08:31 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Sat, 12 Jun 2010 22:08:31 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Dmitry Pryanishnikov In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: 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 01:52:17 -0000 On Sun, 13 Jun 2010, Dmitry Pryanishnikov wrote: > 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 of the > experimental server. The nfsuserd(8) daemon must also be running. This > will occur if > > nfs_server_enable="YES" > nfsv4_server_enable="YES" > nfsuserd_enable="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.) 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. 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 and "nfsd" wouldn't load because it couldn't find "svcpool_destroy", just like you saw. 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?) --- 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);