NFS quotas panic when NFS server has no rquotad

David Lee T.D.Lee at
Mon Apr 30 09:26:10 GMT 2001

On Fri, 27 Apr 2001, Michael Gerdts wrote:

> I posted the following bug report to samba at earlier this week:
>    Samba 2.2.0 on SPARC Solaris 8
>    Configured with:
>    ./configure --with-pam --with-syslog --with-quotas --with-msdfs \
>    	--with-acl-support
>    I am accessing the share \\server\mgerdts, which is itself an automounted
>    (NFS) directory.  That is, /home/mgerdts on server really exists on
>    nfsserver.  On nfsserver, rquotad is commented out of inetd.conf.
>    (more details deleted)
> Please disregard the patch that I sent to the samba at list.  I
> don't like its behavior.
> The problem seems to be that at quotas.c:341 clnt_create can return NULL.
> If quotastat is then 0 (RPC failed) or 3 (perm denied), a fake limit and
> usage of 1 block is assigned, and the nfs_quotas() continues.  At line 398,
> clnt is derefenced, causing a SEGV (if quotastat is 0).  
> In an environment where quotas are used on some servers but not on others,
> this is kinda broken.  What I would like to happen is to have it return
> quota information if rquotad responds and gives good information, else
> return file system free space.  It appears as though the first attached
> patch does that.  The second patch (I think) is cleaner code but has more
> lines of patch.
> Any chance of getting one of these committed?

Please could I encourage Mike's request to be addressed?

Our site relies heavily on quotas, and it is essential that error
processing is handled well.  Certainly this SEGV is unacceptable.

Indeed, we have just had some occurences of smbd processes (2.2.0, Solaris
7) "disappearing" and leaving oplocks behind.  (This has been compunded by
new processes being unable, for some reason, to clear these oplocks.)  The
only way to clear it was to shut down the whole samba service on the
machine (~100 simultaneous users) and restart it.

I confess that I have not yet tried to reproduce it exactly.  But the
problems in the source code are self-evident, and my limited time would be
better spent on other work for Samba (e.g. the "write"/"wall" idea, some
possible oplock problems) rather than chasing an already known (and,
indeed, potentially fixed) problem. 

Indeed, I am already busily chasing Veritas about a new problem concerning
Veritas/Solaris quotas in Samba (this time Samba seems to be innocent!). 
I hope to report back shortly to you on that separate quota problem. 

Please could one of the Samba Team seriously investigate Michael Gerdts'
analysis and suggested solutions. 


:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :

More information about the samba-technical mailing list