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

c++: fatal error: Killed signal terminated program cc1plus on Jetson Orin Nano #9

Closed
lida2003 opened this issue Jun 5, 2024 · 27 comments

Comments

@lida2003
Copy link

lida2003 commented Jun 5, 2024

What's wrong? BTW it's latest code from git hub.

PS: I have sucessfully build fast-planner, although there is segfault issue.

[ 91%] Building CXX object hierarchical_coverage_planner/CMakeFiles/hcplanner_exec.dir/src/hcplanner.cpp.o
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [hierarchical_coverage_planner/CMakeFiles/hcplanner_exec.dir/build.make:63: hierarchical_coverage_planner/CMakeFiles/hcplanner_exec.dir/src/hcplanner.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2916: hierarchical_coverage_planner/CMakeFiles/hcplanner_exec.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 92%] Linking CXX executable /home/daniel/HKUST/FC-Planner/FC-Planner/devel/lib/viewpoint_manager/viewpoint_manager_node
[ 93%] Linking CXX executable /home/daniel/HKUST/FC-Planner/FC-Planner/devel/lib/viewpoint_manager/skeleton_viewpoint_node
/usr/bin/ld: warning: libopencv_features2d.so.4.2, needed by /usr/lib/aarch64-linux-gnu/libopencv_calib3d.so.4.2.0, may conflict with libopencv_features2d.so.409
[ 93%] Built target skeleton_viewpoint_node
[ 93%] Built target viewpoint_manager_node
[ 95%] Building CXX object hierarchical_coverage_planner/CMakeFiles/hcplanner.dir/src/hcopp.cpp.o
[ 95%] Building CXX object hierarchical_coverage_planner/CMakeFiles/hcplanner.dir/src/hcsolver.cpp.o
[ 95%] Building CXX object hierarchical_coverage_planner/CMakeFiles/hcplanner.dir/src/hctraj.cpp.o
[ 96%] Linking CXX shared library /home/daniel/HKUST/FC-Planner/FC-Planner/devel/lib/libhcplanner.so
[ 96%] Built target hcplanner
make: *** [Makefile:141: all] Error 2
Invoking "make -j6 -l6" failed
@Chen-Albert-FENG
Copy link
Member

According to your output in terminal "c++: fatal error: Killed signal terminated program cc1plus", I only can provide one possible reason: this error is usually caused by the compiler using more memory than the system has available during the compilation process, causing the system to kill the compilation process. Otherwise, could you provide more details about your machine?

@lida2003
Copy link
Author

lida2003 commented Jun 5, 2024

it's jetson orin nano 8GB RAM.

Does hcplanner.cpp need that kind of much RAM to compile? BTW, what kind of hardware are you using for dev, maybe we can consider buy one if possible. Just keep hardware with minimum difference. But I really hope it can be run on Jestson Orin series boards.

[ 91%] Building CXX object hierarchical_coverage_planner/CMakeFiles/hcplanner_exec.dir/src/hcplanner.cpp.o
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [hierarchical_coverage_planner/CMakeFiles/hcplanner_exec.dir/build.make:63: hierarchical_coverage_planner/CMakeFiles/hcplanner_exec.dir/src/hcplanner.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2916: hierarchical_coverage_planner/CMakeFiles/hcplanner_exec.dir/all] Error 2

@Chen-Albert-FENG
Copy link
Member

Maybe you can try compile this project using one thread, use this command "catkin_make -j1".

@lida2003
Copy link
Author

lida2003 commented Jun 6, 2024

It works, but I got blank view with below commands:

$ sudo cpufreq-set -g performance
$ source devel/setup.bash && roslaunch hierarchical_coverage_planner rviz.launch
$ source devel/setup.bash && roslaunch hierarchical_coverage_planner mbs.launch

图片

@Chen-Albert-FENG
Copy link
Member

Chen-Albert-FENG commented Jun 6, 2024

You should carefully follow the steps shown in README, where "trigger" is located at the top of your Rviz.
20240606-164548

@Chen-Albert-FENG
Copy link
Member

Hi! Have you successfully run it? @lida2003

@lida2003
Copy link
Author

lida2003 commented Jun 6, 2024

@Chen-Albert-FENG Thanks for quick response. I recorded a short video, which might give some dynamic process of the operation. It seems exception is occured when triggering [2D Nav Goal].

https://www.bilibili.com/video/BV18D421g7kj/

@Chen-Albert-FENG
Copy link
Member

Chen-Albert-FENG commented Jun 7, 2024

Could you provide more details about the errors, e.g., the terminal output? @lida2003

@Chen-Albert-FENG
Copy link
Member

@lida2003 In your video, I cannot see what happened in your terminal. Therefore, I run FC-Planner on my machine and take a screenshot of my terminal as a reference. When you trigger [2D Nav Goal], you will see outputs in the terminal, as shown below:
20240607-102840
20240607-102844
After that, Rviz will show,
20240607-102848

@Chen-Albert-FENG
Copy link
Member

@lida2003 May I know some possible solution. You can compile the LKH solver on your machine again by 'cd src/hierarchical_coverage_planner/solution/LKH && make'.

@lida2003
Copy link
Author

lida2003 commented Jun 7, 2024

@Chen-Albert-FENG This is the log from two terminals. And video is just a dynamic process, detailed issue, please check below:

mbs.launch - test.log
rviz.launch - test2.log

@Chen-Albert-FENG
Copy link
Member

Chen-Albert-FENG commented Jun 7, 2024

@lida2003 I have already updated the README. You can try it when you feel free.
20240607-104956

@Chen-Albert-FENG Chen-Albert-FENG changed the title c++: fatal error: Killed signal terminated program cc1plus c++: fatal error: Killed signal terminated program cc1plus on Jetson Orin Nano Jun 7, 2024
@Chen-Albert-FENG
Copy link
Member

@lida2003 Is there still some errors?

@lida2003
Copy link
Author

lida2003 commented Jun 7, 2024

OK, I thought I have install LKH-3.0.6, so I don't need to install this.

But it failed compiling LKH in FC-Planner src. Does it has something to do with my LKH-3.0.6?

daniel@nvidia:~/HKUST/FC-Planner/FC-Planner/src/hierarchical_coverage_planner/solution/LKH$ make
make -C SRC all
make[1]: Entering directory '/home/daniel/HKUST/FC-Planner/FC-Planner/src/hierarchical_coverage_planner/solution/LKH/SRC'
make LKH
make[2]: Entering directory '/home/daniel/HKUST/FC-Planner/FC-Planner/src/hierarchical_coverage_planner/solution/LKH/SRC'
cc -c -o OBJ/Activate.o Activate.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/AddCandidate.o AddCandidate.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/AddExtraCandidates.o AddExtraCandidates.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/AddTourCandidates.o AddTourCandidates.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/AdjustCandidateSet.o AdjustCandidateSet.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/AdjustClusters.o AdjustClusters.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/AllocateStructures.o AllocateStructures.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Ascent.o Ascent.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Best2OptMove.o Best2OptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Best3OptMove.o Best3OptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Best4OptMove.o Best4OptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Best5OptMove.o Best5OptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/BestKOptMove.o BestKOptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Between.o Between.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Between_SL.o Between_SL.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Between_SSL.o Between_SSL.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/BridgeGain.o BridgeGain.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/BuildKDTree.o BuildKDTree.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/C.o C.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/CandidateReport.o CandidateReport.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/ChooseInitialTour.o ChooseInitialTour.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Connect.o Connect.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/CreateCandidateSet.o CreateCandidateSet.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
CreateCandidateSet.c: In function ‘CreateCandidateSet’:
CreateCandidateSet.c:23:12: warning: unused variable ‘EntryTime’ [-Wunused-variable]
   23 |     double EntryTime = GetTime();
      |            ^~~~~~~~~
cc -c -o OBJ/CreateDelaunayCandidateSet.o CreateDelaunayCandidateSet.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/CreateNNCandidateSet.o CreateNNCandidateSet.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Create_POPMUSIC_CandidateSet.o Create_POPMUSIC_CandidateSet.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/CreateQuadrantCandidateSet.o CreateQuadrantCandidateSet.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Delaunay.o Delaunay.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Distance.o Distance.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Distance_SPECIAL.o Distance_SPECIAL.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/eprintf.o eprintf.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/ERXT.o ERXT.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Excludable.o Excludable.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Exclude.o Exclude.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/FindTour.o FindTour.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/FixedOrCommonCandidates.o FixedOrCommonCandidates.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Flip.o Flip.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Flip_SL.o Flip_SL.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Flip_SSL.o Flip_SSL.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Forbidden.o Forbidden.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/FreeStructures.o FreeStructures.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/fscanint.o fscanint.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Gain23.o Gain23.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/GenerateCandidates.o GenerateCandidates.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Genetic.o Genetic.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/GeoConversion.o GeoConversion.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/GetTime.o GetTime.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/GreedyTour.o GreedyTour.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Hashing.o Hashing.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Heap.o Heap.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/IsBackboneCandidate.o IsBackboneCandidate.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/IsCandidate.o IsCandidate.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/IsCommonEdge.o IsCommonEdge.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/IsPossibleCandidate.o IsPossibleCandidate.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/KSwapKick.o KSwapKick.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/LinKernighan.o LinKernighan.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/LKHmain.o LKHmain.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Make2OptMove.o Make2OptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Make3OptMove.o Make3OptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Make4OptMove.o Make4OptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/Make5OptMove.o Make5OptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/MakeKOptMove.o MakeKOptMove.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/MergeTourWithBestTour.o MergeTourWithBestTour.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/MergeWithTourIPT.o MergeWithTourIPT.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/MergeWithTourGPX2.o MergeWithTourGPX2.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
cc -c -o OBJ/gpx.o gpx.c -O3 -Wall -IINCLUDE -DTWO_LEVEL_TREE -g
make[2]: *** No rule to make target 'OBJ/MergeWithTourCLARIST.o', needed by 'LKH'.  Stop.
make[2]: Leaving directory '/home/daniel/HKUST/FC-Planner/FC-Planner/src/hierarchical_coverage_planner/solution/LKH/SRC'
make[1]: *** [Makefile:59: all] Error 2
make[1]: Leaving directory '/home/daniel/HKUST/FC-Planner/FC-Planner/src/hierarchical_coverage_planner/solution/LKH/SRC'
make: *** [Makefile:2: all] Error 2

@Chen-Albert-FENG
Copy link
Member

Chen-Albert-FENG commented Jun 7, 2024

@lida2003 Actually, I have not encountered this compilation error but you can try deleting the executable file 'LKH' and then compiling it.
20240607-112446

@Chen-Albert-FENG
Copy link
Member

@lida2003 BTW, I have tested in different machines but there are no LKH compilation and FC-Planner errors... :( Maybe the errors is introduced by gcc version? I use gcc9 and what is yours? gcc10 is not supported.

@lida2003
Copy link
Author

lida2003 commented Jun 7, 2024

Right now, it's 9.4.0

$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@Chen-Albert-FENG
Copy link
Member

@lida2003 Have you tested my suggestion already? What's the results?

@lida2003
Copy link
Author

lida2003 commented Jun 7, 2024

@lida2003 Have you tested my suggestion already? What's the results?

Remove LKH doesn't help. And I noticed that there are obj/exec file( which is x86 format, LKH: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d8d91de75a1792544e41e95688fa039cc9dd8cab, for GNU/Linux 3.2.0, with debug_info, not stripped
) in github.

Is there any script will invoke binary LKH, using relative path?

@lida2003
Copy link
Author

lida2003 commented Jun 7, 2024

@Chen-Albert-FENG which version of LKH are you using?

make[2]: *** No rule to make target 'OBJ/MergeWithTourCLARIST.o', needed by 'LKH'.  Stop.

@Chen-Albert-FENG
Copy link
Member

@lida2003 I think you can directly replace LKH by changing a original one in http://webhotel4.ruc.dk/~keld/research/LKH/

@lida2003
Copy link
Author

lida2003 commented Jun 7, 2024

I copyed LKH 3.0.6 binary from RACER, and subsitute x86 binary. It works!

I think we can remove LKH source code, and modify readme as RACER

BTW, related scripts should be updated.

图片

@Chen-Albert-FENG
Copy link
Member

Fine. I will update some details. Thank you for testing our project!

@Chen-Albert-FENG
Copy link
Member

I copyed LKH 3.0.6 binary from RACER, and subsitute x86 binary. It works!

I think we can remove LKH source code, and modify readme as RACER

BTW, related scripts should be updated.

图片

I figured out the compilation problem since I lost two .c file and now I have added them.

@lida2003
Copy link
Author

lida2003 commented Jun 7, 2024

I think LKH is an opensouce, it's OK to be maintained by LKH.
If I know the scripts, then I can try to fix it (remove LKH source, add readme as RACER).

@Chen-Albert-FENG
Copy link
Member

Chen-Albert-FENG commented Jun 7, 2024

I think LKH is an opensouce, it's OK to be maintained by LKH. If I know the scripts, then I can try to fix it (remove LKH source, add readme as RACER).

FYI, I changed some source code in LKH, thus I cannot do the same documentation as RACER.

@lida2003
Copy link
Author

lida2003 commented Jun 7, 2024

@Chen-Albert-FENG It's a just suggestion. And I have found those lines about LKH. it's NOT a ROS/apt package anyway. So I think it's OK with me.

./hierarchical_coverage_planner/src/hcsolver.cpp:97:      string command_ = "cd " + GlobalSolver_ + " && ./LKH " + GlobalPar_;
./hierarchical_coverage_planner/src/hcsolver.cpp:987:    local_command_ = "cd " + GlobalSolver_ + " && ./LKH " + LocalParF_;
./hierarchical_coverage_planner/launch/pipe.launch:96:  <param name="hcplanner/global_solver" value="$(find hierarchical_coverage_planner)/solution/LKH" type="string"/>
./hierarchical_coverage_planner/launch/mbs.launch:96:  <param name="hcplanner/global_solver" value="$(find hierarchical_coverage_planner)/solution/LKH" type="string"/>
./hierarchical_coverage_planner/launch/christ.launch:97:  <param name="hcplanner/global_solver" value="$(find hierarchical_coverage_planner)/solution/LKH" type="string"/>

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

2 participants