Bug 466208 - openmpi perform invalid free operations and leaks memory.
openmpi perform invalid free operations and leaks memory.
Product: Fedora
Classification: Fedora
Component: openmpi (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Doug Ledford
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-09 03:50 EDT by Pawel Salek
Modified: 2009-07-14 10:07 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-14 10:07:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pawel Salek 2008-10-09 03:50:53 EDT
Description of problem:
A trivial mpi program shows that openmpi leaks memory and tries to free an apparently unallocated block

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

How reproducible:

Steps to Reproduce:
1. Compile trivial mpi program:
      program mpitst
      print *,"initializing"
      call mpi_init(info)
      if(info.eq.0) then
         call mpi_finalize(info)
         print *, "MPI basic test passed..."
         print *, "MPI_Init failed with code ", info
      end if
2. Run it under valgrind
Actual results:
==9634== Invalid free() / delete / delete[]
==9634==    at 0x4A0609F: free (vg_replace_malloc.c:323)
==9634==    by 0x33B8F214AA: free_mem (in /lib64/libc-2.8.so)
==9634==    by 0x33B8F21031: __libc_freeres (in /lib64/libc-2.8.so)
==9634==    by 0x4802344: _vgnU_freeres (vg_preloaded.c:60)
==9634==    by 0x33B8E35924: exit (in /lib64/libc-2.8.so)
==9634==    by 0x33B8E1E330: (below main) (in /lib64/libc-2.8.so)
==9634==  Address 0x50f1848 is not stack'd, malloc'd or (recently) free'd
==9634== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 1)
==9634== malloc/free: in use at exit: 45,763 bytes in 150 blocks.
==9634== malloc/free: 13,177 allocs, 13,028 frees, 6,005,942 bytes allocated.
==9634== For counts of detected errors, rerun with: -v
==9634== searching for pointers to 150 not-freed blocks.
==9634== checked 388,896 bytes.
==9634== LEAK SUMMARY:
==9634==    definitely lost: 23,372 bytes in 105 blocks.
==9634==      possibly lost: 0 bytes in 0 blocks.
==9634==    still reachable: 22,391 bytes in 45 blocks.

Expected results:
valgrind should report no invalid frees, and no memory leaks.

Additional info:
Similar program in C exposes the same problem in the openmpi library - that is, it is not a program in the fortran wrapper only.

#include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[])
  int rc = MPI_Init(&argc, &argv);
  if(rc == MPI_SUCCESS) {
    rc = MPI_Finalize(); printf("Finalize returns %d\n", rc);
  } else
    printf("MPI_Init returned %d\n", rc);
  return rc;
Comment 1 Doug Ledford 2009-03-19 15:11:34 EDT
Jay is helping out with Open MPI issues, so added him to the Cc list.
Comment 2 Bug Zapper 2009-06-09 22:55:00 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 3 Bug Zapper 2009-07-14 10:07:13 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.