Project

General

Profile

Bug #6257

First nfsauth_retrieve() is never cached in nfsauth_cache_get()

Added by Marcel Telka about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
nfs - NFS server and client
Start date:
2015-09-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

During some testing I noticed that the first nfsauth_retrieve() from nfsauth_cache_get() is never cached, so for every client I saw two nfsauth_retrieve() calls.

The problem is easily reproducible. Just make sure the nfsauth cache is clean by either unshare and share a dataset, or simply restart the nfs/server SMF service. Then initiate some NFS traffic from one client. You will see this on the server:

# dtrace -n 'nfsauth_retrieve:entry{}'
dtrace: description 'nfsauth_retrieve:entry' matched 1 probe
CPU     ID                    FUNCTION:NAME
  0  62384           nfsauth_retrieve:entry
  0  62384           nfsauth_retrieve:entry

The root cause is here in nfsauth_cache_get() - there are missing curly braces:

1018            /*
1019             * If we failed to preallocate the memory for
1020             * supplemental groups, we won't cache the retrieved
1021             * data.
1022             */
1023            if (p->auth_clnt_ngids != 0 &&
1024                p->auth_clnt_gids == NULL)
1025                p->auth_clnt_ngids = 0;
1026                mutex_exit(&p->auth_lock);
1027
1028                p = NULL;
1029
1030                goto retrieve;

Fortunately, this issue is mostly harmless. It have only small performance impact.


Related issues

Related to illumos gate - Bug #5509: nfsauth_cache_get() could spend a lot of time walking exi_cacheClosed2015-01-07

Actions

History

#1

Updated by Marcel Telka about 4 years ago

  • Status changed from In Progress to Pending RTI
#2

Updated by Marcel Telka about 4 years ago

Introduced in #5509.

#3

Updated by Marcel Telka about 4 years ago

  • Related to Bug #5509: nfsauth_cache_get() could spend a lot of time walking exi_cache added
#4

Updated by Electric Monk about 4 years ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit 09818e88dd7907e7eccd0caf8973ebfa6806b5f1

commit  09818e88dd7907e7eccd0caf8973ebfa6806b5f1
Author: Marcel Telka <marcel.telka@nexenta.com>
Date:   2015-09-22T13:49:38.000Z

    6257 First nfsauth_retrieve() is never cached in nfsauth_cache_get()
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Arne Jansen <sensille@gmx.net>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF