[Bugs] [Bug 1197260] New: segfault trying to call ibv_dealloc_pd on a null pointer if ibv_alloc_pd failed

bugzilla at redhat.com bugzilla at redhat.com
Fri Feb 27 23:33:09 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1197260

            Bug ID: 1197260
           Summary: segfault trying to call ibv_dealloc_pd on a null
                    pointer if ibv_alloc_pd failed
           Product: GlusterFS
           Version: mainline
         Component: rdma
          Severity: low
          Assignee: bugs at gluster.org
          Reporter: mlipscombe at gmail.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com



Description of problem:
If creating an ib protection domain fails, during the cleanup a segfault will
occur because trav->pd is null.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Attempt to create an RDMA connection under circumstances where the process
cannot map enough memory.


Actual results:
Segfault

Expected results:
Failure without segfault

Additional info:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f28fa6a6700 (LWP 27142)]
0x00007f295897cbe0 in ibv_dealloc_pd () from /usr/lib/libibverbs.so.1
(gdb) bt
#0  0x00007f295897cbe0 in ibv_dealloc_pd () from /usr/lib/libibverbs.so.1
#1  0x00007f28fc39c86c in gf_rdma_get_device (this=this at entry=0x7f28a44118b0,
ibctx=<optimized out>, device_name=device_name at entry=0x7f28a440acd8 "mthca0")
at rdma.c:805
#2  0x00007f28fc39cd48 in gf_rdma_create_qp (this=this at entry=0x7f28a44118b0) at
rdma.c:3089
#3  0x00007f28fc39d3a2 in gf_rdma_cm_handle_route_resolved (event=<optimized
out>) at rdma.c:999
#4  gf_rdma_cm_event_handler (data=0x7f28a4412940) at rdma.c:1195
#5  0x00007f2957655182 in start_thread (arg=0x7f28fa6a6700) at
pthread_create.c:312
#6  0x00007f295738247d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111


#1  0x00007f28fc39c86c in gf_rdma_get_device (this=this at entry=0x7f28a44118b0,
ibctx=<optimized out>, device_name=device_name at entry=0x7f28a440acd8 "mthca0")
at rdma.c:805
805                    ibv_dealloc_pd (trav->pd);
(gdb) print trav
$2 = (gf_rdma_device_t *) 0x7f28c0000b70
(gdb) print trav->pd
$3 = (struct ibv_pd *) 0x0

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list