[gmx-developers] make_ndx 4.0 segfaults with tprs

David van der Spoel spoel at xray.bmc.uu.se
Tue Oct 14 13:53:03 CEST 2008


Carsten Kutzner wrote:
> Hi,
> 
> we have a problem with make_ndx of Gromacs 4.0 here. While it works
> fine with gro files, it always segfaults when it has to deal with
> a tpr file. I have an older version dated 2008-08-11 in which the
> problem is not present. I have attached some debugger information.
> 
I have similar memory problems in other parts of the code.

I thought of implementing something akin to ElectricFence functionality 
into the smalloc routines, which would be turned on whenever you select 
the -debug option. Do you think that would be useful?

> Carsten
> 
> 
> -----------------------
> Reading file g_opt_0.tpr, VERSION 4.0 (single precision)
> 
> Reading structure file
> Reading file g_opt_0.tpr, VERSION 4.0 (single precision)
> *** glibc detected *** /home/ckutzne/gromacs/4.0/src/tools/make_ndx: 
> double free or corruption (!prev): 0x00000000007ffcf0 ***
> ======= Backtrace: =========
> /lib64/libc.so.6[0x2b92cb6ba21d]
> /lib64/libc.so.6(cfree+0x76)[0x2b92cb6bbf76]
> /home/ckutzne/gromacs/4.0/src/tools/make_ndx[0x41fc87]
> -----------------------
> 
> 
> Here is the debugger info:
> 
> Program received signal SIGABRT, Aborted.
> 0x00002b8bba560b45 in raise () from /lib64/libc.so.6
> (gdb) up
> #1  0x00002b8bba5620e0 in abort () from /lib64/libc.so.6
> (gdb) up
> #2  0x00002b8bba598fbb in ?? () from /lib64/libc.so.6
> (gdb) up
> #3  0x00002b8bba59e21d in ?? () from /lib64/libc.so.6
> (gdb) up
> #4  0x00002b8bba59ff76 in free () from /lib64/libc.so.6
> (gdb) up
> #5  0x000000000041fc87 in save_free (name=0x599b00 "at->resname", 
> file=0x599ab0 "typedefs.c", line=230, ptr=0x7ffcf0) at smalloc.c:195
> (gdb) up
> #6  0x000000000043eb23 in done_atom (at=0x7fc148) at typedefs.c:230
> (gdb) up
> #7  0x000000000043eb5a in done_moltype (molt=0x7fc140) at typedefs.c:238
> (gdb) up
> #8  0x000000000043ecc0 in done_mtop (mtop=0x7c6050, bDoneSymtab=0) at 
> typedefs.c:272
> (gdb) up
> #9  0x000000000040c21b in read_stx_conf (infile=0x7c66e0 "g_opt_0.tpr", 
> title=0x7ffff0bfc460 "GUANYLIN (A-FORM) (ENDOGENOUS LIGAND TO THE HEAT 
> STABLE in water", atoms=0x7c64d0, x=0x7d6800, v=0x7e2720, 
> ePBC=0x7ffff0bfc454, box=0x7ffff0bfc430) at confio.c:1341
> /home/ckutzne/gromacs/4.0/src/gmxlib/confio.c:1341:32935:beg:0x40c21b
> (gdb) up
> #10 0x0000000000406a79 in main (argc=1, argv=0x7ffff0bfd5d8) at 
> make_ndx.c:1116
> (gdb)
> 
> 
> 
> 


-- 
David van der Spoel, Ph.D., Professor of Biology
Molec. Biophys. group, Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205. Fax: +4618511755.
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se



More information about the gromacs.org_gmx-developers mailing list