Project

General

Profile

Bug #2619

Segfault in gmx trjconv

Added by Michael Brunsteiner about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
core library
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Hi,

this is gmx 2018.2 on:
uname -a
Linux rcpetemp1 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
compiled with: cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_GPU=on && make && make install

given a pdb file (as included further below as text) i see:

prompt> gmx trjconv -f a3.pdb -o a3.trr

                     :-) GROMACS - gmx trjconv, 2018.2 (-:

                            GROMACS is written by:
     Emile Apol      Rossen Apostolov      Paul Bauer     Herman J.C. Berendsen
    Par Bjelkmar    Aldert van Buuren   Rudi van Drunen     Anton Feenstra  
  Gerrit Groenhof    Aleksei Iupinov   Christoph Junghans   Anca Hamuraru   
 Vincent Hindriksen Dimitrios Karkoulis    Peter Kasson        Jiri Kraus    
  Carsten Kutzner      Per Larsson      Justin A. Lemkul    Viveca Lindahl  
  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-2017, 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 trjconv, version 2018.2
Executable:   /home/micb/local/gmx-2018.2-bin/bin/gmx
Data prefix:  /home/micb/local/gmx-2018.2-bin
Working dir:  /home/micb/current/A2-JnJ-ASD/ff/apis/05-fogal1
Command line:
  gmx trjconv -f a3.pdb -o a3.trr

Will write trr: Trajectory in portable xdr format
Reading frame       0 time    0.000   Reading frames from pdb file
Precision of a3.pdb is 0.0001 (nm)
 '', 21 atoms   0 time    0.000      
Last frame          0 time    0.000   

*** Error in `gmx': munmap_chunk(): invalid pointer: 0x00007f09afee9f30 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f09b59ef7e5]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x1a8)[0x7f09b59fc698]
/home/micb/local/gmx-2018.2-bin/bin/../lib/libgromacs.so.3(_Z8done_topP10t_topology+0x36)[0x7f09b68932d6]
/home/micb/local/gmx-2018.2-bin/bin/../lib/libgromacs.so.3(gmx_trjconv+0x173d)[0x7f09b6b3d92d]
/home/micb/local/gmx-2018.2-bin/bin/../lib/libgromacs.so.3(_ZN3gmx24CommandLineModuleManager3runEiPPc+0x334)[0x7f09b677c764]
gmx[0x40e19c]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f09b5998830]
gmx[0x40e279]
======= Memory map: ========
00400000-0043f000 r-xp 00000000 09:00 159132051                          /home/micb/local/gmx-2018.2-bin/bin/gmx
0063e000-0063f000 r--p 0003e000 09:00 159132051                          /home/micb/local/gmx-2018.2-bin/bin/gmx
0063f000-00640000 rw-p 0003f000 09:00 159132051                          /home/micb/local/gmx-2018.2-bin/bin/gmx
00640000-00641000 rw-p 00000000 00:00 0
00ae5000-00b89000 rw-p 00000000 00:00 0                                  [heap]
7f09adb18000-7f09adb56000 r-xp 00000000 09:00 118883017                  /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
7f09adb56000-7f09add55000 ---p 0003e000 09:00 118883017                  /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
7f09add55000-7f09add56000 r--p 0003d000 09:00 118883017                  /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
7f09add56000-7f09add57000 rw-p 0003e000 09:00 118883017                  /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
7f09add57000-7f09add94000 r-xp 00000000 09:00 119015649                  /usr/lib/atlas-base/atlas/libblas.so.3.0
7f09add94000-7f09adf94000 ---p 0003d000 09:00 119015649                  /usr/lib/atlas-base/atlas/libblas.so.3.0
7f09adf94000-7f09adf95000 rw-p 0003d000 09:00 119015649                  /usr/lib/atlas-base/atlas/libblas.so.3.0
7f09adf95000-7f09ae0be000 r-xp 00000000 09:00 118884583                  /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
7f09ae0be000-7f09ae2bd000 ---p 00129000 09:00 118884583                  /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
7f09ae2bd000-7f09ae2be000 r--p 00128000 09:00 118884583                  /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
7f09ae2be000-7f09ae2c0000 rw-p 00129000 09:00 118884583                  /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
7f09ae2c0000-7f09ae657000 r-xp 00000000 09:00 119015650                  /usr/lib/atlas-base/libatlas.so.3.0
7f09ae657000-7f09ae857000 ---p 00397000 09:00 119015650                  /usr/lib/atlas-base/libatlas.so.3.0
7f09ae857000-7f09ae85e000 rw-p 00397000 09:00 119015650                  /usr/lib/atlas-base/libatlas.so.3.0
7f09ae85e000-7f09ae87f000 r-xp 00000000 09:00 119015654                  /usr/lib/atlas-base/libcblas.so.3.0
7f09ae87f000-7f09aea7f000 ---p 00021000 09:00 119015654                  /usr/lib/atlas-base/libcblas.so.3.0
7f09aea7f000-7f09aea80000 rw-p 00021000 09:00 119015654                  /usr/lib/atlas-base/libcblas.so.3.0
7f09aea80000-7f09aea89000 r-xp 00000000 09:00 118888640                  /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.1
7f09aea89000-7f09aec88000 ---p 00009000 09:00 118888640                  /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.1
7f09aec88000-7f09aec89000 r--p 00008000 09:00 118888640                  /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.1
7f09aec89000-7f09aec8a000 rw-p 00009000 09:00 118888640                  /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.1
7f09aec8a000-7f09aec94000 r-xp 00000000 09:00 118884840                  /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
7f09aec94000-7f09aee93000 ---p 0000a000 09:00 118884840                  /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
7f09aee93000-7f09aee94000 r--p 00009000 09:00 118884840                  /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
7f09aee94000-7f09aee95000 rw-p 0000a000 09:00 118884840                  /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
7f09aee95000-7f09aeeb6000 r-xp 00000000 09:00 118883416                  /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
7f09aeeb6000-7f09af0b5000 ---p 00021000 09:00 118883416                  /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
7f09af0b5000-7f09af0b6000 r--p 00020000 09:00 118883416                  /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
7f09af0b6000-7f09af0b7000 rw-p 00021000 09:00 118883416                  /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
7f09af0b7000-7f09af696000 r-xp 00000000 09:00 119015633                  /usr/lib/atlas-base/atlas/liblapack.so.3.0
7f09af696000-7f09af896000 ---p 005df000 09:00 119015633                  /usr/lib/atlas-base/atlas/liblapack.so.3.0
7f09af896000-7f09af89b000 rw-p 005df000 09:00 119015633                  /usr/lib/atlas-base/atlas/liblapack.so.3.0
7f09af89b000-7f09af8bb000 r-xp 00000000 09:00 119015632                  /usr/lib/atlas-base/libf77blas.so.3.0
7f09af8bb000-7f09afaba000 ---p 00020000 09:00 119015632                  /usr/lib/atlas-base/libf77blas.so.3.0
7f09afaba000-7f09afabb000 rw-p 0001f000 09:00 119015632                  /usr/lib/atlas-base/libf77blas.so.3.0
7f09afabb000-7f09afaf4000 r-xp 00000000 09:00 118884449                  /usr/lib/x86_64-linux-gnu/libhwloc.so.5.6.8
7f09afaf4000-7f09afcf3000 ---p 00039000 09:00 118884449                  /usr/lib/x86_64-linux-gnu/libhwloc.so.5.6.8
7f09afcf3000-7f09afcf4000 r--p 00038000 09:00 118884449                  /usr/lib/x86_64-linux-gnu/libhwloc.so.5.6.8
7f09afcf4000-7f09afcf5000 rw-p 00039000 09:00 118884449                  /usr/lib/x86_64-linux-gnu/libhwloc.so.5.6.8
7f09afcf5000-7f09b50f5000 r-xp 00000000 09:00 116922177                  /usr/local/cuda-9.2/lib64/libcufft.so.9.2.148
7f09b50f5000-7f09b52f4000 ---p 05400000 09:00 116922177                  /usr/local/cuda-9.2/lib64/libcufft.so.9.2.148
7f09b52f4000-7f09b5302000 rw-p 053ff000 09:00 116922177                  /usr/local/cuda-9.2/lib64/libcufft.so.9.2.148
7f09b5302000-7f09b534f000 rw-p 00000000 00:00 0
7f09b534f000-7f09b5356000 r-xp 00000000 09:00 273060910                  /lib/x86_64-linux-gnu/librt-2.23.so
7f09b5356000-7f09b5555000 ---p 00007000 09:00 273060910                  /lib/x86_64-linux-gnu/librt-2.23.so
7f09b5555000-7f09b5556000 r--p 00006000 09:00 273060910                  /lib/x86_64-linux-gnu/librt-2.23.so
7f09b5556000-7f09b5557000 rw-p 00007000 09:00 273060910                  /lib/x86_64-linux-gnu/librt-2.23.so
7f09b5557000-7f09b555a000 r-xp 00000000 09:00 273053355                  /lib/x86_64-linux-gnu/libdl-2.23.so
7f09b555a000-7f09b5759000 ---p 00003000 09:00 273053355                  /lib/x86_64-linux-gnu/libdl-2.23.so
7f09b5759000-7f09b575a000 r--p 00002000 09:00 273053355                  /lib/x86_64-linux-gnu/libdl-2.23.so
7f09b575a000-7f09b575b000 rw-p 00003000 09:00 273053355                  /lib/x86_64-linux-gnu/libdl-2.23.so
7f09b575b000-7f09b5773000 r-xp 00000000 09:00 273053349                  /lib/x86_64-linux-gnu/libpthread-2.23.so
7f09b5773000-7f09b5972000 ---p 00018000 09:00 273053349                  /lib/x86_64-linux-gnu/libpthread-2.23.so
7f09b5972000-7f09b5973000 r--p 00017000 09:00 273053349                  /lib/x86_64-linux-gnu/libpthread-2.23.so
7f09b5973000-7f09b5974000 rw-p 00018000 09:00 273053349                  /lib/x86_64-linux-gnu/libpthread-2.23.so
7f09b5974000-7f09b5978000 rw-p 00000000 00:00 0
7f09b5978000-7f09b5b38000 r-xp 00000000 09:00 273053351                  /lib/x86_64-linux-gnu/libc-2.23.so
7f09b5b38000-7f09b5d38000 ---p 001c0000 09:00 273053351                  /lib/x86_64-linux-gnu/libc-2.23.so
7f09b5d38000-7f09b5d3c000 r--p 001c0000 09:00 273053351                  /lib/x86_64-linux-gnu/libc-2.23.so
7f09b5d3c000-7f09b5d3e000 rw-p 001c4000 09:00 273053351                  /lib/x86_64-linux-gnu/libc-2.23.so
7f09b5d3e000-7f09b5d42000 rw-p 00000000 00:00 0
7f09b5d42000-7f09b5d58000 r-xp 00000000 09:00 273023138                  /lib/x86_64-linux-gnu/libgcc_s.so.1
7f09b5d58000-7f09b5f57000 ---p 00016000 09:00 273023138                  /lib/x86_64-linux-gnu/libgcc_s.so.1
7f09b5f57000-7f09b5f58000 rw-p 00015000 09:00 273023138                  /lib/x86_64-linux-gnu/libgcc_s.so.1
7f09b5f58000-7f09b6060000 r-xp 00000000 09:00 273053343                  /lib/x86_64-linux-gnu/libm-2.23.so
7f09b6060000-7f09b625f000 ---p 00108000 09:00 273053343                  /lib/x86_64-linux-gnu/libm-2.23.so
7f09b625f000-7f09b6260000 r--p 00107000 09:00 273053343                  /lib/x86_64-linux-gnu/libm-2.23.so
7f09b6260000-7f09b6261000 rw-p 00108000 09:00 273053343                  /lib/x86_64-linux-gnu/libm-2.23.so
7f09b6261000-7f09b63d3000 r-xp 00000000 09:00 118882804                  /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f09b63d3000-7f09b65d3000 ---p 00172000 09:00 118882804                  /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f09b65d3000-7f09b65dd000 r--p 00172000 09:00 118882804                  /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f09b65dd000-7f09b65df000 rw-p 0017c000 09:00 118882804                  /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f09b65df000-7f09b65e3000 rw-p 00000000 00:00 0
7f09b65e3000-7f09b9061000 r-xp 00000000 09:00 159131921                  /home/micb/local/gmx-2018.2-bin/lib/libgromacs.so.3.2.0
7f09b9061000-7f09b9260000 ---p 02a7e000 09:00 159131921                  /home/micb/local/gmx-2018.2-bin/lib/libgromacs.so.3.2.0
7f09b9260000-7f09b927d000 r--p 02a7d000 09:00 159131921                  /home/micb/local/gmx-2018.2-bin/lib/libgromacs.so.3.2.0
7f09b927d000-7f09b92a2000 rw-p 02a9a000 09:00 159131921                  /home/micb/local/gmx-2018.2-bin/lib/libgromacs.so.3.2.0
7f09b92a2000-7f09b92a6000 rw-p 00000000 00:00 0
7f09b92a6000-7f09b92cc000 r-xp 00000000 09:00 273053347                  /lib/x86_64-linux-gnu/ld-2.23.so
7f09b9481000-7f09b948d000 rw-p 00000000 00:00 0
7f09b94c9000-7f09b94cb000 rw-p 00000000 00:00 0
7f09b94cb000-7f09b94cc000 r--p 00025000 09:00 273053347                  /lib/x86_64-linux-gnu/ld-2.23.so
7f09b94cc000-7f09b94cd000 rw-p 00026000 09:00 273053347                  /lib/x86_64-linux-gnu/ld-2.23.so
7f09b94cd000-7f09b94ce000 rw-p 00000000 00:00 0
7ffc27f8e000-7ffc27fb0000 rw-p 00000000 00:00 0                          [stack]
7ffc27fe3000-7ffc27fe6000 r--p 00000000 00:00 0                          [vvar]
7ffc27fe6000-7ffc27fe8000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

example pdb:

ATOM      1  O   ASP     1       2.789   1.249   0.110  0.00  0.00
ATOM      2  C   ASP     1       2.347   0.118   0.242  0.00  0.00
ATOM      3  C   ASP     1       0.887  -0.207   0.351  0.00  0.00
ATOM      4  O   ASP     1       3.087  -1.073   0.270  0.00  0.00
ATOM      5  C   ASP     1       4.497  -1.073   0.131  0.00  0.00
ATOM      6  C   ASP     1       5.282  -0.057   0.686  0.00  0.00
ATOM      7  C   ASP     1       6.668  -0.079   0.525  0.00  0.00
ATOM      8  C   ASP     1       7.278  -1.123  -0.167  0.00  0.00
ATOM      9  C   ASP     1       6.501  -2.158  -0.690  0.00  0.00
ATOM     10  C   ASP     1       5.106  -2.150  -0.534  0.00  0.00
ATOM     11  C   ASP     1       4.364  -3.301  -1.114  0.00  0.00
ATOM     12  O   ASP     1       4.766  -3.924  -2.081  0.00  0.00
ATOM     13  O   ASP     1       3.253  -3.650  -0.431  0.00  0.00
ATOM     14  H   ASP     1       0.339   0.696   0.638  0.00  0.00
ATOM     15  H   ASP     1       0.721  -0.959   1.127  0.00  0.00
ATOM     16  H   ASP     1       0.517  -0.562  -0.613  0.00  0.00
ATOM     17  H   ASP     1       4.839   0.768   1.237  0.00  0.00
ATOM     18  H   ASP     1       7.273   0.727   0.934  0.00  0.00
ATOM     19  H   ASP     1       8.357  -1.134  -0.298  0.00  0.00
ATOM     20  H   ASP     1       6.989  -2.975  -1.220  0.00  0.00
ATOM     21  H   ASP     1       3.083  -3.100   0.356  0.00  0.00

Associated revisions

Revision 54f9fa9d (diff)
Added by Paul Bauer about 1 year ago

Fix trjconv when running without a structure file

When running trjconv without a reference structure file,
the topology information would be left uninitialized and
cause subsequent crashes during the deallocation.

Added tests to cover this behaviour.

Fixes #2619

Change-Id: I501c560ee0f8afca00bc78fd6f81b6841b5a5b57

History

#1 Updated by Paul Bauer about 1 year ago

Hello, please upload the PDB file as an attachment here, because the formatting gets changed in the form.
Thanks!

#2 Updated by Paul Bauer about 1 year ago

Confirmed with another PDB I had available. The issue seems to be caused by not providing a topology when converting and the automatic routines getting confused.

#3 Updated by Gerrit Code Review Bot about 1 year ago

Gerrit received a related patchset '1' for Issue #2619.
Uploader: Paul Bauer ()
Change-Id: gromacs~release-2018~I6f780075a8077f2cb0a141a777d9f430de21e4c2
Gerrit URL: https://gerrit.gromacs.org/8209

#4 Updated by Paul Bauer about 1 year ago

  • Status changed from New to Fix uploaded

#5 Updated by Mark Abraham about 1 year ago

  • Description updated (diff)

#6 Updated by Mark Abraham about 1 year ago

  • Subject changed from Error in `gmx': munmap_chunk(): invalid pointer ... core dump to Segfault in gmx trjconv

#7 Updated by Gerrit Code Review Bot about 1 year ago

Gerrit received a related patchset '1' for Issue #2619.
Uploader: Paul Bauer ()
Change-Id: gromacs~release-2018~I501c560ee0f8afca00bc78fd6f81b6841b5a5b57
Gerrit URL: https://gerrit.gromacs.org/8217

#8 Updated by Paul Bauer about 1 year ago

  • Status changed from Fix uploaded to Resolved

#9 Updated by Paul Bauer about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF