Skip to content

Double free in oob/ud #5672

@jsquyres

Description

@jsquyres

A user reports in https://www.mail-archive.com/[email protected]/msg32650.html that they're getting a double free in orted. Looking at the stack trace, it's in oob/ud:

libibverbs: GRH is mandatory For RoCE address handle
*** Error in `/apps/brussel/CO7/ivybridge-ib/software/OpenMPI/3.1.1-GCC-7.3.0-2.30/bin/orted': double free or corruption (out): 0x00002aaab4001680 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81499)[0x2aaaabdfd499]
/apps/brussel/CO7/ivybridge-ib/software/OpenMPI/3.1.1-GCC-7.3.0-2.30/lib/openmpi/mca_oob_ud.so(mca_oob_ud_peer_from_uri+0xb9)[0x2aaaac9b1f39]
/apps/brussel/CO7/ivybridge-ib/software/OpenMPI/3.1.1-GCC-7.3.0-2.30/lib/openmpi/mca_oob_ud.so(+0x5fd8)[0x2aaaac9affd8]
/apps/brussel/CO7/ivybridge-ib/software/OpenMPI/3.1.1-GCC-7.3.0-2.30/lib/openmpi/mca_oob_ud.so(+0x4b2f)[0x2aaaac9aeb2f]
/apps/brussel/CO7/ivybridge-ib/software/OpenMPI/3.1.1-GCC-7.3.0-2.30/lib/libopen-rte.so.40(orte_oob_base_send_nb+0x1131)[0x2aaaaab32c21]
/apps/brussel/CO7/ivybridge-ib/software/OpenMPI/3.1.1-GCC-7.3.0-2.30/lib/libopen-pal.so.40(opal_libevent2022_event_base_loop+0xd89)[0x2aaaaac00459]
/apps/brussel/CO7/ivybridge-ib/software/OpenMPI/3.1.1-GCC-7.3.0-2.30/lib/libopen-pal.so.40(+0x369ae)[0x2aaaaabbf9ae]
/lib64/libpthread.so.0(+0x7e25)[0x2aaaabb67e25]
/lib64/libc.so.6(clone+0x6d)[0x2aaaabe7abad]

There's a fairly obvious free() in an error path that is then followed by an OBJ_RELEASE() in the same error path. This PR simply removes the extra free(). This probably creates a minor memory leak, but the oob/ud has already been EOL'ed / removed from the upcoming v4.0.0.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions