Bug #978

Bus error on Mac Os when running g_x2top -quiet -man nroff

Added by Christoph Junghans almost 7 years ago. Updated almost 7 years ago.

build system
Target version:
Affected version - extra info:
Affected version:


gdb says:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000001
0x00210ee1 in tMPI_Spinlock_trylock ()
(gdb) bt
#0 0x00210ee1 in tMPI_Spinlock_trylock ()
#1 0x00210f37 in tMPI_Lock_lock ()
#2 0x000d7f6e in gmx_fio_open ()
#3 0x000d8225 in gmx_fio_fopen ()
#4 0x0010989b in man_file ()
#5 0x0010b5a8 in parse_common_args ()
#6 0x000041fb in main (argc=1, argv=0xbfffe1c4) at /Users/junghans/Gentoo/var/tmp/portage/sci-chemistry/gromacs-4.6.9999/

This bug appears, when cmake generates the man pages.

gromacs.log (857 KB) gromacs.log build.log Christoph Junghans, 07/25/2012 12:59 AM


#1 Updated by Roland Schulz almost 7 years ago

What compiler? What OS version? What cmake options?

It doesn't seem to be happening with any of the Jenkins MacOS build configurations.

#2 Updated by Christoph Junghans almost 7 years ago

MacOs 10.8.0, gcc 4.2.1 (Gentoo 4.2.1_p5666-r1, Apple Inc. build 5666) (dot 3)

cmake --no-warn-unused-cli -C /Users/junghans/Gentoo/var/tmp/portage/sci-chemistry/gromacs-4.6.9999/work/gromacs-4.6.9999_float/gentoo_common_config.cmake -DCMAKE_INSTALL_PREFIX=/Users/junghans/Gentoo/usr -DGMX_FFT_LIBRARY=fftw3 -DGMX_X11=OFF -DGMX_EXTERNAL_BLAS=OFF -DGMX_GPU=OFF -DGMX_GSL=OFF -DGMX_EXTERNAL_LAPACK=OFF -DGMX_OPENMP=OFF -DGMX_XML=OFF -DGMX_DEFAULT_SUFFIX=off -DGMX_ACCELERATION=None -DGMXLIB=lib -DGMX_VMD_PLUGIN_PATH=/Users/junghans/Gentoo/usr/lib/vmd/plugins/*/molfile/ -DGMX_DOUBLE=OFF -DGMX_MPI=OFF -DGMX_THREAD_MPI=ON -DGMX_BINARY_SUFFIX= -DGMX_LIBS_SUFFIX= -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE=/Users/junghans/Gentoo/var/tmp/portage/sci-chemistry/gromacs-4.6.9999/work/gromacs-4.6.9999_float/gentoo_rules.cmake /Users/junghans/Gentoo/var/tmp/portage/sci-chemistry/gromacs-4.6.9999/work/gromacs-4.6.9999

Compiler flags:
C -O2 -pipe -march=prescott -g
C++ -O2 -pipe -march=prescott -g
Linker flags:
Executable -Wl,-dead_strip_dylibs -g
Module -Wl,-dead_strip_dylibs -g
Shared -Wl,-dead_strip_dylibs -g

#3 Updated by Christoph Junghans almost 7 years ago

  • Status changed from New to Closed

I found the problem, when executing g_x2top the already installed version of libmd was loaded, which causes a bus error. So I guess we should increase the so number at some point.

#4 Updated by Roland Schulz almost 7 years ago

On Linux this is usually prevented by a correct rpath. According to, Mac OS X has @rpath, @loader_path and @executable_path mechanism. I don't know anything about that, but could it be that the rpath settings are not correct for Darwin?

Also I think we should go ahead an increase the so version now or create a separate bug with a todo list for the release so that this isn't forgotten.

Also available in: Atom PDF