Description of problem: When glusterfs is build with efence, upon peer probe it crashes if the iptables are on. This is the backtrace of the core generated. Program terminated with signal 11, Segmentation fault. #0 0x00007f4288b22929 in glusterd_friend_remove_notify (peerinfo=0x7f4288adef10, req=0x7f42889ef540) at ../../../../../xlators/mgmt/glusterd/src/glusterd-handler.c:2687 2687 glusterd_xfer_cli_probe_resp (req, -1, ENOTCONN, Missing separate debuginfos, use: debuginfo-install ElectricFence-2.2.2-28.el6.x86_64 glibc-2.12-1.25.el6.x86_64 libgcc-4.4.5-6.el6.x86_64 (gdb) bt #0 0x00007f4288b22929 in glusterd_friend_remove_notify (peerinfo=0x7f4288adef10, req=0x7f42889ef540) at ../../../../../xlators/mgmt/glusterd/src/glusterd-handler.c:2687 #1 0x00007f4288b22d11 in glusterd_peer_rpc_notify (rpc=0x7f4288773ee8, mydata=0x7f4288adcfe0, event=RPC_CLNT_DISCONNECT, data=0x0) at ../../../../../xlators/mgmt/glusterd/src/glusterd-handler.c:2773 #2 0x00007f428b97aa7d in rpc_clnt_notify (trans=0x7f428877dd40, mydata=0x7f4288773f18, event=RPC_TRANSPORT_DISCONNECT, data=0x7f428877dd40) at ../../../../rpc/rpc-lib/src/rpc-clnt.c:879 #3 0x00007f428b976d14 in rpc_transport_notify (this=0x7f428877dd40, event=RPC_TRANSPORT_DISCONNECT, data=0x7f428877dd40) at ../../../../rpc/rpc-lib/src/rpc-transport.c:498 #4 0x00007f42887e45a8 in socket_connect_finish (this=0x7f428877dd40) at ../../../../../rpc/rpc-transport/socket/src/socket.c:1750 #5 0x00007f42887e479b in socket_event_handler (fd=9, idx=2, data=0x7f428877dd40, poll_in=1, poll_out=0, poll_err=24) at ../../../../../rpc/rpc-transport/socket/src/socket.c:1782 #6 0x00007f428bbcdb54 in event_dispatch_epoll_handler (event_pool=0x7f428b48cf60, events=0x7f428b50c3ec, i=0) at ../../../libglusterfs/src/event.c:794 #7 0x00007f428bbcdd77 in event_dispatch_epoll (event_pool=0x7f428b48cf60) at ../../../libglusterfs/src/event.c:856 #8 0x00007f428bbce102 in event_dispatch (event_pool=0x7f428b48cf60) at ../../../libglusterfs/src/event.c:956 #9 0x0000000000407ace in main (argc=1, argv=0x7fff02e35478) at ../../../glusterfsd/src/glusterfsd.c:1601 (gdb) f 0 #0 0x00007f4288b22929 in glusterd_friend_remove_notify (peerinfo=0x7f4288adef10, req=0x7f42889ef540) at ../../../../../xlators/mgmt/glusterd/src/glusterd-handler.c:2687 2687 glusterd_xfer_cli_probe_resp (req, -1, ENOTCONN, (gdb) l 2682 "Unable to find the request for responding " 2683 "to User (%s)", peerinfo->hostname); 2684 goto out; 2685 } 2686 2687 glusterd_xfer_cli_probe_resp (req, -1, ENOTCONN, 2688 peerinfo->hostname, peerinfo->port); 2689 } else { 2690 gf_log ("glusterd", GF_LOG_ERROR, 2691 "Unable to create event for removing peer %s", (gdb) p peerinfo $1 = (glusterd_peerinfo_t *) 0x7f4288adef10 (gdb) p *peerinfo $2 = {uuid = '\000' <repeats 15 times>, uuid_str = '\000' <repeats 49 times>, state = {state = GD_FRIEND_STATE_DEFAULT, transition_time = { tv_sec = 0, tv_usec = 0}}, hostname = 0x0, port = 0, uuid_list = {next = 0x0, prev = 0x0}, op_peers_list = {next = 0x0, prev = 0x0}, rpc = 0x0, mgmt = 0x0, peer = 0x0, connected = 0, shandle = 0x0, sm_log = {transitions = 0x0, current = 0, size = 0, count = 0, state_name_get = 0, event_name_get = 0}} (gdb) p peerinfo->hostname $3 = 0x0 (gdb) p peerinfo->port $4 = 0 (gdb) f 1 #1 0x00007f4288b22d11 in glusterd_peer_rpc_notify (rpc=0x7f4288773ee8, mydata=0x7f4288adcfe0, event=RPC_CLNT_DISCONNECT, data=0x0) at ../../../../../xlators/mgmt/glusterd/src/glusterd-handler.c:2773 2773 glusterd_friend_remove_notify (peerinfo, (gdb) l glusterd_peer_rpc_notify 2698 2699 int 2700 glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata, 2701 rpc_clnt_event_t event, 2702 void *data) 2703 { 2704 xlator_t *this = NULL; 2705 glusterd_conf_t *conf = NULL; 2706 int ret = 0; 2707 glusterd_peerinfo_t *peerinfo = NULL; (gdb) 2708 glusterd_peerctx_t *peerctx = NULL; 2709 uuid_t owner = {0,}; 2710 uuid_t *peer_uuid = NULL; 2711 2712 peerctx = mydata; 2713 if (!peerctx) 2714 return 0; 2715 2716 peerinfo = peerctx->peerinfo; 2717 this = THIS; (gdb) 2718 conf = this->private; 2719 p peerctx $5 = (glusterd_peerctx_t *) 0x7f4288adcfe0 (gdb) p *peerctx $6 = {args = {req = 0x0, mode = GD_MODE_OFF}, peerinfo = 0x0} (gdb) Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
CHANGE: http://review.gluster.com/2655 (glusterd: Fixed crash in peer probe found using efence) merged in master by Vijay Bellur (vijay)
Checked with glusterfs-3.3.0qa42 and glusterd does not crash upon peer probe.