project-akri / akri

A Kubernetes Resource Interface for the Edge
https://docs.akri.sh/
Apache License 2.0
1.11k stars 146 forks source link

udev-video-broker gets OOM error in microk8s #655

Closed jbuchacher closed 3 months ago

jbuchacher commented 1 year ago

Describe the bug The udev-video-broker pod crashes with an OOMError, even after setting udev.configuration.brokerPod.resources.memoryLimit=400Mi.

Output of kubectl get pods,akrii,akric -o wide

NAME                                             READY   STATUS             RESTARTS        AGE    IP             NODE     NOMINATED NODE   READINESS GATES
pod/akri-video-streaming-app-7f5c4d95cc-zqxwn    1/1     Running            5 (68m ago)     17h    10.1.243.225   ubuntu   <none>           <none>
pod/akri-udev-discovery-daemonset-nrhf9          1/1     Running            3 (68m ago)     167m   10.1.243.248   ubuntu   <none>           <none>
pod/akri-udev-video-19090a-pod                   0/1     Pending            0               65m    <none>         <none>   <none>           <none>
pod/akri-controller-deployment-59564bbd4-cj4l2   1/1     Running            0               64m    10.1.243.237   ubuntu   <none>           <none>
pod/akri-agent-daemonset-n7m5r                   1/1     Running            0               50m    10.1.243.253   ubuntu   <none>           <none>
pod/akri-udev-video-3745ea-pod                   0/1     CrashLoopBackOff   6 (2m14s ago)   17m    10.1.243.244   ubuntu   <none>           <none>

NAME                                      CONFIG            SHARED   NODES        AGE
instance.akri.sh/akri-udev-video-19090a   akri-udev-video   false    ["ubuntu"]   150m
instance.akri.sh/akri-udev-video-3745ea   akri-udev-video   false    ["ubuntu"]   17m

NAME                                    CAPACITY   AGE
configuration.akri.sh/akri-udev-video   1          167m

Kubernetes Version: [e.g. Native Kubernetes 1.19, MicroK8s 1.19, Minikube 1.19, K3s] MicroK8s v1.27.4 revision 5650

To Reproduce Steps to reproduce the behavior:

  1. Install microk8s following: https://microk8s.io/docs/install-raspberry-pi
  2. Install Akri per instructions in https://docs.akri.sh/demos/usb-camera-demo-rpi4
  3. Install command for Akri that was used is:
    microk8s.helm upgrade --install akri akri-helm-charts/akri \
    $AKRI_HELM_CRICTL_CONFIGURATION \
    --set udev.discovery.enabled=true \
    --set udev.configuration.enabled=true \
    --set udev.configuration.name=akri-udev-video \
    --set udev.configuration.discoveryDetails.udevRules[0]='KERNEL=="video0"' \
    --set udev.configuration.brokerPod.image.repository="ghcr.io/project-akri/akri/udev-video-broker" \
    --set udev.configuration.brokerPod.resources.memoryLimit=400Mi

Expected behavior Video broker pods will come up healthy and not be killed with an OOM error.

Logs (please share snips of applicable logs)

No entries in journalctl: `-- No entries --

udev-video-broker pod logs:

akri.sh udev_broker ... env_logger::init
akri.sh udev_broker ... env_logger::init finished
[2023-09-01T19:36:56Z INFO  udev_video_broker] akri.sh Udev Broker logging started
[2023-09-01T19:36:56Z TRACE udev_video_broker] get_video_devnode - getting devnode
[2023-09-01T19:36:56Z TRACE udev_video_broker] get_video_devnode - found devnode /dev/video0
[2023-09-01T19:36:56Z TRACE udev_video_broker::util::camera_capturer] build_and_start_camera_capturer - entered
[2023-09-01T19:36:56Z TRACE udev_video_broker::util::camera_capturer] get_format - format not set ... trying to use "MJPG"
[2023-09-01T19:36:56Z TRACE udev_video_broker::util::camera_capturer] get_format - using "MJPG" format
[2023-09-01T19:36:56Z TRACE udev_video_broker::util::camera_capturer] get_env_var_resolution - resolution width not set
[2023-09-01T19:36:56Z TRACE udev_video_broker::util::camera_capturer] get_resolution - camera does not support (640, 480) resolution, using (32, 32) resolution
[2023-09-01T19:36:56Z TRACE udev_video_broker::util::camera_capturer] main - frames per second not set ... trying to use 10

Additional context

github-actions[bot] commented 11 months ago

Issue has been automatically marked as stale due to inactivity for 90 days. Update the issue to remove label, otherwise it will be automatically closed.

github-actions[bot] commented 6 months ago

Issue has been automatically marked as stale due to inactivity for 90 days. Update the issue to remove label, otherwise it will be automatically closed.