[gmx-users] segmentation fault

John Mercer jmercer at duke.edu
Wed Jul 11 01:26:27 CEST 2007


Mac OS X 10.4.10, bash shell

Two installation of GROMACS one using binaries from the gromacs site  
(installed in "/usr/local/gromacs") and the other by fink (installed  
in "/sw/bin" and other subdirectories of "/sw") give the same result  
but here illustrated by the fink installation:

1. GROMACS' programs execute in "/sw/bin"  with ./program

2. or in other directories with "/sw/bin/program"

3. otherwise one gets a segmentation fault if only "program" is used

PATH contains ":.:" and ":/sw/bin:" as well as other directories.
/etc/profile also sources "GMXRC.bash" installing "GMX*" stuff in the  

I have experimented with "PATH" deleting, rearranging, or changing  
directories always keeping necessary files for GROMACS.   The most  
consistent predictor of whether a GROMACS' program will execute  
without its full path name is the length of the PATH variable-a  
little over 500 bytes.

I have looked at system calls with "ktrace" and "kdump" for "luck"  
and "x2top" with similar results for both up to SIGSEGV.  I have also  
compared lines up to SIGSEGV for "luck" with and without the full  
path name.  The last few lines for the "luck" comparison follow:

as "luck"

1197 luck     CALL  open(0x3a7b34,0,0x1b6)
1197 luck     NAMI  "/sw/share/gromacs/top/gurgle.dat"
1197 luck     RET   open 3
1197 luck     CALL  close(0x3)
1197 luck     RET   close 0
1197 luck     PSIG  SIGSEGV SIG_DFL

as "/sw/bin/luck"

3991 luck     CALL  open(0x3a8b34,0,0x1b6)
3991 luck     NAMI  "/sw/share/gromacs/top/gurgle.dat"
3991 luck     RET   open 3
3991 luck     CALL  fstat(0x3,0xbfffe6a8)
3991 luck     RET   fstat 0
3991 luck     CALL  read(0x3,0x1800800,0x1000)
3991 luck     GIO   fd 3 read 4096 bytes
continues with a normal exit

Is it possible that "PATH" is stored in some hard coded variable that  
fixes its length?

-John Mercer

More information about the gromacs.org_gmx-users mailing list