Balena OS restarts on compiling GRPC

When compiling GRPC on Balena Docker, Balena OS restarts itself after a certain progress. Here is what GRPC part looks like when compiling:

# Install GRPC
RUN echo "Installing GRPC"
RUN GRPC_DIR=/grpc && \
  git clone --depth 1 --branch $GRPC_VERSION --recurse-submodules $GRPC_DIR && \
  # gRPC on the host
  GRPC_BUILD_DIR=$GRPC_DIR/cmake/build && \
  mkdir -p $GRPC_BUILD_DIR && \
  cd $GRPC_BUILD_DIR && \
  cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DgRPC_SSL_PROVIDER=package \
    ../.. && \
  make install && \
  cd ../../.. && rm -rf $GRPC_DIR

The base image used was balenalib/raspberrypi3-debian.

For overcoming the issue, I had to make sure that CPU freq is always at highest by specifying force_turbo=1 in /boot/config.txt. This prevented Balena OS from restarting in the middle of the compilation. I thought that restarting can be because of very much high processing required during GRPC compilation.

Not sure if it is a bug or I was missing something.

Hi, am I correct that this is happening during livepush?

I am using local development mode. So whenever I push the container and it starts building, Balena OS restarts on the grpc compilation step.

can you share the command you are using to trigger the build

note that you can install grpc from the official repositories on most distro’s via the edge/unstable channels:

but regardless of that I would like to figure out the issue with building it :slight_smile:

As compiling has it’s own benefits, I decided to go with compilation rather than installing it as a package. The command I used to push the Dockerfile was:

balena push name_of_device.local --debug

I did not use BalenaCloud.

can you take a look with journalctl and dmesg on your device to see if there’s anything interesting from the OS/kernel that could tell us what might be happening