0

I'm trying to install Tensorflow Serving , I followed the steps availble on Tensorflow website ,but when I run the following command :

bazel build tensorflow_serving/...

after a long time (like 30 minutes or more) I receive following error.

gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.

I attached a screenshot to provide full report, I'm using Ubuntu and I installed Bazel version 0.2 . I already searched and apparently it can be the problem of running out of memory but I couldn't find how to solve it .

Error report Image

It would be very helpful if anyone knows the solution .

  • maybe you ran out of memory? – Michael Jaros May 02 '16 at 14:35
  • In the log I can't find any command that says that I ran out of memory ,in case I did how can I solve the problem ? currently I have 4 gig of ram – Shahin Shahkarami May 02 '16 at 14:45
  • There are compiler switches (ggc-min-expand, ggc-min-heapsize) to control gcc's garbage collection. If you manage to pass those switches with reasonable values to gcc, you could get it to work. An easier approach is probably to try it with some extra swap space (use `mkswap` and `swapon`), see here: http://stackoverflow.com/questions/19761226/how-to-compile-ruby-with-rvm-on-a-low-memory-system – Michael Jaros May 02 '16 at 15:37
  • It looks like your screenshot cuts of just below the actual error (the red ERROR message is at the top of the screen and what caused the error is above that). Maybe run `bazel build //whatever &> log` to pipe the error messages to a file, so you can see what's actually causing the error. – kris May 02 '16 at 23:42
  • @kristina I ran it again and I saw that there is no new information there . It's just talking about the timing and how many job is left to be done . – Shahin Shahkarami May 03 '16 at 13:20
  • It should give you an error message. Your output so far hasn't actually said what the error is. – kris May 03 '16 at 20:53
  • @MichaelJaros I used those commands , I got the same error – Shahin Shahkarami May 04 '16 at 11:35
  • How much swap space did you add? And have a look here, maybe that helps: https://github.com/tensorflow/tensorflow/issues/349 – Michael Jaros May 04 '16 at 13:44
  • @MichaelJaros 1 Gigabyete , I tried it on a server with 65 gb of ram ,It got installed perfectly ,and I was watching memory usage while installation and I saw it uses aroun 19 gb of memory at times. In the link that you gave me , it's for Tensorflow , not Tensorflow serving , I wonder if it's the same and I should pass '--local_resources 2048,.5,1.0' ? – Shahin Shahkarami May 04 '16 at 14:12
  • Let's see if I understand you correctly: You had 4 GB of RAM on the first machine, and you added 1 GB of swap on that machine, and it didn't work. Then you tried on a second machine with 65 GB and it worked, and you saw you needed 19 GB? Then I'd suggest adding 20 GB of swap instead of 1 GB to make it build on the first machine. – Michael Jaros May 04 '16 at 14:17

0 Answers0