apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Errors while building : /modules/dreamview/backend/BUILD

Open lostinet opened this issue 9 years ago • 12 comments

screen shot 2017-07-07 at 9 37 16 am excute bash apollo.sh build, and I failed with below error prompt:

lostinet avatar Jul 07 '17 01:07 lostinet

One thing I noticed is that you are using root@in_dev_docker. If you follow the README.md, you should be able to login docker dev environment without using root. Remeber to logout and login your system after bash docker/scripts/install_docker.sh

Another possible reason is that your computing resource is limited. I am trying to add a patch to limit the concurrent bazel build jobs.

startcode avatar Jul 07 '17 02:07 startcode

ran docker ps and access was denied after bash docker/scripts/install_docker.sh, assume those prior logout and login steps contribute no effect to work out the docker without sudo. am I ignoring anything visible in the guideline since I'm totally new to the docker environment. @startcode

lostinet avatar Jul 07 '17 02:07 lostinet

This looks like an internal compiler problem that might be due to limited system resource, e.g., insufficient memory. See https://github.com/tensorflow/serving/issues/13 for reference. It probably doesn't have anything to do with whether the user is root in docker.

Also you can run bazel build //modules/dreamview/backend/... to compile dreamview only to detect whether the problem is related to the build target.

siyangy avatar Jul 07 '17 03:07 siyangy

I agree with @siyangy that it is likely the resource problem. We just used a way to restrict the resource that bazel can consume.

@lostinet can you pull the latest code and try again? Thank you.

startcode avatar Jul 07 '17 03:07 startcode

@lostinet You can run dmesg to see if an OOM led to the compiler meltdown: https://stackoverflow.com/questions/30887143/make-j-8-g-internal-compiler-error-killed-program-cc1plus

siyangy avatar Jul 07 '17 03:07 siyangy

ERROR: Error during action cache initialization: Failed action cache referential integrity check: Validation mismatch: validation entry 8007 is too large compared to index size 4615. Corrupted files were renamed to '/root/.cache/bazel/_bazel_root/540135163923dd7d5820f3ee4b306b32/action_cache/*.bad'. Blaze will now reset action cache data, causing a full rebuild. INFO: From Writing file modules/localization/proto/libcamera_parameter_proto.a-2.params: external/glog/src/logging.cc: In static member function 'static void google::LogMessage::Fail()': external/glog/src/logging.cc:1489:1: warning: 'noreturn' function does return [enabled by default] } ^ ERROR: /apollo/modules/control/tools/BUILD:31:1: C++ compilation of rule '//modules/control/tools:control_tester' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g '-std=c++0x' '-DUSE_ESD_CAN=false' -MD -MF ... (remaining 91 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4. gcc: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate.

here's one more trial and one more error. @startcode @siyangy

lostinet avatar Jul 07 '17 03:07 lostinet

while dmesg there is a hint: out of memory: Kill process 60171(cc1plus) score 244 or sacrifice child. @siyangy

lostinet avatar Jul 07 '17 04:07 lostinet

Yeah that confirms the failure was due an OOM. How much memory do you have in your system?

siyangy avatar Jul 07 '17 04:07 siyangy

Also, as @startcode suggested, you can pull the newest code that limits the bazel job number to 10. We have verified internally that it could solve the similar compiler failure you have run into.

siyangy avatar Jul 07 '17 04:07 siyangy

well, just noticed my 16GB memory on MAC assigned merely 1GB to its virtual machine (Ubuntu). anyway, OOM error removed with updated codes!
@siyangy

lostinet avatar Jul 07 '17 08:07 lostinet

显示build失败,是否必须用制定的java 版本,并且必须在对应目录下面? buildfail

Seems that the build command should add "sudo". change to "sudo bash apollo.sh build "

wadewang6 avatar Jul 07 '17 08:07 wadewang6

@wadewang6 Can you create a new issue for this problem? This thread is a different problem and has been closed. Thanks.

startcode avatar Jul 07 '17 19:07 startcode