Compiler intermittently hangs on Raspberry Pi

Often when I compile this relatively large project on my RPi 3B with Arch Linux, the compiler gets to a certain point and hangs. If I leave it there, eventually I get a timeout message:

INFO: task kworker/u8:2:26034 blocked for more than 120 seconds.

You can see the rest of the output here:

If I kill the compiler and recompile, without changing anything, it usually compiles just fine (though sometimes I end up repeating this 2 or 3 times before it finally successfully compiles).

Does anyone have any clues on what this might be? How to debug?

I have tried changing vm.dirty_background_ratio and vm.dirty_ratio as suggested here, it didn’t seem to help.

how many core are you using? the more core you are using the more RAM you need, sometimes to compile a large project on the rPi2 i have to use just two core ( make -j2 ) otherwise the RAM won’t be insufficient (and when the RAM isn’t enough it just hangs until i hit CTRL+C).

1 Like

This works like a charm. I was unaware of the -j option. Thanks!

1 Like