Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Fork bomb by csg_inverse if shared library missing #600

Closed
marvinbernhardt opened this issue Oct 13, 2020 · 13 comments · Fixed by #601
Closed

Fork bomb by csg_inverse if shared library missing #600

marvinbernhardt opened this issue Oct 13, 2020 · 13 comments · Fixed by #601

Comments

@marvinbernhardt
Copy link
Contributor

marvinbernhardt commented Oct 13, 2020

When i do csg_inverse and i don't load the intel module (for mkl), it just says Terminated, no inverse.log is created, and lots of inverse.sh processes get spawned. Tested with the current master branch.
I don't really know where or how to debug this, so any ideas are welcome.

@junghans
Copy link
Member

Can you try to run csg_property --help? And look for errors.

@JensWehner
Copy link
Member

Was it compiled with MKL ?

@marvinbernhardt
Copy link
Contributor Author

@junghans

$ csg_property --help
csg_property: error while loading shared libraries: libmkl_core.so: cannot open shared object file: No such file or directory

@JensWehner
Yes, it was. It was compiled with

module load gcc/7.3.1
module load boost/nompi/gcc/1.67.0
module load gsl/gcc/2.5
module load eigen/gcc/3.3.5
module load fftw/gcc/single/sse/3.3.8
module load fftw/gcc/double/sse/3.3.8
module load gromacs/nompi/cpu/gcc/single/2018.2
module load intel/env/2018

nd the problem occurs if I run it with all loaded but intel.

@JensWehner
Copy link
Member

so your csg was compiled with intel. So csg needs to know where the MKL library is at runtime. If you do not load it csg will run and then try to call the mkl and then the error is thrown.

@junghans
Copy link
Member

Could you build it with -DENABLE_RPATH_INJECT=On?

@marvinbernhardt
Copy link
Contributor Author

marvinbernhardt commented Oct 13, 2020

so your csg was compiled with intel. So csg needs to know where the MKL library is at runtime. If you do not load it csg will run and then try to call the mkl and then the error is thrown.

Ah yeah, it might actually compile with the intel compiler, did not realise this.
Anyway, I think it is correct to throw an error and stop. But the error message doesn't help, plus the infinite process spawning which is annoying.

@JensWehner
Copy link
Member

It is not compiled with the intel compiler, it is probably linked against the intel math library, which votca does by default if it finds one on the system.

@JensWehner
Copy link
Member

against the process spawning, I think that is part of the scripts @junghans

@marvinbernhardt
Copy link
Contributor Author

Could you build it with -DENABLE_RPATH_INJECT=On?

This fixes the problem!

@JensWehner
Copy link
Member

@junghans can you explain why it fixes the problem? :)

@JensWehner
Copy link
Member

ahh it basically tells votca, where these other libraries might be, so you do not have to load them. Clever...

@junghans
Copy link
Member

It happens surprising often that libraroes can not be found a run time, so I think I will add a check to start sequence of csg_inverse to make the user aware of this issue instead of going into an endless fork bomb.

@junghans
Copy link
Member

ahh it basically tells votca, where these other libraries might be, so you do not have to load them. Clever...

Yeah basically this option makes votca remember where libraries were found at compile time and inject that path into the rpath of the installed binaries. But that doesn't work on all system though.

The main reason the fork bomb happens is that csg_inverse tries to read a value from the xml file and that fails due to missing library and then it tries to issue an error message for which it tries to read another value from the xml file and so on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants