OpenIPC / majestic

Majestic Community edition integration kit
MIT License
38 stars 6 forks source link

[BUG] Hi3518EV300 frequent reboots caused by OOM #87

Closed Droid-MAX closed 2 years ago

Droid-MAX commented 2 years ago

Required information

Issue description

A brief description of the problem. Should include what you were attempting to do, what you did, what happened and what you expected to see happen.

Expectations

Steps to reproduce

  1. the board boot up
  2. interactive by uart or wifi network normally and access service etc.
  3. reboot randomly

Information to attach

---
board:
  vendor: OpenIPC
  version: 2.2.11.26
chip:
  vendor: HiSilicon
  model: 3518EV300
  id: 02203a86de0038f98869090a5308df1424a48110615439e3
ethernet:
  mac: "8c:be:be:11:37:11"
  u-mdio-phyaddr: 1
  phy-id: 0x00000000
  d-mdio-phyaddr: 0
rom:
  - type: nor
    block: 64K
    partitions:
      - name: boot
        size: 0x40000
        sha1: 6b4a1da6
      - name: env
        size: 0x10000
        sha1: 56049650
        contains:
          - name: uboot-env
            offset: 0x0
      - name: kernel
        size: 0x300000
        sha1: 04ebb450
      - name: rootfs
        size: 0xa00000
        sha1: c26ce8ec
      - name: rootfs_data
        size: 0x2b0000
        path: /overlay,jffs2,rw
    size: 16M
    addr-mode: 3-byte
ram:
  total: 64M
  media: 32M
firmware:
  kernel: "4.9.37 (Sat Nov 26 11:34:29 UTC 2022)"
  toolchain: gcc version 8.4.0 (Buildroot -gff5aa3b6-dirty)
  sdk: "Hi3516EV200_MPP_V1.0.1.2 B030 Release (Oct 18 2019, 18:21:00)"
  main-app: /usr/bin/majestic
sensors:
- vendor: GalaxyCore
  model: GC2053
  control:
    bus: 0
    type: i2c
    addr: 0x6e
  data:
    type: MIPI
    input-data-type: DATA_TYPE_RAW_10BIT
    lane-id:
    - 0
    - 1
    image: 1920x1080
  clock: 27MHz

image_2022-11-29_16-41-25

image_2022-11-29_16-43-09

 system:
  webAdmin: enabled
  buffer: 1024
image:
  mirror: false
  flip: false
  rotate: none
  contrast: auto
  hue: 50
  saturation: 50
  luminance: auto
osd:
  enabled: false
  template: "%a %e %B %Y %H:%M:%S %Z"
nightMode:
  enabled: false
records:
  enabled: false
  path: /mnt/mmcblk0p1/%Y/%m/%d/%H.mp4
  maxUsage: 95
video0:
  enabled: true
video1:
  enabled: false
jpeg:
  enabled: true
mjpeg:
  size: 640x360
  fps: 5
  bitrate: 1024
audio:
  enabled: true
  volume: auto
  srate: 8000
  speakerPinInvert: false
  device: /dev/ai
  outputEnabled: false
rtsp:
  enabled: true
  port: 554
hls:
  enabled: true
youtube:
  enabled: false
motionDetect:
  enabled: false
  visualize: true
  debug: true
ipeye:
  enabled: false
watchdog:
  enabled: true
  timeout: 15
widgetii commented 2 years ago

If you're using WiFi on your system it can add memory pressure to OS memory so osmem parameter should be increased.

Run majestic from command line to figure out how much MMZ memory you can hand over to OS: Free MMZ mem finally: 42664KB - in this case at least 40Mb can be hand over.

Droid-MAX commented 2 years ago

on u-boot console, type this command:

setenv bootargs 'mem=${osmem} console=ttyAMA0,115200 panic=5 root=/dev/mtdblock3 rootfstype=squashfs init=/init mtdparts=hi_sfc:256k(boot),64k(env),3072k(kernel),10240k(rootfs),-(rootfs_data)'
setenv osmem 48M
saveenv
reset

then problem has gone, lmao:joy:

Droid-MAX commented 2 years ago

better to set osmem as 40M.