[gmx-developers] memory problem?

Michael Shirts mrshirts at gmail.com
Fri Nov 20 00:27:33 CET 2009


I'm getting a weird crash that only shows up occasionally -- changing
things like ifdefs can turn it on or off.  When I find a situation it
occurs in,
and I valgrid it, I'm getting something like this:

==58808== Invalid read of size 8
==58808==    at 0x27DAB7: nb_kernel332_ia32_sse2.nb332_unroll_loop (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//ke\
rnel/mdrun)
==58808==    by 0x2A3C1B: do_nonbonded (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x630E9: do_force_lowlevel (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0xBC1C2: do_force (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x17102: do_md (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x125FD: mdrunner (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x1119C: mdrunner_threads (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x1C163: main (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==  Address 0x16bba60 is 9,248 bytes inside a block of size 33,600 free'd
==58808==    at 0x563035: free (vg_replace_malloc.c:325)
==58808==    by 0x1441AD: save_free (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0xC774A: done_tabledata (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0xC9650: make_tables (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x605D0: make_nbf_tables (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x62329: init_forcerec (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x11E48: mdrunner (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x1119C: mdrunner_threads (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)
==58808==    by 0x1C163: main (in
/Users/mrshirts/work/gromacs_allv/git/gromacs_mrs/src//kernel/mdrun)

I haven't touched any of these files in my edits, and no other
valgrind errors appear before this.  Looking over the code, I don't
see anything particularly wrong with done_tabledata, which frees three
tabledata arrays that appear to always be allocated first.  Any ideas?

Best,
Michael



More information about the gromacs.org_gmx-developers mailing list