segfault when mounting with vers=4.0
by Rolf Anders
Hi,
I'm using nfs-ganesha 2.6.2 on Ubuntu 16.04. When a client mounts
with "-t nfs4 -o sec=krb5,vers=4.0" ganesha.nfsd crashes in
nfs_rpc_create_chan_v40():
Thread 11 "ganesha.nfsd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff269c700 (LWP 1118)]
nfs_rpc_create_chan_v40 (clientid=0x7fffec0097b0, flags=<optimized out>)
at /root/src/nfs-ganesha-2.6.2/src/MainNFSD/nfs_rpc_callback.c:591
591 if (AUTH_FAILURE(chan->auth)) {
(gdb)
(gdb) print chan->auth
$1 = (AUTH *) 0x0
The cause seems to be the following: nfs_rpc_create_chan_v40()
calls nfs_rpc_callback_setup_gss(), which calls
gssd_refresh_krb5_machine_credential(). For some reason which I don't
yet understand gssd_refresh_krb5_machine_credential() fails in my setup,
and that makes nfs_rpc_callback_setup_gss() to return without setting
chan->auth.
What would be a proper fix for this problem?
Rolf
--
Rolf Anders ............................ http://www.rz.uni-augsburg.de
Universität Augsburg, Rechenzentrum ............. Tel. (0821) 598-2030
86135 Augsburg .................................. Fax. (0821) 598-2028
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: FSAL: track server as utf8string in fsal_fs_locations_t
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/421925
Change subject: FSAL: track server as utf8string in fsal_fs_locations_t
......................................................................
FSAL: track server as utf8string in fsal_fs_locations_t
We end up discarding the NULL termination later, so we might as well
track it as a separate length and pointer. This allows us to cut out
some unnecessary string walking and copies in the encoding routine
as well.
Change-Id: I2bb1b1276faf6a61d519e70c361dc5deea36d7dd
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/FSAL/FSAL_VFS/handle.c
M src/Protocols/NFS/nfs_proto_tools.c
M src/include/fsal_types.h
M src/support/nfs4_fs_locations.c
4 files changed, 16 insertions(+), 12 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/25/421925/1
--
To view, visit https://review.gerrithub.io/421925
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bb1b1276faf6a61d519e70c361dc5deea36d7dd
Gerrit-Change-Number: 421925
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: Reset stats counters on disabling
by GerritHub
From Sachin Punadikar <psachin(a)in.ibm.com>:
Sachin Punadikar has uploaded this change for review. ( https://review.gerrithub.io/421876
Change subject: Reset stats counters on disabling
......................................................................
Reset stats counters on disabling
After disabling statistics counting in Ganesha (for server and fsal),
the existing counters should be made zero.
Change-Id: I1ec33a1b1cc1759839825661b61ef4b87d1d15f4
Signed-off-by: Sachin Punadikar <psachin(a)in.ibm.com>
---
M src/include/server_stats_private.h
M src/support/export_mgr.c
M src/support/server_stats.c
3 files changed, 16 insertions(+), 15 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/76/421876/1
--
To view, visit https://review.gerrithub.io/421876
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ec33a1b1cc1759839825661b61ef4b87d1d15f4
Gerrit-Change-Number: 421876
Gerrit-PatchSet: 1
Gerrit-Owner: Sachin Punadikar <psachin(a)in.ibm.com>
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: Provision for status in ganesha_stats
by GerritHub
From Sachin Punadikar <psachin(a)in.ibm.com>:
Sachin Punadikar has uploaded this change for review. ( https://review.gerrithub.io/421875
Change subject: Provision for status in ganesha_stats
......................................................................
Provision for status in ganesha_stats
"ganesha_stats" provide option to enable/disable statistics
counting for the NFS operations and for the FSAL operations.
To help in getting current status of statistics counting
(whether enabled or disabled), added "status" option. This
provides current status (enabled/disabled) and if enabled,
then since what time the counting is enabled.
Change-Id: Ic8e8f694d2f24274a3ce3490760f9fe089c04b0a
Signed-off-by: Sachin Punadikar <psachin(a)in.ibm.com>
---
M src/MainNFSD/nfs_init.c
M src/include/export_mgr.h
M src/include/server_stats_private.h
M src/scripts/ganeshactl/Ganesha/glib_dbus_stats.py
M src/scripts/ganeshactl/ganesha_stats.py
M src/support/export_mgr.c
6 files changed, 111 insertions(+), 9 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/75/421875/1
--
To view, visit https://review.gerrithub.io/421875
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8e8f694d2f24274a3ce3490760f9fe089c04b0a
Gerrit-Change-Number: 421875
Gerrit-PatchSet: 1
Gerrit-Owner: Sachin Punadikar <psachin(a)in.ibm.com>
6 years, 5 months
O_TRUNC in open2
by ntvietvn@gmail.com
Hello,
Can anyone explain how O_TRUNC is handled (open2)? When I try to open an existing file with this flag, the FSAL_O_TRUNC in openflags is not enabled in my FSAL open2 fct.
While capturing with tcpdump, the NFS client actually sends a OPEN then SETATTR with size = 0 but not ctime.
By looking at an example in open_by_handle, if IIUC if the flag O_TRUNC is there, we refresh the attrs by calling getattrs to attrs_out, I do not understand that, why it does that instead of calling setattrs ?
Thank you.
Viet
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: fs_locations: split location field into server and rootpath strings
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/421129
Change subject: fs_locations: split location field into server and rootpath strings
......................................................................
fs_locations: split location field into server and rootpath strings
Sriram did some work a few months ago to plumb in a new vfs-layer
mechanism for fetching fs_locations info. Unfortunately, it ended up
squashing the "server" and "rootpath" fields into a single string,
delimited by a ':'.
Presumably this was done because the xattr presents this info in that
format, as later in the generic code, that string is split into two for
encoding the fs_locations attr on the wire.
In later patches we're going to want to make this more suitable for
generating fs_locations_info, and keeping them conjoined like this will
be more problematic for that use later.
Split the location string back into two in fsal_fs_locations_t, and
just have FSAL_VFS concatenate a new ':' delimited string when it
needs to generate one for the fsid hash.
Change-Id: If3ea29d6c0053b8aeb4644c26dc46c2c12b3e88d
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/FSAL/FSAL_GPFS/handle.c
M src/FSAL/FSAL_VFS/handle.c
M src/FSAL/FSAL_VFS/subfsal_helpers.c
M src/Protocols/NFS/nfs_proto_tools.c
M src/include/fsal_types.h
M src/include/nfs4_fs_locations.h
M src/support/nfs4_fs_locations.c
7 files changed, 51 insertions(+), 40 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/29/421129/1
--
To view, visit https://review.gerrithub.io/421129
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: If3ea29d6c0053b8aeb4644c26dc46c2c12b3e88d
Gerrit-Change-Number: 421129
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: FSAL: replace handle_is operation with common inline
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/421128
Change subject: FSAL: replace handle_is operation with common inline
......................................................................
FSAL: replace handle_is operation with common inline
This operation is just pointless redirection as all filesystems do the
exact same thing. Turn it into a single static inline and remove the
operation.
Change-Id: Idffc1fa1a86318e4938cbf5403da3cd800b1818f
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/FSAL/FSAL_GPFS/handle.c
M src/FSAL/FSAL_PROXY/handle.c
M src/FSAL/FSAL_PSEUDO/handle.c
M src/FSAL/FSAL_VFS/handle.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c
M src/FSAL/default_methods.c
M src/include/FSAL/fsal_commonlib.h
M src/include/fsal_api.h
8 files changed, 25 insertions(+), 66 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/28/421128/1
--
To view, visit https://review.gerrithub.io/421128
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idffc1fa1a86318e4938cbf5403da3cd800b1818f
Gerrit-Change-Number: 421128
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: NFS: rename fsal_fs_locations_t->path to ->fs_root
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/421127
Change subject: NFS: rename fsal_fs_locations_t->path to ->fs_root
......................................................................
NFS: rename fsal_fs_locations_t->path to ->fs_root
For better consistency with the RFC.
Change-Id: Ia5b73f6c67bb88f78593367334a9667683eec23e
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/Protocols/NFS/nfs_proto_tools.c
M src/include/fsal_types.h
M src/support/nfs4_fs_locations.c
3 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/27/421127/1
--
To view, visit https://review.gerrithub.io/421127
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5b73f6c67bb88f78593367334a9667683eec23e
Gerrit-Change-Number: 421127
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: GPFS: rename root_path to fs_root in getattrs
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/421126
Change subject: GPFS: rename root_path to fs_root in getattrs
......................................................................
GPFS: rename root_path to fs_root in getattrs
For better consistency with the RFC.
Change-Id: I09e525c5801d1d69789b7f7b5b91348c28afcfaf
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/FSAL/FSAL_GPFS/handle.c
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/26/421126/1
--
To view, visit https://review.gerrithub.io/421126
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I09e525c5801d1d69789b7f7b5b91348c28afcfaf
Gerrit-Change-Number: 421126
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
6 years, 5 months
Re: Single open but multiple closes
by Daniel Gryniewicz
Okay, so there are a few places where files are unconditionally closed,
regardless of whether or not they were open to begin with. The FSAL
would return ERR_FSAL_NOT_OPENED, but the caller would ignore the error,
since all it wanted to do was ensure the global FD was closed. Examples
of this are:
On remove
When we're recycling a handle
When a handle transitions from L1 to L2 of the LRU
My guess is that the last case is the one you're hitting. If the file
is in use, and very few handles are in use, then the handle will
transition back and forth across the L1/L2 border. Since you haven't
implemented open()/close() in your FSAL, the status() op can't tell the
handle was closed, so it might not open() again, if it thought it was
open already.
Daniel
On 08/06/2018 11:15 AM, You Me wrote:
> Ganesha 2.5.1.
>
> 06/08/2018 10:51:18 : epoch 5b685fb2 : rhelindex :
> ganesha.nfsd-41167[work-195] file_open :FSAL :CRIT :file_open() fd =
> 1533189746
> 06/08/2018 10:51:18 : epoch 5b685fb2 : rhelindex :
> ganesha.nfsd-41167[work-193] file_close :FSAL :CRIT :file_close() fd =
> 1533189746
> 06/08/2018 10:51:18 : epoch 5b685fb2 : rhelindex :
> ganesha.nfsd-41167[work-191] file_close :FSAL :CRIT :file_close() fd =
> 1533189746
> 06/08/2018 10:51:18 : epoch 5b685fb2 : rhelindex :
> ganesha.nfsd-41167[work-196] file_close :FSAL :CRIT :file_close() fd =
> 1533189746
> 06/08/2018 10:51:18 : epoch 5b685fb2 : rhelindex :
> ganesha.nfsd-41167[work-195] file_close :FSAL :CRIT :file_close() fd =
> 1533189746
> 06/08/2018 10:51:18 : epoch 5b685fb2 : rhelindex :
> ganesha.nfsd-41167[work-197] file_close :FSAL :CRIT :file_close() fd =
> 1533189746
>
> There was a read between open and first close.
>
> Is this a known issue in that version of ganesha?
>
> --Satish
>
> On Mon, Aug 6, 2018 at 8:35 AM, Daniel Gryniewicz <dang(a)redhat.com
> <mailto:dang@redhat.com>> wrote:
>
> No, there should be a single close for each open. There may be
> multiple opens, but only a single close for each open.
>
> Which version of Ganesha?
>
> Daniel
>
>
> On 08/03/2018 10:01 PM, You Me wrote:
>
> When I write a lot of data to an NFS share using NFSv3 clients,
> I see that Nfs-Ganesha opens file once but calls close on same
> FD multiple times.
>
> What is the reason behind that?
>
> —You
>
>
> _______________________________________________
> Devel mailing list -- devel(a)lists.nfs-ganesha.org
> <mailto:devel@lists.nfs-ganesha.org>
> To unsubscribe send an email to
> devel-leave(a)lists.nfs-ganesha.org
> <mailto:devel-leave@lists.nfs-ganesha.org>
>
> _______________________________________________
> Devel mailing list -- devel(a)lists.nfs-ganesha.org
> <mailto:devel@lists.nfs-ganesha.org>
> To unsubscribe send an email to devel-leave(a)lists.nfs-ganesha.org
> <mailto:devel-leave@lists.nfs-ganesha.org>
>
>
6 years, 5 months