Okay, I'm able to reproduce. I'm looking at this, but the problem is that the export being set before mdcache is called is NULL's export, not MDCACHE's export, so the double un-stack causes VFS to see a NULL export. Somewhere, the top of the export stack is being lost.

Daniel

On 12/08/2017 10:59 AM, Daniel Gryniewicz wrote:
I run NULL semi-regularly. The last time I ran it was a couple of months ago, so something may have crept in. I'll try again.

That said, the code in that callpath looks correct.

Daniel

On 12/08/2017 05:46 AM, LUCAS Patrice wrote:
Hi,


Does anyone recently test the FSAL_NULL stackable FSAL ?


Before using it as example of coding a stackable FSAL, I simply tried to use FSAL_NULL over FSAL_VFS and I got the following segmentation fault when running cthon04 basic test7 ('link and rename').

Best regards,

Patrice


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff2daf700 (LWP 22397)]
0x000000000041c23e in posix2fsal_attributes (buffstat=0x7ffff2dad590, fsalattr=0x7ffff2dad780) at /opt/nfs-ganesha/src/FSAL/fsal_convert.c:432 432 fsalattr->supported = op_ctx->fsal_export->exp_ops.fs_supported_attrs( Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7_3.5.x86_64 gssproxy-0.4.1-13.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 kr b5-libs-1.14.1-27.ocean1.el7.centos.x86_64 libcom_err-1.42.13.wc6-8.ocean1.el7.centos.x86_64 libselinux-2.5-6.el7.x86_64 pcre-8.32-15.el7_2.1.x86_
64
(gdb) where
#0 0x000000000041c23e in posix2fsal_attributes (buffstat=0x7ffff2dad590, fsalattr=0x7ffff2dad780)
     at /opt/nfs-ganesha/src/FSAL/fsal_convert.c:432
#1 0x000000000041c21c in posix2fsal_attributes_all (buffstat=0x7ffff2dad590, fsalattr=0x7ffff2dad780)
     at /opt/nfs-ganesha/src/FSAL/fsal_convert.c:422
#2 0x00007ffff3f155dc in fetch_attrs (myself=0x7fffd801baf0, my_fd=35, attrs=0x7ffff2dad780) at /opt/nfs-ganesha/src/FSAL/FSAL_VFS/file.c:325 #3 0x00007ffff3f1927a in vfs_getattr2 (obj_hdl=0x7fffd801baf0, attrs=0x7ffff2dad780) at /opt/nfs-ganesha/src/FSAL/FSAL_VFS/file.c:1595 #4 0x00007ffff41255d3 in getattrs (obj_hdl=0x7fffd800fdd0, attrib_get=0x7ffff2dad780)
     at /opt/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_NULL/handle.c:503
#5 0x0000000000531459 in mdcache_refresh_attrs (entry=0x7fffd80175e0, need_acl=false, invalidate=false) at /opt/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c:1048 #6 0x000000000052d4a1 in mdcache_refresh_attrs_no_invalidate (entry=0x7fffd80175e0) at /opt/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_int.h:445 #7 0x00000000005310be in mdcache_rename (obj_hdl=0x7fffe4037888, olddir_hdl=0x7fffd8017618, old_name=0x7fffd8002b80 "file.0",
     newdir_hdl=0x7fffd8017618, new_name=0x7fffd800f730 "newfile.0")
at /opt/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c:991 #8 0x0000000000431b26 in fsal_rename (dir_src=0x7fffd8017618, oldname=0x7fffd8002b80 "file.0", dir_dest=0x7fffd8017618, newname=0x7fffd800f730 "newfile.0") at /opt/nfs-ganesha/src/FSAL/fsal_helper.c:1412 #9 0x0000000000475947 in nfs4_op_rename (op=0x7fffd80153f0, data=0x7ffff2dadae0, resp=0x7fffd8018220)
     at /opt/nfs-ganesha/src/Protocols/NFS/nfs4_op_rename.c:122
#10 0x0000000000459b84 in nfs4_Compound (arg=0x7fffd800c538, req=0x7fffd800be30, res=0x7fffd800a950)
     at /opt/nfs-ganesha/src/Protocols/NFS/nfs4_Compound.c:752
#11 0x000000000044ab75 in nfs_rpc_process_request (reqdata=0x7fffd800be30) at /opt/nfs-ganesha/src/MainNFSD/nfs_worker_thread.c:1338 #12 0x000000000044b77a in nfs_rpc_valid_NFS (req=0x7fffd800be30) at /opt/nfs-ganesha/src/MainNFSD/nfs_worker_thread.c:1736 #13 0x00007ffff6c28546 in svc_vc_decode (req=0x7fffd800be30) at /opt/nfs-ganesha/src/libntirpc/src/svc_vc.c:812 #14 0x000000000044fb64 in nfs_rpc_decode_request (xprt=0x7fffe4000bc0, xdrs=0x7fffd8017be0)
     at /opt/nfs-ganesha/src/MainNFSD/nfs_rpc_dispatcher_thread.c:1625
#15 0x00007ffff6c28458 in svc_vc_recv (xprt=0x7fffe4000bc0) at /opt/nfs-ganesha/src/libntirpc/src/svc_vc.c:785 #16 0x00007ffff6c24bce in svc_rqst_xprt_task (wpe=0x7fffe4000dd8) at /opt/nfs-ganesha/src/libntirpc/src/svc_rqst.c:753 #17 0x00007ffff6c25048 in svc_rqst_epoll_events (sr_rec=0x7ef210, n_events=1) at /opt/nfs-ganesha/src/libntirpc/src/svc_rqst.c:925 #18 0x00007ffff6c252ea in svc_rqst_epoll_loop (sr_rec=0x7ef210) at /opt/nfs-ganesha/src/libntirpc/src/svc_rqst.c:998 #19 0x00007ffff6c2539d in svc_rqst_run_task (wpe=0x7ef210) at /opt/nfs-ganesha/src/libntirpc/src/svc_rqst.c:1034 #20 0x00007ffff6c2e9f1 in work_pool_thread (arg=0x7fffe00008c0) at /opt/nfs-ganesha/src/libntirpc/src/work_pool.c:176
#21 0x00007ffff7058dc5 in start_thread () from /lib64/libpthread.so.0
#22 0x00007ffff671a76d in clone () from /lib64/libc.so.6
(gdb)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to