Score:1

Laptop Crashing when using Make - Possible Thermal Issues?

ar flag

I am running Ubuntu 20.04.2 on a Lenovo Thinkpad P52s and sometimes run into issues when I use the make command with multiple cores (using the -j flag). My screen will freeze and the laptop will become completely unresponsive, requiring a forced shutdown in order to bring it back to life. I have left it for a couple hours before in hopes that it will eventually become responsive again, but to no avail. This has happened on the same laptop running Ubuntu 16.04 and I believe 18.04 as well. Each new install is a fresh install rather than upgrading using the release upgrade tool.

I suspect thermal issues due to the CPU temperatures hitting somewhere in the realm of 75 C at the time of the crash and the fact that using a box fan to actively cool the laptop lowers my chances of crashing. I have installed thinkfan to get the CPU fan working more frequently at lower temperatures and believe that it has helped, but that could be my own confirmation bias.

EDIT:

As for the code that I am compiling with make, it is some custom code which heavily utilizes the GTSAM Library. GTSAM makes use of the Eigen and boost libraries as well. However, in the past, it seemed like arbitrary calls to make have caused issues as well. Unfortunately I do not recall what I was trying to build, but it was likely one of several ROS packages. I will look for some arbitrary code to compile with make to verify that my problem is agnostic to the specific project I have been working on recently.

magicbycalvin avatar
ar flag
@Nmath Thank you for the feedback. I have edited my question and will also attempt to build some arbitrary projects to verify whether or not the problem exists in my specific project.
cc flag
Have you validated your RAM recently? Multithreaded make can fill up whatever RAM is available, forcing swap, so check your disk also.
Score:0
it flag

System "freezes" are often caused by running too many, too large programs and running out of available memory. Use free to see if you have swap space, read man mkswap swapon fstab to create some. Swap space must be contiguous. use mkswap or fallocate, not dd. Traditionally, swap space of 1.5 × RAM has been recommended, but YMMV. If you don't plan to hibernate your system, you can have less than 1.0 × RAM.

magicbycalvin avatar
ar flag
While I will need to run some more tests to confirm, increasing my swap size may have done the trick. My installation only had a 2GB swap file but I increased it to 1.0 × RAM = 8GB. To increase the swap size, I followed the instructions found [here](https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-20-04/).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.