[gmx-users] gmx distance -- gmx: double free or corruption

Mark Abraham mark.j.abraham at gmail.com
Tue Nov 29 15:27:48 CET 2016


Hi,

That looks like something can be improved in the code, but it's hard to say
what. Can you open another Redmine issue with repo files please? If a
single pdb frame reproduces it, then that would likely be best.

I see you've tried to use -sf to simplify common subexpressions - that's
likely a good idea in general. See e.g. gmx help selections evaluation.

Mark

On Fri, Nov 25, 2016 at 8:45 PM Christopher Neale <
chris.neale at alum.utoronto.ca> wrote:

> Please ignore the mention of this being an amber trajectory. I can
> reproduce the exact same behaviour by gmx distance -s my.pdb -f my.pdb , so
> the issue can be reproduced on the information in a PDB file alone (and
> that pdb looks just fine in VMD).
>
> Thank you,
> Chris.
>
> ________________________________________
> From: gromacs.org_gmx-users-bounces at maillist.sys.kth.se <
> gromacs.org_gmx-users-bounces at maillist.sys.kth.se> on behalf of
> Christopher Neale <chris.neale at alum.utoronto.ca>
> Sent: 25 November 2016 14:33:51
> To: Discussion list for GROMACS users
> Subject: [gmx-users] gmx distance -- gmx: double free or corruption
>
> This sender failed our fraud detection checks and may not be who they
> appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing
>
> Dear Users:
>
> I am having trouble with gmx distance crashing in gromacs 5.1.2. I am
> trying to analyze the distance of different peptide residues from the
> center of a lipid bilayer. have CA atoms on residues 2-20 and also on
> residues 22-40 (2 peptides). If I try to do residues 2-20 it works fine. If
> I try to do residues 22 to 40, I get a memory error. Funny thing is, I
> narrowed it down to see that 22-36 is OK but 22-37 fails, then when I try
> 37 alone it is OK, and selections of 26-40 also work. Please note that all
> these tests were repeated 2x on an allocation with 128 GB of memory, so I
> don’t think I’m just describing a stochastic failure.
>
> I didn’t try newer versions of gromacs, but there is nothing in the
> release notes for any newer version that mentions “distance” or “select”
> that seems to be related to this.
>
> ## I run like this:
> inpstr=$(for((i=22;i<=40;i++)); do echo -n "com of (residue $i and name
> CA) plus com of (resname POPC or resname POPS) plus "; done|sed "s/plus
> $//")
> gmx distance -s gromacs.tpr -f gromacs.xtc -n index.ndx -select "$inpstr"
> -oxyz depthB.xvg
>
> I’ve also tried giving gmx distance a .pdb as input to the -s option,
> where I first ran gmx editconf -resnr 1 just to avoid any issues with
> possible double residue counting in the .tpr file, and the result is the
> same crash.
>
> I checked that the .pdb and the .xtc have the same number of atoms with
> gmx check  and I also ran gmx select on these groups to ensure that an atom
> was picked up in all cases (it was). Also, VMD loading the .pdb extracted
> from the .tpr and the .xtc gives a sensible trajectory.
>
> As a final note, the simulation was actually run in amber. I then used a
> plugin-aware version go gmx trjconv to read in the amber netcdf trajectory
> file and output a gromacs .xtc file, which I used in a non-plugin-aware
> version of gromacs for the analyses. The .tpr was generated for the same
> system (actually, I generated the gromacs .tpr from a grompp -pp .top file
> that was used in amber tool parmed gromber to set up the amber run).
>
> ## The output (with error) is this:
>
>                  :-) GROMACS - gmx distance, VERSION 5.1.2 (-:
>
>                             GROMACS is written by:
>      Emile Apol      Rossen Apostolov  Herman J.C. Berendsen    Par
> Bjelkmar
>  Aldert van Buuren   Rudi van Drunen     Anton Feenstra   Sebastian Fritsch
>   Gerrit Groenhof   Christoph Junghans   Anca Hamuraru    Vincent
> Hindriksen
>  Dimitrios Karkoulis    Peter Kasson        Jiri Kraus      Carsten Kutzner
>     Per Larsson      Justin A. Lemkul   Magnus Lundborg   Pieter Meulenhoff
>    Erik Marklund      Teemu Murtola       Szilard Pall       Sander Pronk
>    Roland Schulz     Alexey Shvetsov     Michael Shirts     Alfons Sijbers
>    Peter Tieleman    Teemu Virolainen  Christian Wennberg    Maarten Wolf
>                            and the project leaders:
>         Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel
>
> Copyright (c) 1991-2000, University of Groningen, The Netherlands.
> Copyright (c) 2001-2015, The GROMACS development team at
> Uppsala University, Stockholm University and
> the Royal Institute of Technology, Sweden.
> check out http://www.gromacs.org for more information.
>
> GROMACS is free software; you can redistribute it and/or modify it
> under the terms of the GNU Lesser General Public License
> as published by the Free Software Foundation; either version 2.1
> of the License, or (at your option) any later version.
>
> GROMACS:      gmx distance, VERSION 5.1.2
> Executable:
>  /oasis/scratch/comet/cneale/temp_project/exec/gromacs-5.1.2/exec_serial/bin/gmx
> Data prefix:
> /oasis/scratch/comet/cneale/temp_project/exec/gromacs-5.1.2/exec_serial
> Command line:
>   gmx distance -s gromacs.tpr -f gromacs.xtc -n index.ndx -select 'com of
> (residue 22 and name CA) plus com of (resname POPC or resname POPS) plus
> com of (residue 23 and name CA) plus com of (resname POPC or resname POPS)
> plus com of (residue 24 and name CA) plus com of (resname POPC or resname
> POPS) plus com of (residue 25 and name CA) plus com of (resname POPC or
> resname POPS) plus com of (residue 26 and name CA) plus com of (resname
> POPC or resname POPS) plus com of (residue 27 and name CA) plus com of
> (resname POPC or resname POPS) plus com of (residue 28 and name CA) plus
> com of (resname POPC or resname POPS) plus com of (residue 29 and name CA)
> plus com of (resname POPC or resname POPS) plus com of (residue 30 and name
> CA) plus com of (resname POPC or resname POPS) plus com of (residue 31 and
> name CA) plus com of (resname POPC or resname POPS) plus com of (residue 32
> and name CA) plus com of (resname POPC or resname POPS) plus com of
> (residue 33 and name CA) plus com of (resname POPC or resname POPS) plus
> com of (residue 34 and name CA) plus com of (resname POPC or resname POPS)
> plus com of (residue 35 and name CA) plus com of (resname POPC or resname
> POPS) plus com of (residue 36 and name CA) plus com of (resname POPC or
> resname POPS) plus com of (residue 37 and name CA) plus com of (resname
> POPC or resname POPS) plus com of (residue 38 and name CA) plus com of
> (resname POPC or resname POPS) plus com of (residue 39 and name CA) plus
> com of (resname POPC or resname POPS) plus com of (residue 40 and name CA)
> plus com of (resname POPC or resname POPS) ' -oxyz depthB.xvg
>
> *** glibc detected *** gmx: double free or corruption (!prev):
> 0x00000000019fcbd0 ***
> ======= Backtrace: =========
> /lib64/libc.so.6[0x369ca75f4e]
> /lib64/libc.so.6[0x369ca78cf0]
> /lib64/libc.so.6[0x369ca7bc80]
> /lib64/libc.so.6(realloc+0x158)[0x369ca7bf78]
> gmx(save_realloc+0x35)[0x54abb5]
>
> gmx(_Z24_gmx_sel_lexer_add_tokenPN3gmx17SelectionLocationEPKciP15gmx_sel_lexer_t+0xc3)[0x99b0f3]
>
> gmx(_Z14_gmx_sel_yylexP7YYSTYPEPN3gmx17SelectionLocationEPv+0x8a2)[0x998022]
> gmx[0x966f88]
> gmx(_ZN3gmx19SelectionCollection15parseFromStringERKSs+0x61)[0x967441]
>
> gmx(_ZN3gmx22SelectionOptionManager18convertOptionValueEPNS_22SelectionOptionStorageERKSsb+0x1e)[0x96d82e]
> gmx(_ZN3gmx21AbstractOptionStorage11appendValueERKSs+0x35)[0x51eca5]
> gmx(_ZN3gmx17CommandLineParser5parseEPiPPc+0x335)[0x893065]
> gmx(_ZN3gmx35TrajectoryAnalysisCommandLineRunner3runEiPPc+0x1c9)[0x74bb49]
>
> gmx(_ZN3gmx35TrajectoryAnalys+0xommandLineRunner4Impl23RunnerCommandLineModule3runEiPPc4c)[0x74b8bc]
> gmx(_ZN3gmx24CommandLineModuleManager3runEiPPc+0x295)[0x4aca25]
> gmx(main+0xc5)[0x4922d5]
> /lib64/libc.so.6(__libc_start_main+0xfd)[0x369ca1ed5d]
> gmx[0x4920c9]
> ======= Memory map: ========
> 00400000-01647000 r-xp 00000000 54c:64a02 1891512467004187318
> /oasis/scratch/comet/cneale/temp_project/exec/gromacs-5.1.2/exec_serial/bin/gmx
> 01846000-01874000 rw-p 01246000 54c:64a02 1891512467004187318
> /oasis/scratch/comet/cneale/temp_project/exec/gromacs-5.1.2/exec_serial/bin/gmx
> 01874000-0187f000 rw-p 00000000 00:00 0
> 019e3000-01a25000 rw-p 00000000 00:00 0
> [heap]
> 369c600000-369c620000 r-xp 00000000 08:01 4718636
> /lib64/ld-2.12.so
> 369c81f000-369c820000 r--p 0001f000 08:01 4718636
> /lib64/ld-2.12.so
> 369c820000-369c821000 rw-p 00020000 08:01 4718636
> /lib64/ld-2.12.so
> 369c821000-369c822000 rw-p 00000000 00:00 0
> 369ca00000-369cb8a000 r-xp 00000000 08:01 4718640
> /lib64/libc-2.12.so
> 369cb8a000-369cd8a000 ---p 0018a000 08:01 4718640
> /lib64/libc-2.12.so
> 369cd8a000-369cd8e000 r--p 0018a000 08:01 4718640
> /lib64/libc-2.12.so
> 369cd8e000-369cd8f000 rw-p 0018e000 08:01 4718640
> /lib64/libc-2.12.so
> 369cd8f000-369cd94000 rw-p 00000000 00:00 0
> 369ce00000-369ce83000 r-xp 00000000 08:01 4718695
> /lib64/libm-2.12.so
> 369ce83000-369d082000 ---p 00083000 08:01 4718695
> /lib64/libm-2.12.so
> 369d082000-369d083000 r--p 00082000 08:01 4718695
> /lib64/libm-2.12.so
> 369d083000-369d084000 rw-p 00083000 08:01 4718695
> /lib64/libm-2.12.so
> 369d200000-369d217000 r-xp 00000000 08:01 4718654
> /lib64/libpthread-2.12.so
> 369d217000-369d417000 ---p 00017000 08:01 4718654
> /lib64/libpthread-2.12.so
> 369d417000-369d418000 r--p 00017000 08:01 4718654
> /lib64/libpthread-2.12.so
> 369d418000-369d419000 rw-p 00018000 08:01 4718654
> /lib64/libpthread-2.12.so
> 369d419000-369d41d000 rw-p 00000000 00:00 0
> 369d600000-369d602000 r-xp 00000000 08:01 4718691
> /lib64/libdl-2.12.so
> 369d602000-369d802000 ---p 00002000 08:01 4718691
> /lib64/libdl-2.12.so
> 369d802000-369d803000 r--p 00002000 08:01 4718691
> /lib64/libdl-2.12.so
> 369d803000-369d804000 rw-p 00003000 08:01 4718691
> /lib64/libdl-2.12.so
> 369da00000-369da07000 r-xp 00000000 08:01 4718655
> /lib64/librt-2.12.so
> 369da07000-369dc06000 ---p 00007000 08:01 4718655
> /lib64/librt-2.12.so
> 369dc06000-369dc07000 r--p 00006000 08:01 4718655
> /lib64/librt-2.12.so
> 369dc07000-369dc08000 rw-p 00007000 08:01 4718655
> /lib64/librt-2.12.so
> 369de00000-369de15000 r-xp 00000000 08:01 4718675
> /lib64/libz.so.1.2.3
> 369de15000-369e014000 ---p 00015000 08:01 4718675
> /lib64/libz.so.1.2.3
> 369e014000-369e015000 r--p 00014000 08:01 4718675
> /lib64/libz.so.1.2.3
> 369e015000-369e016000 rw-p 00015000 08:01 4718675
> /lib64/libz.so.1.2.3
> 2ba3dc377000-2ba3dc379000 rw-p 00000000 00:00 0
> 2ba3dc391000-2ba3dc393000 rw-p 00000000 00:00 0
> 2ba3dc393000-2ba3dc478000 r-xp 00000000 00:1d 42601288
>  /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libiomp5.so
> 2ba3dc478000-2ba3dc678000 ---p 000e5000 00:1d 42601288
>  /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libiomp5.so
> 2ba3dc678000-2ba3dc683000 rw-p 000e5000 00:1d 42601288
>  /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libiomp5.so
> 2ba3dc683000-2ba3dc6ab000 rw-p 00000000 00:00 0
> 2ba3dc6ab000-2ba3dc79e000 r-xp 00000000 08:01 922724
>  /opt/gnu/gcc/lib64/libstdc++.so.6.0.20
> 2ba3dc79e000-2ba3dc99d000 ---p 000f3000 08:01 922724
>  /opt/gnu/gcc/lib64/libstdc++.so.6.0.20
> 2ba3dc99d000-2ba3dc9a6000 r--p 000f2000 08:01 922724
>  /opt/gnu/gcc/lib64/libstdc++.so.6.0.20
> 2ba3dc9a6000-2ba3dc9a8000 rw-p 000fb000 08:01 922724
>  /opt/gnu/gcc/lib64/libstdc++.so.6.0.20
> 2ba3dc9a8000-2ba3dc9be000 rw-p 00000000 00:00 0
> 2ba3dc9be000-2ba3dc9d4000 r-xp 00000000 08:01 922663
>  /opt/gnu/gcc/lib64/libgcc_s.so.1
> 2ba3dc9d4000-2ba3dcbd3000 ---p 00016000 08:01 922663
>  /opt/gnu/gcc/lib64/libgcc_s.so.1
> 2ba3dcbd3000-2ba3dcbd4000 rw-p 00015000 08:01 922663
>  /opt/gnu/gcc/lib64/libgcc_s.so.1
> 2ba3dcbd4000-2ba3dcbd9000 rw-p 00000000 00:00 0
> 2ba3e0000000-2ba3e0021000 rw-p 00000000 00:00 0
> 2ba3e0021000-2ba3e4000000 ---p 00000000 00:00 0
> 7fffa657e000-7fffa6595000 rw-p 00000000 00:00 0
> [stack]
> 7fffa65e5000-7fffa65e6000 r-xp 00000000 00:00 0
> [vdso]
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0
> [vsyscall]
> /var/spool/slurmd/job6096391/slurm_script: line 20:  4142 Aborted
>        gmx distance -s gromacs.tpr -f gromacs.xtc -n index.ndx -select
> "$inpstr" -oxyz depthB.xvg
>
>
> ##########
>
> I’ve also tried with -sf rather than -select, using a file with contents
> like this:
>
> $ cat my.selection
> bilayer=com of (resname POPC or resname POPS);
> residue 22 and name CA plus bilayer;
> residue 23 and name CA plus bilayer;
> residue 24 and name CA plus bilayer;
> residue 25 and name CA plus bilayer;
> residue 26 and name CA plus bilayer;
> residue 27 and name CA plus bilayer;
> residue 28 and name CA plus bilayer;
> residue 29 and name CA plus bilayer;
> residue 30 and name CA plus bilayer;
> (etc...)
>
> and I get the same type of crash.
>
>
> Finally, I also tried using just POPC not POPC/POPS in the selection to
> cut down on the number of atoms, but it did not help.
>
> Thanks for any advice.
> Chris.
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list