Bug 1378089
Summary: | Ganesha crashes with segfault while accessing files from Windows client. | |||
---|---|---|---|---|
Product: | [Retired] nfs-ganesha | Reporter: | Shashank Raj <sraj> | |
Component: | Protocols-NLM | Assignee: | Soumya Koduri <skoduri> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | ||
Severity: | urgent | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 2.4 | CC: | bugs, dang, ffilz, jthottan, kkeithle, ndevos, pasik, skoduri, storage-qa-internal | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Windows | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1379962 (view as bug list) | Environment: | ||
Last Closed: | 2019-11-22 15:24:46 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1379962 |
Description
Shashank Raj
2016-09-21 13:08:24 UTC
Core file can be accessed at http://rhsqe-repo.lab.eng.blr.redhat.com/sosreports/1378089/ (gdb) bt #0 0x00007f1a18db28fd in glusterfs_reopen2 (obj_hdl=0x7f1929e13ec8, state=0x0, openflags=1) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/FSAL/FSAL_GLUSTER/handle.c:1953 #1 0x000000000053217e in mdcache_reopen2 (obj_hdl=0x7f1929e14288, state=0x0, openflags=1) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_file.c:779 #2 0x000000000043329c in fsal_reopen2 (obj=0x7f1929e14288, state=0x0, openflags=1, check_permission=true) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/FSAL/fsal_helper.c:1842 #3 0x00000000004b9e5e in state_nlm_share2 (obj=0x7f1929e14288, share_access=1, share_deny=0, owner=0x7f1910006960, state=0x0, reclaim=false, unshare=false) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/SAL/state_share.c:805 #4 0x00000000004ba6eb in state_nlm_share (obj=0x7f1929e14288, share_access=1, share_deny=0, owner=0x7f1910006960, state=0x0, reclaim=false) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/SAL/state_share.c:894 #5 0x000000000049547d in nlm4_Share (args=0x7f195c186218, req=0x7f195c186058, res=0x7f1910006030) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/Protocols/NLM/nlm_Share.c:122 #6 0x000000000044ad6b in nfs_rpc_execute (reqdata=0x7f195c186030) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/MainNFSD/nfs_worker_thread.c:1281 #7 0x000000000044b625 in worker_run (ctx=0x139d0d0) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/MainNFSD/nfs_worker_thread.c:1548 #8 0x000000000050079f in fridgethr_start_routine (arg=0x139d0d0) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/support/fridgethr.c:550 #9 0x00007f1a1b72edc5 in start_thread () from /lib64/libpthread.so.0 #10 0x00007f1a1adee1cd in clone () from /lib64/libc.so.6 (gdb) p my_share_fd $1 = (struct glusterfs_fd *) 0x110 (gdb) l 1948 #endif 1949 1950 /* This can block over an I/O operation. */ 1951 PTHREAD_RWLOCK_wrlock(&obj_hdl->lock); 1952 1953 old_openflags = my_share_fd->openflags; 1954 1955 /* We can conflict with old share, so go ahead and check now. */ 1956 status = check_share_conflict(&myself->share, openflags, false); 1957 (gdb) 1958 if (FSAL_IS_ERROR(status)) { 1959 PTHREAD_RWLOCK_unlock(&obj_hdl->lock); 1960 return status; 1961 } 1962 1963 /* Set up the new share so we can drop the lock and not have a 1964 * conflicting share be asserted, updating the share counters. 1965 */ 1966 update_share_counters(&myself->share, old_openflags, openflags); 1967 (gdb) f 3 #3 0x00000000004b9e5e in state_nlm_share2 (obj=0x7f1929e14288, share_access=1, share_deny=0, owner=0x7f1910006960, state=0x0, reclaim=false, unshare=false) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/SAL/state_share.c:805 805 fsal_status = fsal_reopen2(obj, state, openflags, true); (gdb) l 800 openflags |= FSAL_O_RECLAIM; 801 802 /* Use reopen2 to open or re-open the file and check for share 803 * conflict. 804 */ 805 fsal_status = fsal_reopen2(obj, state, openflags, true); 806 807 if (FSAL_IS_ERROR(fsal_status)) { 808 LogDebug(COMPONENT_STATE, 809 "fsal_reopen2 failed with %s", (gdb) f 5 #5 0x000000000049547d in nlm4_Share (args=0x7f195c186218, req=0x7f195c186058, res=0x7f1910006030) at /usr/src/debug/nfs-ganesha-2.4-rc4-0.1.1-Source/Protocols/NLM/nlm_Share.c:122 122 state_status = state_nlm_share(obj, (gdb) l 117 "REQUEST RESULT: nlm4_Share %s", 118 lock_result_str(res->res_nlm4share.stat)); 119 return NFS_REQ_OK; 120 } 121 122 state_status = state_nlm_share(obj, 123 arg->share.access, 124 arg->share.mode, 125 nlm_owner, 126 nlm_state, (gdb) p nlm_state $2 = (state_t *) 0x0 (gdb) p rc $3 = -1 (gdb) I guess fix is to bail out in nlm4_Share in case of error (rc !=0). |