Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ft/collect bucket attributes #3

Closed
wants to merge 2 commits into from

Conversation

ploki
Copy link

@ploki ploki commented Sep 1, 2016

review only the last commit as others belong to another pool request

if (js_owner)
owner = json_string_value(js_owner);
if (js_owner_display_name)
owner_display_name = json_string_value(js_owner_display_name);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why do you only care about the owner name and display name? Are the aws style acl's irrelevant in this context? How is authorization handled?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this stage of development, the ACLs are not yet integrated to NFS. Object created through NFS are assigned to the bucket owner and no authentication is done

@ploki
Copy link
Author

ploki commented Nov 17, 2016

outdated by c5176ac

@ploki ploki closed this Nov 17, 2016
@ploki ploki deleted the ft/collect-bucket-attributes branch November 17, 2016 00:45
oliviergaraud pushed a commit that referenced this pull request Jul 22, 2020
csa_sec_parms_val was declared in its own scope but was used much
later, we need to declare it outside of the helper and pass the
address there.

==7480==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fffea684340 at pc 0x7fffecec1e9c bp 0x7fffea683510 sp 0x7fffea683500
READ of size 4 at 0x7fffea684340 thread T5

    #0 0x7fffecec1e9b in xdr_uint32_t /src/nfs-ganesha/src/libntirpc/ntirpc/rpc/xdr_inline.h:221
    #1 0x7fffecec1ef7 in xdr_u_int32_t /src/nfs-ganesha/src/libntirpc/ntirpc/rpc/xdr_inline.h:236
    #2 0x7fffecec9d88 in xdr_callback_sec_parms4 /src/nfs-ganesha/src/include/nfsv41.h:6750
    #3 0x7fffecec3c3c in xdr_array_encode /src/nfs-ganesha/src/libntirpc/ntirpc/rpc/xdr_inline.h:848
    #4 0x7fffecec3ef3 in xdr_array /src/nfs-ganesha/src/libntirpc/ntirpc/rpc/xdr_inline.h:891
    #5 0x7fffececaa56 in xdr_CREATE_SESSION4args /src/nfs-ganesha/src/include/nfsv41.h:7049
    #6 0x7fffecece544 in xdr_nfs_argop4 /src/nfs-ganesha/src/include/nfsv41.h:8233
    #7 0x7fffecec3c3c in xdr_array_encode /src/nfs-ganesha/src/libntirpc/ntirpc/rpc/xdr_inline.h:848
    #8 0x7fffecec3ef3 in xdr_array /src/nfs-ganesha/src/libntirpc/ntirpc/rpc/xdr_inline.h:891
    #9 0x7fffececfef4 in xdr_COMPOUND4args /src/nfs-ganesha/src/include/nfsv41.h:8732
    #10 0x7fffeced6f8c in pxy_compoundv4_call /src/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c:764
    #11 0x7fffeced834a in pxy_compoundv4_execute /src/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c:857
    #12 0x7fffeceda878 in pxy_setsessionid /src/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c:966
    #13 0x7fffecedc7eb in pxy_clientid_renewer /src/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c:1147
    #14 0x7ffff5572593 in start_thread /usr/src/debug/glibc-2.27-78-g2b47bb9cba/nptl/pthread_create.c:463
    #15 0x7ffff4e84e6e in clone (/lib64/libc.so.6+0xf9e6e)

Address 0x7fffea684340 is located in stack of thread T5 at offset 288 in frame
    #0 0x7fffeced9cbc in pxy_setsessionid /src/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c:936

  This frame has 7 object(s):
    [32, 36) 'seqid'
    [96, 100) 'fore_ca_rdma_ird_val_sink'
    [160, 164) 'back_ca_rdma_ird_val_sink'
    [224, 232) 'cid'
    [288, 336) 'csa_sec_parms_val' <== Memory access at offset 288 is inside this variable
    [384, 960) 'arg'
    [992, 1632) 'res'

Change-Id: I597abb06747898418c907e33b57b1f0ac1f904f7
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
oliviergaraud pushed a commit that referenced this pull request Jul 22, 2020
There was no lookup done at all in pxy_lookup_path for /, leading
to this segfault:
 #0  0x00000000006fd072 in mdcache_new_entry (export=0x617000000b00, sub_handle=0x6020000000f0, attrs_in=0x7fffffffd6a0, attrs_out=0x0,
    new_directory=false, entry=0x7fffffffd620, state=0x0, reason=MDC_REASON_DEFAULT)
    at /home/asmadeus/code/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c:572
 #1  0x00000000006ecca8 in mdcache_lookup_path (exp_hdl=0x617000000b00, path=0x602000000e90 "/", handle=0x7fffffffd840, attrs_out=0x0)
    at /home/asmadeus/code/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c:1551
 #2  0x000000000066bfe6 in init_export_root (export=0x615000000348) at /home/asmadeus/code/nfs-ganesha/src/support/exports.c:2254
 #3  0x000000000066b055 in init_export_cb (exp=0x615000000348, state=0x7fffffffdb50) at /home/asmadeus/code/nfs-ganesha/src/support/exports.c:2117
 #4  0x0000000000696453 in foreach_gsh_export (cb=0x66b031 <init_export_cb>, wrlock=true, state=0x7fffffffdb50)
    at /home/asmadeus/code/nfs-ganesha/src/support/export_mgr.c:777
 #5  0x000000000066b11b in exports_pkginit () at /home/asmadeus/code/nfs-ganesha/src/support/exports.c:2136
 #6  0x000000000047902c in nfs_Init (p_start_info=0xa5dbc0 <my_nfs_start_info>) at /home/asmadeus/code/nfs-ganesha/src/MainNFSD/nfs_init.c:639
 #7  0x000000000047ac94 in nfs_start (p_start_info=0xa5dbc0 <my_nfs_start_info>) at /home/asmadeus/code/nfs-ganesha/src/MainNFSD/nfs_init.c:923
 #8  0x000000000041f97e in main (argc=8, argv=0x7fffffffe588) at /home/asmadeus/code/nfs-ganesha/src/MainNFSD/nfs_main.c:517

Get the root fh instead.

Change-Id: I40ee862c97e327be21a99aeaf8dbebfb15053136
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
oliviergaraud pushed a commit that referenced this pull request Jul 24, 2024
Currently, Ganesha uses backtrace during crashes,
which may not provide sufficient useful information:
07/02/2024 19:09:18: epoch 65c3d55b: xueqian-hu: nfs-ganesha-39008[main] gsh_backtrace: NFS STARTUP: MAJ: stack
backtrace follows:
/lib64/libganesha_nfsd.so.5.6(+0x83ba1)[0x7f64d9172ba1]
/lib64/libganesha_nfsd.so.5.6(+0x5d618)[0x7f64d914c618]
/lib64/libpthread.so.0(+0xf630)[0x7f64d7d1a630]
/lib64/libpthread.so.0(pthread_join+0xa7)[0x7f64d7d14017]
/lib64/libganesha_nfsd.so.5.6(nfs_start+0x323)[0x7f64d914eff3]
ganesha.nfsd(main+0xbef)[0x4025cf]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f64d753d555]
ganesha.nfsd[0x402663]

This patch introduces an option to use libunwind, which can display function information:
08/02/2024 20:06:04: epoch 65c53429: xueqian-hu: nfs-ganesha-99814[main] gsh_libunwind: NFS STARTUP: MAJ: BACKTRACE:
08/02/2024 20:06:04 : epoch 65c53429 : xueqian-hu : nfs-ganesha-99814[main] gsh_libunwind :NFS STARTUP :MAJ :BACKTRACE:
 #0 gsh_libunwind + 0x29 [ip=0x7f90b1a10859] [sp=0x7ffd49d53c00]
 #1 crash_handler + 0x8 [ip=0x7f90b19e9fd8] [sp=0x7ffd49d54670]
 #2 _L_unlock_13 + 0x34 [ip=0x7f90b039d630] [sp=0x7ffd49d54680]
 #3 pthread_join + 0xa7 [ip=0x7f90b0397017] [sp=0x7ffd49d55380]
 #4 nfs_start + 0x323 [ip=0x7f90b19ec9b3] [sp=0x7ffd49d553e0]
 #5 main + 0xbef [ip=0x4025df] [sp=0x7ffd49d55480]

Change-Id: I194853e25ec0c89c7f552dc4872c37a420ea8d4a
Signed-off-by: Xueqian Hu <xh140312@outlook.com>
oliviergaraud pushed a commit that referenced this pull request Jul 24, 2024
Currently, Ganesha uses backtrace during crashes,
which may not provide sufficient useful information:
07/02/2024 19:09:18: epoch 65c3d55b: xueqian-hu: nfs-ganesha-39008[main] gsh_backtrace: NFS STARTUP: MAJ: stack
backtrace follows:
/lib64/libganesha_nfsd.so.5.6(+0x83ba1)[0x7f64d9172ba1]
/lib64/libganesha_nfsd.so.5.6(+0x5d618)[0x7f64d914c618]
/lib64/libpthread.so.0(+0xf630)[0x7f64d7d1a630]
/lib64/libpthread.so.0(pthread_join+0xa7)[0x7f64d7d14017]
/lib64/libganesha_nfsd.so.5.6(nfs_start+0x323)[0x7f64d914eff3]
ganesha.nfsd(main+0xbef)[0x4025cf]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f64d753d555]
ganesha.nfsd[0x402663]

This patch introduces an option to use libunwind, which can display function information:
08/02/2024 20:06:04: epoch 65c53429: xueqian-hu: nfs-ganesha-99814[main] gsh_libunwind: NFS STARTUP: MAJ: BACKTRACE:
08/02/2024 20:06:04 : epoch 65c53429 : xueqian-hu : nfs-ganesha-99814[main] gsh_libunwind :NFS STARTUP :MAJ :BACKTRACE:
 #0 gsh_libunwind + 0x29 [ip=0x7f90b1a10859] [sp=0x7ffd49d53c00]
 #1 crash_handler + 0x8 [ip=0x7f90b19e9fd8] [sp=0x7ffd49d54670]
 #2 _L_unlock_13 + 0x34 [ip=0x7f90b039d630] [sp=0x7ffd49d54680]
 #3 pthread_join + 0xa7 [ip=0x7f90b0397017] [sp=0x7ffd49d55380]
 #4 nfs_start + 0x323 [ip=0x7f90b19ec9b3] [sp=0x7ffd49d553e0]
 #5 main + 0xbef [ip=0x4025df] [sp=0x7ffd49d55480]

Change-Id: I194853e25ec0c89c7f552dc4872c37a420ea8d4a
Signed-off-by: Xueqian Hu <xh140312@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants