Project

General

Profile

Bug #238

Memory leak in mshift.c

Added by Jussi Lehtola over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Created an attachment (id=306)
Example files to trigger crash

There seems to be some memory leak problems in rm_pbc that occur in m_shift. I have been able to trigger the odd behaviour by declaring a few ints in my analysis program.

The program included is an early development version which contains many important bugs in the analysis phase; however I include this since it is a lot simpler than the current (working) version.

Compile
gcc -o bondana-works -lm -lmd -lgmx -Wall -g bondanalyze-gmx-works.c
gcc -o bondana -lm -lmd -lgmx -Wall -g bondanalyze-gmx.c

and run with
./bondana -f confout.gro -s ajo.tpr

(gro and tpr files included in attachment)

gdb output:
Program received signal SIGSEGV, Segmentation fault.
mk_graph_ilist (fplog=<value optimized out>, ilist=<value optimized out>, at_start=<value optimized out>, at_end=<value optimized out>, bShakeOnly=<value optimized out>,
bSettle=<value optimized out>, g=<value optimized out>) at ../../../src/gmxlib/mshift.c:227
/usr/src/debug/gromacs-4.0/src/gmxlib/mshift.c:227:6315:beg:0x354444a318

examplefiles.tar.bz2 (66.8 KB) examplefiles.tar.bz2 Example files to trigger crash Jussi Lehtola, 10/22/2008 11:28 AM

History

#1 Updated by Jussi Lehtola over 11 years ago

Happens both on Fedora 9 [gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)] and RHEL 5 [gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)].

The version of Gromacs I've used is the 4.0 release.

#2 Updated by Jussi Lehtola over 11 years ago

Nothing also changes if I regenerate the input file with grompp version 4.0. (Attachment was made with 3.3.3)

#3 Updated by Jussi Lehtola over 11 years ago

Further info: the system is 64-bit with 4GB of memory.

Gromacs build logs at
http://kojipkgs.fedoraproject.org/packages/gromacs/4.0/3.fc9/data/logs/x86_64/build.log

#4 Updated by Jussi Lehtola over 11 years ago

Whoops, my bad. Had a wrong argument in rm_pbc.

Also available in: Atom PDF