[Bugs] [Bug 1171662] New: libgfapi crashes in glfs_fini for RDMA type volumes
bugzilla at redhat.com
bugzilla at redhat.com
Mon Dec 8 10:30:01 UTC 2014
https://bugzilla.redhat.com/show_bug.cgi?id=1171662
Bug ID: 1171662
Summary: libgfapi crashes in glfs_fini for RDMA type volumes
Product: Red Hat Storage
Version: 3.0
Component: gluster-smb
Keywords: Triaged
Severity: high
Priority: medium
Assignee: ira at redhat.com
Reporter: achiraya at redhat.com
QA Contact: storage-qa-internal at redhat.com
CC: achiraya at redhat.com, bugs at gluster.org,
jthottan at redhat.com, nlevinki at redhat.com,
rgowdapp at redhat.com, rkavunga at redhat.com,
rtalur at redhat.com, skoduri at redhat.com,
storage-qa-internal at redhat.com
Depends On: 1153610
+++ This bug was initially created as a clone of Bug #1153610 +++
Description of problem:
C program which uses libgfapi for RDMA volume crashes in glfs_fini().
Version-Release number of selected component (if applicable):
How reproducible:
Always
Steps to Reproduce:
1. Create a 1-brick RDMA volume.
2. Compile the attached C program that uses libgfapi
gcc -pthreads -g -O0 -Wall --pedantic -o gfapi_perf_test -I
/usr/include/glusterfs/api gfapi_perf_test.c -lgfapi -lrt
3. Do the following exports
export LD_LIBRARY_PATH=/usr/local/lib
export GFAPI_HOSTNAME=<server ip>
export GFAPI_TRANSPORT=rdma
export GFAPI_VOLNAME=<volume name>
4.Run the compiled output as
GFAPI_FILES=1 GFAPI_RECSZ=1024 GFAPI_FSZ=1048576 ./gfapi_perf_test
Actual results:
Segmentation fault (core dumped)
Expected results:
Program executes successfully.
Additional info:
--- Additional comment from Anoop C S on 2014-11-03 01:23:39 EST ---
Root cause of the crash was identified as follows:
When main() returns from a C program, global prioritized destructor functions
are called in priority order before the process terminates. According to rdmacm
standard library, rdma_cma_fini() is defined as a destructor function. The same
function is also invoked as part of rdma_disconnect() initiated through
xlator_notify() inside glfs_fini().
Due to the increased delay in rdma_disconnect() and associated cleanup, there
will be a race between the main thread and rdma thread to execute
rdma_cm_fini(), which will result in a segmentation fault.
--- Additional comment from Anand Avati on 2014-11-05 23:45:26 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#1) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-11-06 12:14:58 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#2) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-11-06 23:35:12 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#3) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-11-27 04:28:57 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#4) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-11-27 08:30:46 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#5) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-11-28 05:23:47 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#6) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-01 02:47:28 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#7) for review on master by Poornima G
(pgurusid at redhat.com)
--- Additional comment from Anand Avati on 2014-12-02 01:23:21 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#8) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-02 04:23:54 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#9) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-03 06:55:55 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#10) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-03 09:32:38 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#11) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-03 12:09:47 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#12) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-04 07:40:34 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#13) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-04 09:58:54 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#14) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-05 03:39:42 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#15) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-05 08:03:28 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#16) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-05 08:23:56 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#17) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-05 12:05:58 EST ---
REVIEW: http://review.gluster.org/9060 (libgfapi: Wait for GF_EVENT_CHILD_DOWN
in glfs_fini()) posted (#18) for review on master by Anoop C S
(achiraya at redhat.com)
--- Additional comment from Anand Avati on 2014-12-08 04:54:52 EST ---
COMMIT: http://review.gluster.org/9060 committed in master by Niels de Vos
(ndevos at redhat.com)
------
commit cd6ffa93dc2a3cb1fcc5438086aebc54f368c2e9
Author: Anoop C S <achiraya at redhat.com>
Date: Wed Oct 29 09:12:46 2014 -0400
libgfapi: Wait for GF_EVENT_CHILD_DOWN in glfs_fini()
Whenever glfs_fini() is being called, currently no
check is made inside the function to determine whether
the child is already down or not. This patch will wait
for GF_EVENT_CHILD_DOWN for the active subvol and
then exits.
TBD:
Apart from the active subvol, wait for other CHILD_DOWN
events generated through operations like volume set in
future.
Change-Id: I81c64ac07b463bfed48bf306f9e8f46ba0f0a76f
BUG: 1153610
Signed-off-by: Anoop C S <achiraya at redhat.com>
Reviewed-on: http://review.gluster.org/9060
Reviewed-by: Shyamsundar Ranganathan <srangana at redhat.com>
Tested-by: Gluster Build System <jenkins at build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp at redhat.com>
Reviewed-by: Niels de Vos <ndevos at redhat.com>
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1153610
[Bug 1153610] libgfapi crashes in glfs_fini for RDMA type volumes
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=FXZamZC8gM&a=cc_unsubscribe
More information about the Bugs
mailing list