catkin_tools icon indicating copy to clipboard operation
catkin_tools copied to clipboard

The computer stops running while using catkin build.

Open SeifElBouhy opened this issue 5 years ago • 4 comments

Whenever I try to build my workspace and build new packages while using (catkin build) the computer stops working and I always restart it, so is there any solution for this problem. I was building the mavros package from this website https://dev.px4.io/en/ros/mavros_installation.html. I'm using Ubunto 16.04, and ROS kinetic.

SeifElBouhy avatar Apr 18 '19 14:04 SeifElBouhy

catkin build -j2 EDIT: To elaborate a little more, this issue is caused by running more jobs than you have cores. If the jobs are too CPU-intensive, your computer freezes. The majority of processors are quad core (or fake-quad core, having 2 cores but 4 threads), so using half is a start. If it still freezes, catkin build -j1 should work, unless you're on a Pentium 4 or something.

kmfrick avatar Apr 06 '20 16:04 kmfrick

@kmfrick That shouldn't be an issue. Catkin limits default jobs to the number of CPUs available using multiprocessing.cpu_count().

SoftwareApe avatar Sep 17 '20 07:09 SoftwareApe

@SoftwareApe multiprocessing.cpu_count() returns 4 on my dual-core CPU with HyperThreading, so this is an issue with such architectures (personally, I can confirm that as of June my computer would freeze when running catkin build on certain environments and wouldn't when running catkin build -j2 on the same environment)

kmfrick avatar Sep 17 '20 07:09 kmfrick

catkin build -j2 EDIT: To elaborate a little more, this issue is caused by running more jobs than you have cores. If the jobs are too CPU-intensive, your computer freezes. The majority of processors are quad core (or fake-quad core, having 2 cores but 4 threads), so using half is a start. If it still freezes, catkin build -j1 should work, unless you're on a Pentium 4 or something.

This worked for me thanks for the tip

doom-bhaiya avatar Sep 09 '22 16:09 doom-bhaiya