George Mamalakis
2010-Feb-19 15:44 UTC
mountd segfaults in NFSv4 if -alldirs is present in exports
Hi all, the title explains it all... But ok, let's be a bit more extensive. If I have one line in /etc/exports reading: V4: / -alldirs and try to start mountd, it segfaults with signal 11. From the manpage I read that -alldirs is the "second method" used to export a filesystem and V4 is the "third", maybe implying that they are mutually exclusive. Nevertheless, I suppose that mountd shouldn't segfault in my case, it could just refuse to start giving an error message or something. I've tried a different /etc/exports containing a dummy option -dummy instead of -alldirs and mountd won't segfault, hence there's no problem with its parser. -- George Mamalakis IT Officer Electrical and Computer Engineer (Aristotle Un. of Thessaloniki), MSc (Imperial College of London) Department of Electrical and Computer Engineering Faculty of Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379
George Mamalakis
2010-Feb-19 15:51 UTC
mountd segfaults in NFSv4 if -alldirs is present in exports
On 19/02/2010 17:44, George Mamalakis wrote:> Hi all, > > the title explains it all... > > But ok, let's be a bit more extensive. > > If I have one line in /etc/exports reading: > > V4: / -alldirs > > and try to start mountd, it segfaults with signal 11. From the manpage > I read that -alldirs is the "second method" used to export a > filesystem and V4 is the "third", maybe implying that they are > mutually exclusive. Nevertheless, I suppose that mountd shouldn't > segfault in my case, it could just refuse to start giving an error > message or something. I've tried a different /etc/exports containing a > dummy option -dummy instead of -alldirs and mountd won't segfault, > hence there's no problem with its parser. >oops, forgotten system info: # uname -a FreeBSD lala 8.0-STABLE FreeBSD 8.0-STABLE #0: Fri Feb 19 11:45:56 EET 2010 root@lala:/usr/obj/usr/src/sys/MAMALOPYRINO-NFS4 i386 my custom kernel has the follwoing differences from GENERIC: # diff GENERIC MAMALOPYRINO-NFS4 21,22c21,22 < cpu I486_CPU < cpu I586_CPU --- > #cpu I486_CPU > #cpu I586_CPU 24c24 < ident GENERIC --- > ident MAMALOPYRINO-NFS4 49c49,50 < options NFSSERVER # Network Filesystem Server --- > options NFSD # Network Filesystem Server > #options NFSSERVER # Network Filesystem Server 332c333 < device firewire # FireWire bus code --- > #device firewire # FireWire bus code 334,337c335,338 < device fwe # Ethernet over FireWire (non-standard!) < device fwip # IP over FireWire (RFC 2734,3146) < device dcons # Dumb console driver < device dcons_crom # Configuration ROM for dcons --- > #device fwe # Ethernet over FireWire (non-standard!) > #device fwip # IP over FireWire (RFC 2734,3146) > #device dcons # Dumb console driver > #device dcons_crom # Configuration ROM for dcons Which means that I have all firewire commented out (since fbsd8 kernel panics on my msi gt627 otherwise, but that's another issue), and I have NFSD instead of NFSSERVER as an option. Cheers all. -- George Mamalakis IT Officer Electrical and Computer Engineer (Aristotle Un. of Thessaloniki), MSc (Imperial College of London) Department of Electrical and Computer Engineering Faculty of Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379
Rick Macklem
2010-Feb-19 16:13 UTC
mountd segfaults in NFSv4 if -alldirs is present in exports
On Fri, 19 Feb 2010, George Mamalakis wrote:> Hi all, > > the title explains it all... > > But ok, let's be a bit more extensive. > > If I have one line in /etc/exports reading: > > V4: / -alldirs > > and try to start mountd, it segfaults with signal 11. From the manpage I read > that -alldirs is the "second method" used to export a filesystem and V4 is > the "third", maybe implying that they are mutually exclusive. Nevertheless, I > suppose that mountd shouldn't segfault in my case, it could just refuse to > start giving an error message or something. I've tried a different > /etc/exports containing a dummy option -dummy instead of -alldirs and mountd > won't segfault, hence there's no problem with its parser. >The "V4:" line does not export a file system. It only specifies where the "root" is for NFSv4 and what clients/security flavours are supported for the NFSv4 lock state Ops that aren't associated with any file handle is. (There can be multiple V4: lines for different hosts, but they should differ in their "-sec" specification and only that.) The file systems must still be exported by separate lines, just like NFSv2,3. It happens that "-alldirs" always applies to NFSv4, since it does not use the Mount protocol and can mount anything under the "root" that has been exported. As such, "-sec" plus the ones related to specifying host(s) "-network, -mask" are the only ones that should be in the "V4:" line(s). But, of course it shouldn't segfault. I'll put that on my to do list. Thanks for reporting it, rick