Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g++: internal compiler error: Killed (program cc1plus) - when build from Dockerfile #3781

Closed
32r81b opened this issue Dec 20, 2019 · 6 comments

Comments

@32r81b
Copy link

32r81b commented Dec 20, 2019

I ran comand:

docker build https://raw.githubusercontent.com/kaldi-asr/kaldi/master/docker/ubuntu16.04-gpu/Dockerfile

In the end I got this output:

make[1]: Entering directory '/opt/kaldi/src/chain'
g++ -std=c++11 -I.. -isystem /opt/kaldi/tools/openfst-1.6.7/include -O1  -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_MKL -I/opt/intel/mkl/include -m64 -msse -msse2 -pthread -g -fPIC -DHAVE_CUDA -I/usr/local/cuda/include -fPIC -pthread -isystem /opt/kaldi/tools/openfst-1.6.7/include   -c -o chain-supervision.o chain-supervision.cc
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
make[1]: *** [chain-supervision.o] Error 4
<builtin>: recipe for target 'chain-supervision.o' failed
make[1]: Leaving directory '/opt/kaldi/src/chain'
Makefile:136: recipe for target 'chain' failed
make: *** [chain] Error 2
The command '/bin/sh -c git clone --depth 1 https://github.com/kaldi-asr/kaldi.git /opt/kaldi &&     cd /opt/kaldi &&     cd /opt/kaldi/tools &&     ./extras/install_mkl.sh &&     make -j $(nproc) &&     cd /opt/kaldi/src &&     ./configure --shared --use-cuda &&     make depend -j $(nproc) &&     make -j $(nproc)' returned a non-zero code: 2

I appreciate any help.

@danpovey
Copy link
Contributor

These things always due to too little memory. (OOM killer). Not sure if this is something that the dockerfile should be fixed for because people have different types of machine. cc @mdoulaty, but closing the issue as probably we wouldn't regard it as a bug. Look for the -j option given to Make, and reduce the numeric argument or remove the option.

@32r81b
Copy link
Author

32r81b commented Dec 23, 2019

I have 16GB RAM on my local machine. In any case when I compale Kaldi on another machine all goes fine.

Thank you, Dan.

@32r81b
Copy link
Author

32r81b commented Dec 23, 2019

It happend becouse i start Odcker container on Windows host machine. Releated dicussion docker/for-win#403

@mdoulaty
Copy link
Contributor

How many CPU cores are visible to the Docker engine?
The image uses all of the available cores (that are available to the Docker engine) and it could well be that it’s running out of memory
You can try to explicitly set the number of cores for the make, replace ‘-j’ with ‘-j 1’ to see if it helps

@32r81b
Copy link
Author

32r81b commented Dec 23, 2019

@mdoulaty , I fix this problem with recreating docker machine with biger memory. By default Docker machine start with a small amount of memory.

docker-machine rm default
docker-machine create -d virtualbox --virtualbox-cpu-count=6 --virtualbox-memory=12096 --virtualbox-disk-size=100000  default 

@Lancelof2019
Copy link

This issue happens when there is not enough memory.

https://bugzilla.redhat.com/show_bug.cgi?id=1199418

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

No branches or pull requests

4 participants