Bug 765379 (GLUSTER-3647)

Summary: [glusterfs-3.3.0qa11]: glustershd crashed trying to access NULL pointer
Product: [Community] GlusterFS Reporter: Raghavendra Bhat <rabhat>
Component: replicateAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: pre-releaseCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Raghavendra Bhat 2011-09-27 13:46:11 UTC
glustershd crashed after self-healing for about a minute with the following backtrace.

Core was generated by `/usr/local/sbin/glusterfs -s localhost --volfile-id gluster/glustershd -p /etc/'.
Program terminated with signal 11, Segmentation fault.
#0  0x00002aaaacf2093a in afr_unlock_inodelk_cbk (frame=0x2b037444c21c, cookie=0x1, this=0x192988f0, op_ret=-1, op_errno=2)
    at ../../../../../xlators/cluster/afr/src/afr-lk-common.c:565
565                     gf_log (this->name, GF_LOG_ERROR,
(gdb) bt
#0  0x00002aaaacf2093a in afr_unlock_inodelk_cbk (frame=0x2b037444c21c, cookie=0x1, this=0x192988f0, op_ret=-1, op_errno=2)
    at ../../../../../xlators/cluster/afr/src/afr-lk-common.c:565
#1  0x00002aaaaccb54e0 in client3_1_inodelk_cbk (req=0x2aaaad369e28, iov=0x2aaaad369e68, count=1, myframe=0x2b03741abb28)
    at ../../../../../xlators/protocol/client/src/client3_1-fops.c:1237
#2  0x00002b037350925e in rpc_clnt_handle_reply (clnt=0x1929fa30, pollin=0x19302b00) at ../../../../rpc/rpc-lib/src/rpc-clnt.c:789
#3  0x00002b0373509586 in rpc_clnt_notify (trans=0x1929fd60, mydata=0x1929fa60, event=RPC_TRANSPORT_MSG_RECEIVED, data=0x19302b00)
    at ../../../../rpc/rpc-lib/src/rpc-clnt.c:902
#4  0x00002b03735059f3 in rpc_transport_notify (this=0x1929fd60, event=RPC_TRANSPORT_MSG_RECEIVED, data=0x19302b00)
    at ../../../../rpc/rpc-lib/src/rpc-transport.c:498
#5  0x00002aaaaab5cea7 in socket_event_poll_in (this=0x1929fd60) at ../../../../../rpc/rpc-transport/socket/src/socket.c:1675
#6  0x00002aaaaab5d3e9 in socket_event_handler (fd=27, idx=20, data=0x1929fd60, poll_in=1, poll_out=0, poll_err=0)
    at ../../../../../rpc/rpc-transport/socket/src/socket.c:1790
#7  0x00002b03732b184c in event_dispatch_epoll_handler (event_pool=0x1928c960, events=0x192913f0, i=0)
    at ../../../libglusterfs/src/event.c:794
#8  0x00002b03732b1a51 in event_dispatch_epoll (event_pool=0x1928c960) at ../../../libglusterfs/src/event.c:856
#9  0x00002b03732b1dab in event_dispatch (event_pool=0x1928c960) at ../../../libglusterfs/src/event.c:956
#10 0x000000000040784d in main (argc=11, argv=0x7fffe039ea08) at ../../../glusterfsd/src/glusterfsd.c:1592
(gdb) f 0
#0  0x00002aaaacf2093a in afr_unlock_inodelk_cbk (frame=0x2b037444c21c, cookie=0x1, this=0x192988f0, op_ret=-1, op_errno=2)
    at ../../../../../xlators/cluster/afr/src/afr-lk-common.c:565
565                     gf_log (this->name, GF_LOG_ERROR,
(gdb) l
560             afr_trace_inodelk_out (frame, AFR_INODELK_TRANSACTION,
561                                    AFR_UNLOCK_OP, NULL, op_ret,
562                                    op_errno, child_index);
563
564             if (op_ret < 0 && op_errno != ENOTCONN && op_errno != EBADFD) {
565                     gf_log (this->name, GF_LOG_ERROR,
566                             "%s: unlock failed on %d, reason: %s",
567                             local->loc.path, child_index, strerror (op_errno));
568             }
569
(gdb) p local
$1 = (afr_local_t *) 0x0
(gdb) p *frame
$2 = {root = 0x2b037444c194, parent = 0x0, next = 0x0, prev = 0x0, local = 0x0, this = 0x192988f0, ret = 0, ref_count = -1, lock = 1, 
  cookie = 0x0, complete = _gf_false, op = GF_FOP_NULL, begin = {tv_sec = 0, tv_usec = 0}, end = {tv_sec = 0, tv_usec = 0}, wind_from = 0x0, 
  wind_to = 0x0, unwind_from = 0x0, unwind_to = 0x0}
(gdb)

Comment 1 Anand Avati 2011-09-30 04:47:51 UTC
CHANGE: http://review.gluster.com/527 (Change-Id: I0ef541c1f387c397c345e3f2bc9a57f1eff282a1) merged in master by Vijay Bellur (vijay)