Bug 466208 - openmpi perform invalid free operations and leaks memory.
Summary: openmpi perform invalid free operations and leaks memory.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: openmpi
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Doug Ledford
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-09 07:50 UTC by Pawel Salek
Modified: 2009-07-14 14:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-14 14:07:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pawel Salek 2008-10-09 07:50:53 UTC
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):
openmpi-libs-1.2.4-2.fc9.x86_64

How reproducible:
Always:

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..."
      else
         print *, "MPI_Init failed with code ", info
      end if
      end
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== 
==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== 
==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 19:11:34 UTC
Jay is helping out with Open MPI issues, so added him to the Cc list.

Comment 2 Bug Zapper 2009-06-10 02:55:00 UTC
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Bug Zapper 2009-07-14 14:07:13 UTC
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.