[Pvfs2-users] Error with MALLOC_CHECK_ enabled

Wei-keng Liao wkliao at ece.northwestern.edu
Thu May 1 14:32:20 EDT 2008


Hi, Phil,

I upgraded to 2.7.1 and no longer see the error. Thanks.

Wei-keng

On Tue, 29 Apr 2008, Phil Carns wrote:

> Hi Wei-keng,
> 
> I think this has probably been fixed in 2.7.1 if you are able to try 
> that.  I just tried to reproduce your problem using that version and 
> everything seemed to be Ok.
> 
> -Phil
> 
> Wei-keng Liao wrote:
> > I am running a simple MPI-IO program (attached) on PVFS 2.7.0.
> > When I set the environment variable MALLOC_CHECK_ to 1 or above, I got
> > error messages below: (No error if MALLOC_CHECK_ is not set and if file name
> > has "ufs:" prefix)
> > 
> > % mpicc -g pvfs2_bug.c -o pvfs2_bug
> > % setenv MALLOC_CHECK_ 3
> > % mpiexec -gdb -n 4 pvfs2_bug
> > malloc: using debugging hooks
> > malloc: using debugging hooks
> > 1: malloc: using debugging hooks
> > 2: malloc: using debugging hooks
> > 0: malloc: using debugging hooks
> > 3: malloc: using debugging hooks
> > 1: malloc: using debugging hooks
> > 2: malloc: using debugging hooks
> > 0: malloc: using debugging hooks
> > 3: malloc: using debugging hooks
> > 0-3:  (gdb) run /pvfs2/wkliao/testfile.dat
> > 0-3:  Continuing.
> > 1:  1:  Program received signal SIGSEGV, Segmentation fault.
> > 1:  0x00000038a3872190 in _int_free (av=0x38a3b52980, mem=0x79b300)
> > 1:      at malloc.c:4663
> > 1:  4663                unlink(nextchunk, bck, fwd);
> > 1:  (gdb) 1:  (gdb) where
> > 1:  #0  0x00000038a3872190 in _int_free (av=0x38a3b52980, mem=0x79b300)
> > 1:      at malloc.c:4663
> > 1:  #1  0x00000038a3876693 in free_check (mem=0x79b300, 1:
> > caller=<value optimized out>) at hooks.c:298
> > 1:  #2  0x00000038a3875ec7 in __libc_free (mem=0x0) at malloc.c:3590
> > 1:  #3  0x00000000004ea2cd in PINT_smcb_free ()
> > 1:  #4  0x0000000000486e84 in PINT_sys_release ()
> > 1:  #5  0x000000000048f4f1 in PVFS_sys_io ()
> > 1:  #6  0x0000000000444d54 in ADIOI_PVFS2_ReadContig ()
> > 1:  #7  0x000000000043cb64 in MPIOI_File_read ()
> > 1:  #8  0x0000000000408f8f in PMPI_File_read_at ()
> > 1:  #9  0x0000000000403e5d in main (argc=2, argv=0x7fff8b04d438) at
> > pvfs2_bug.c:29
> > 1:  (gdb) 
> > ---------------------------------------------------------------------------
> > pvfs2_bug.c
> > ---------------------------------------------------------------------------
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <mpi.h>
> > 
> > /*----< main()
> > >------------------------------------------------------------*/
> > int main(int argc, char **argv) {
> >     int            i, rank, np;
> >     char           buf[65536];
> >     MPI_File       fh;
> >     MPI_Status     status;
> >     MPI_Offset     offset;
> > 
> >     MPI_Init(&argc, &argv);
> >     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
> >     MPI_Comm_size(MPI_COMM_WORLD, &np);
> >     if (argc != 2) {
> >         if (rank == 0) fprintf(stderr,"Usage: %s filename\n",argv[0]);
> >         MPI_Finalize(); return 1;
> >     }
> > 
> >     MPI_File_open(MPI_COMM_WORLD, argv[1], MPI_MODE_CREATE | MPI_MODE_RDWR,
> >                   MPI_INFO_NULL, &fh);
> > 
> >     offset = rank * 65536;
> >     for (i=0; i<65536; i++) buf[i] = '0'+rank;
> >     MPI_File_write_at(fh, offset, buf, 65536, MPI_CHAR, &status);
> > 
> >     offset = ((rank+1)%np) * 65536;
> >     MPI_File_read_at(fh, offset, buf, 65536, MPI_CHAR, &status);
> > 
> >     MPI_File_close(&fh);
> > 
> >     MPI_Finalize();
> >     return 0;
> > }
> > 
> > _______________________________________________
> > Pvfs2-users mailing list
> > Pvfs2-users at beowulf-underground.org
> > http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users
> 
> 



More information about the Pvfs2-users mailing list