Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel oops using ZRAM on RPi4/8GB 32bit #1135

Closed
thwint opened this issue Sep 18, 2020 · 22 comments · Fixed by #1439
Closed

Kernel oops using ZRAM on RPi4/8GB 32bit #1135

thwint opened this issue Sep 18, 2020 · 22 comments · Fixed by #1439
Labels
bug Something isn't working hardware support Related to hardware we want to support upstream Not on us

Comments

@thwint
Copy link

thwint commented Sep 18, 2020

Hello

Issue information:

On my brand new Raspberry Pi 4 8GB I initially installed openhabian v1.6-alpha image, because it mentioned support for the 8GB model. I then noticed a kernel oops. Not sure why this happened and suspecting the alpha version I installed the current Raspberry Pi OS (2020-08-20-raspios-buster-armhf-lite) and then followed the installation instructions here: https://www.openhab.org/docs/installation/openhabian.html#other-linux-systems-add-openhabian-just-like-any-other-software

During initial setup when running openhabian-config unattended I faced a kernel oops again.

The oops happens during installation/configuration of zram:

Sep 18 19:11:10 openhab kernel: [   13.275562] Bluetooth: BNEP socket layer initialized
Sep 18 19:21:06 openhab kernel: [  593.189789] zram: Added device: zram0
Sep 18 19:21:06 openhab kernel: [  593.195289] zram0: detected capacity change from 0 to 629145600
Sep 18 19:21:06 openhab kernel: [  593.195678] zram: Can't change algorithm for initialized device
Sep 18 19:21:06 openhab kernel: [  593.229118] Modules linked in: zram zsmalloc cmac bnep hci_uart btbcm bluetooth ecdh_generic ecc 8021q garp stp llc brcmfmac brcmutil sha256_generic libsha256 cfg80211 vc4 v3d cec gpu_sched rfkill drm_kms_helper bcm2835_v4l2(C) raspberrypi_hwmon bcm2835_isp(C) bcm2835_codec(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) videobuf2_vmalloc drm videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common vc_sm_cma(C) drm_panel_orientation_quirks snd_bcm2835(C) videodev snd_soc_core mc snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd syscopyarea sysfillrect sysimgblt rpivid_mem fb_sys_fops uio_pdrv_genirq uio ip_tables x_tables ipv6 nf_defrag_ipv6
Sep 18 19:21:06 openhab kernel: [  593.229267] CPU: 1 PID: 12618 Comm: mkswap Tainted: G         C        5.4.51-v7l+ #1333
Sep 18 19:21:06 openhab kernel: [  593.229283] Hardware name: BCM2711
Sep 18 19:21:06 openhab kernel: [  593.229311] PC is at zs_map_object+0xb4/0x1e4 [zsmalloc]
Sep 18 19:21:06 openhab kernel: [  593.229324] LR is at 0xb91d0eb1
Sep 18 19:21:06 openhab kernel: [  593.229335] pc : [<bf2ae104>]    lr : [<b91d0eb1>]    psr: 60000013
Sep 18 19:21:06 openhab kernel: [  593.229348] sp : d2c5baa8  ip : 00000000  fp : d2c5baf4
Sep 18 19:21:06 openhab kernel: [  593.229360] r10: ce031000  r9 : 00000000  r8 : d8c00000
Sep 18 19:21:06 openhab kernel: [  593.229373] r7 : c1204f88  r6 : d3752800  r5 : 00000000  r4 : 01c54260
Sep 18 19:21:06 openhab kernel: [  593.229385] r3 : da854260  r2 : 00000002  r1 : c13329c0  r0 : 97162001
Sep 18 19:21:06 openhab kernel: [  593.229400] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Sep 18 19:21:06 openhab kernel: [  593.229414] Control: 30c5383d  Table: 12e41280  DAC: 55555555
Sep 18 19:21:06 openhab kernel: [  593.230188] Backtrace: 
Sep 18 19:21:06 openhab kernel: [  593.230222] [<bf2ae050>] (zs_map_object [zsmalloc]) from [<bf2d7998>] (zram_bvec_rw+0x344/0x820 [zram])
Sep 18 19:21:06 openhab kernel: [  593.230241]  r10:ce031000 r9:bf2da400 r8:ce05b600 r7:d2fec040 r6:d20de000 r5:c1204f88
Sep 18 19:21:06 openhab kernel: [  593.230256]  r4:00000000
Sep 18 19:21:06 openhab kernel: [  593.230282] [<bf2d7654>] (zram_bvec_rw [zram]) from [<bf2d8184>] (zram_make_request+0x1b4/0x3fc [zram])
Sep 18 19:21:06 openhab kernel: [  593.230301]  r10:00001000 r9:00001000 r8:00000000 r7:00000000 r6:00001000 r5:ce05b600
Sep 18 19:21:06 openhab kernel: [  593.230316]  r4:d23c6840
Sep 18 19:21:06 openhab kernel: [  593.230345] [<bf2d7fd0>] (zram_make_request [zram]) from [<c0641110>] (generic_make_request+0x100/0x2e4)
Sep 18 19:21:06 openhab kernel: [  593.230363]  r10:d8ea0930 r9:ffffffff r8:00000000 r7:ce190000 r6:d2c5bbb4 r5:d23c6840
Sep 18 19:21:06 openhab kernel: [  593.230378]  r4:c1204f88
Sep 18 19:21:06 openhab kernel: [  593.230393] [<c0641010>] (generic_make_request) from [<c0641348>] (submit_bio+0x54/0x1ec)
Sep 18 19:21:06 openhab kernel: [  593.230411]  r9:00000000 r8:d2c5be60 r7:00000800 r6:00000008 r5:d23c6840 r4:c1204f88
Sep 18 19:21:06 openhab kernel: [  593.230431] [<c06412f4>] (submit_bio) from [<c043f584>] (submit_bh_wbc+0x194/0x1c4)
Sep 18 19:21:06 openhab kernel: [  593.230448]  r10:d8ea0930 r9:00000000 r8:d2c5be60 r7:00000800 r6:00000801 r5:d23c6840
Sep 18 19:21:06 openhab kernel: [  593.230463]  r4:cc891c00
Sep 18 19:21:06 openhab kernel: [  593.230476] [<c043f3f0>] (submit_bh_wbc) from [<c043f86c>] (__block_write_full_page+0x2b8/0x5c8)
Sep 18 19:21:06 openhab kernel: [  593.230494]  r9:d2c5be60 r8:d481c508 r7:00000800 r6:cc891c00 r5:cc891c00 r4:00000001
Sep 18 19:21:06 openhab kernel: [  593.230511] [<c043f5b4>] (__block_write_full_page) from [<c043fd6c>] (block_write_full_page+0xf0/0xfc)
Sep 18 19:21:06 openhab kernel: [  593.230529]  r10:00000000 r9:d2c5be60 r8:c0443e30 r7:d2c5be60 r6:d8ea0930 r5:00000000
Sep 18 19:21:06 openhab kernel: [  593.230544]  r4:d481c508
Sep 18 19:21:06 openhab kernel: [  593.230557] [<c043fc7c>] (block_write_full_page) from [<c0443120>] (blkdev_writepage+0x24/0x28)
Sep 18 19:21:06 openhab kernel: [  593.230575]  r10:00000000 r9:d2c5be60 r8:00000001 r7:d481c610 r6:d2c5bd90 r5:00000000
Sep 18 19:21:06 openhab kernel: [  593.230589]  r4:d481c610
Sep 18 19:21:06 openhab kernel: [  593.230606] [<c04430fc>] (blkdev_writepage) from [<c03818d4>] (__writepage+0x24/0x58)
Sep 18 19:21:06 openhab kernel: [  593.230626] [<c03818b0>] (__writepage) from [<c0382f3c>] (write_cache_pages+0x248/0x484)
Sep 18 19:21:06 openhab kernel: [  593.230642]  r5:00000000 r4:d8ea0930
Sep 18 19:21:06 openhab kernel: [  593.230656] [<c0382cf4>] (write_cache_pages) from [<c03831dc>] (generic_writepages+0x64/0x90)
Sep 18 19:21:06 openhab kernel: [  593.230674]  r10:00000001 r9:00000000 r8:00000000 r7:7fffffff r6:d2c5be60 r5:c1204f88
Sep 18 19:21:06 openhab kernel: [  593.230689]  r4:d481c610
Sep 18 19:21:06 openhab kernel: [  593.230701] [<c0383178>] (generic_writepages) from [<c04430d0>] (blkdev_writepages+0x18/0x1c)
Sep 18 19:21:06 openhab kernel: [  593.230717]  r6:d481c508 r5:d481c610 r4:d2c5be60
Sep 18 19:21:06 openhab kernel: [  593.230732] [<c04430b8>] (blkdev_writepages) from [<c0385210>] (do_writepages+0x30/0x8c)
Sep 18 19:21:06 openhab kernel: [  593.230751] [<c03851e0>] (do_writepages) from [<c037b0b0>] (__filemap_fdatawrite_range+0xf0/0x12c)
Sep 18 19:21:06 openhab kernel: [  593.230767]  r5:c1204f88 r4:d481c610
Sep 18 19:21:06 openhab kernel: [  593.230782] [<c037afc0>] (__filemap_fdatawrite_range) from [<c037c544>] (file_write_and_wait_range+0x60/0xb4)
Sep 18 19:21:06 openhab kernel: [  593.230800]  r10:00000076 r9:00000000 r8:00000000 r7:00000000 r6:d3d13540 r5:d481c610
Sep 18 19:21:06 openhab kernel: [  593.230815]  r4:ffffffff
Sep 18 19:21:06 openhab kernel: [  593.230829] [<c037c4e4>] (file_write_and_wait_range) from [<c0442adc>] (blkdev_fsync+0x2c/0x54)
Sep 18 19:21:06 openhab kernel: [  593.230846]  r9:d2c5a000 r8:c02011c4 r6:d481c508 r5:7fffffff r4:ffffffff
Sep 18 19:21:06 openhab kernel: [  593.230862] [<c0442ab0>] (blkdev_fsync) from [<c043704c>] (vfs_fsync_range+0x68/0x98)
Sep 18 19:21:06 openhab kernel: [  593.230878]  r6:00000000 r5:00000000 r4:d3d13540
Sep 18 19:21:06 openhab kernel: [  593.230892] [<c0436fe4>] (vfs_fsync_range) from [<c0437104>] (do_fsync+0x4c/0x74)
Sep 18 19:21:06 openhab kernel: [  593.230908]  r7:00000076 r6:00000000 r5:d3d13540 r4:d3d13540
Sep 18 19:21:06 openhab kernel: [  593.230923] [<c04370b8>] (do_fsync) from [<c0437410>] (sys_fsync+0x1c/0x20)
Sep 18 19:21:06 openhab kernel: [  593.230937]  r6:bea7def7 r5:00000003 r4:00000000
Sep 18 19:21:06 openhab kernel: [  593.230953] [<c04373f4>] (sys_fsync) from [<c0201000>] (ret_fast_syscall+0x0/0x28)
Sep 18 19:21:06 openhab kernel: [  593.230968] Exception stack(0xd2c5bfa8 to 0xd2c5bff0)
Sep 18 19:21:06 openhab kernel: [  593.230982] bfa0:                   00000000 00000003 00000003 b6ed0808 0000006c 00000000
Sep 18 19:21:06 openhab kernel: [  593.230999] bfc0: 00000000 00000003 bea7def7 00000076 00000000 00000000 00000000 00033c98
Sep 18 19:21:06 openhab kernel: [  593.231015] bfe0: 00033dd0 bea7d798 00012cf0 b6e568a4
Sep 18 19:21:06 openhab kernel: [  593.231047] ---[ end trace b35898c04496da44 ]---

System information:

I tried both Raspian image 1.6-alpha and Raspberry Pi OS
Currently Raspberry Pi OS is running:

NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

uname -m:
armv7l

Best regarda,
Tom

@mstormi
Copy link
Contributor

mstormi commented Sep 19, 2020

Try a recent image build such as the one from https://github.com/openhab/openhabian/actions/runs/256287021 first.

To find out if it's really ZRAM to cause this, you can skip ZRAM installation by editing /boot/first-boot.bash before install,
Also set debugmode=maximum in openhabian.conf.
Try installing ZRAM from the menu afterwards.

I have no idea about your kernel issue. Never heard about it before, and I know of people to run ZRAM on a RPi4 so it's not a general problem.

@thwint
Copy link
Author

thwint commented Sep 19, 2020

In the meantime I used openhabian-config to uninstall zram. Since then The Kernel Oops is gone. So to reproduce I configured debugmode to maximum and just installed zram again using openhabian-config.

Exactly when enabling zram there is again a Kernel Ooops and openhabian-config ends

+ systemctl enable --now zram-config.service zramsync.service
Created symlink /etc/systemd/system/basic.target.wants/zram-config.service → /etc/systemd/system/zram-config.service.
Created symlink /etc/systemd/system/basic.target.wants/zramsync.service → /etc/systemd/system/zramsync.service.

The full output of openhabian-config (starting installation of zram):

 introText='You are about to activate the ZRAM feature.\nBe aware you do this at your own risk of data loss.\nPlease check out the "ZRAM status" thread at https://community.openhab.org/t/zram-status/80996 before proceeding.'
+ lowMemText='Your system has less than 1 GB of RAM. It is definitely NOT recommended to run ZRAM (AND openHAB) on your box. If you proceed now you will do so at your own risk!'
+ zramInstallLocation=/opt/zram
+ [[ install == \i\n\s\t\a\l\l ]]
+ [[ -f /etc/ztab ]]
+ [[ -n 1 ]]
+ whiptail --title 'Install ZRAM, Continue?' --yes-button Continue --no-button Cancel --yesno 'You are about to activate the ZRAM feature.\nBe aware you do this at your own risk of data loss.\nPlease check out the "ZRAM status" thread at https://community.openhab.org/t/zram-status/80996 before proceeding.' 10 80
+ has_lowmem
+ local totalMemory
++ grep MemTotal /proc/meminfo
++ awk '{print $2}'
+ totalMemory=8115540
+ [[ -z 8115540 ]]
+ [[ 8115540 -lt 900000 ]]
+ return 1
+ dpkg -s make libattr1-dev
+ install_zram_code /opt/zram
+ local overlayfsGit
+ local zramGit
+ overlayfsGit=https://github.com/kmxz/overlayfs-tools
+ zramGit=https://github.com/mstormi/openhabian-zram
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-09-19_11:45:15_CEST [openHABian] Installing ZRAM code... '
2020-09-19_11:45:15_CEST [openHABian] Installing ZRAM code... + cond_redirect mkdir -p /opt/zram
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /opt/zram \033[39;49;00m'

$ mkdir -p /opt/zram 
+ mkdir -p /opt/zram
+ return 0
+ [[ -d /opt/zram/overlayfs-tools ]]
+ cond_redirect update_git_repo /opt/zram/overlayfs-tools master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ update_git_repo /opt/zram/overlayfs-tools master \033[39;49;00m'

$ update_git_repo /opt/zram/overlayfs-tools master 
+ update_git_repo /opt/zram/overlayfs-tools master
+ local branch
+ local path
+ branch=master
+ path=/opt/zram/overlayfs-tools
++ timestamp
++ date +%F_%T_%Z
++ basename /opt/zram/overlayfs-tools
+ echo -n '2020-09-19_11:45:15_CEST [openHABian] Updating overlayfs-tools, master branch from git... '
2020-09-19_11:45:15_CEST [openHABian] Updating overlayfs-tools, master branch from git... + cond_redirect git -C /opt/zram/overlayfs-tools fetch origin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/overlayfs-tools fetch origin \033[39;49;00m'

$ git -C /opt/zram/overlayfs-tools fetch origin 
+ git -C /opt/zram/overlayfs-tools fetch origin
+ return 0
+ cond_redirect git -C /opt/zram/overlayfs-tools reset --hard origin/master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/overlayfs-tools reset --hard origin/master \033[39;49;00m'

$ git -C /opt/zram/overlayfs-tools reset --hard origin/master 
+ git -C /opt/zram/overlayfs-tools reset --hard origin/master
HEAD is now at 77bf3f7 Merge pull request #11 from amir73il/deref-cmd
+ return 0
+ cond_redirect git -C /opt/zram/overlayfs-tools clean --force -x -d
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/overlayfs-tools clean --force -x -d \033[39;49;00m'

$ git -C /opt/zram/overlayfs-tools clean --force -x -d 
+ git -C /opt/zram/overlayfs-tools clean --force -x -d
Removing logic.o
Removing main.o
Removing overlay
Removing sh.o
+ return 0
+ cond_redirect git -C /opt/zram/overlayfs-tools checkout master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/overlayfs-tools checkout master \033[39;49;00m'

$ git -C /opt/zram/overlayfs-tools checkout master 
+ git -C /opt/zram/overlayfs-tools checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
+ return 0
+ echo OK
OK
+ return 0
+ [[ -d /opt/zram/openhabian-zram ]]
+ cond_redirect update_git_repo /opt/zram/openhabian-zram master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ update_git_repo /opt/zram/openhabian-zram master \033[39;49;00m'

$ update_git_repo /opt/zram/openhabian-zram master 
+ update_git_repo /opt/zram/openhabian-zram master
+ local branch
+ local path
+ branch=master
+ path=/opt/zram/openhabian-zram
++ timestamp
++ date +%F_%T_%Z
++ basename /opt/zram/openhabian-zram
+ echo -n '2020-09-19_11:45:16_CEST [openHABian] Updating openhabian-zram, master branch from git... '
2020-09-19_11:45:16_CEST [openHABian] Updating openhabian-zram, master branch from git... + cond_redirect git -C /opt/zram/openhabian-zram fetch origin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/openhabian-zram fetch origin \033[39;49;00m'

$ git -C /opt/zram/openhabian-zram fetch origin 
+ git -C /opt/zram/openhabian-zram fetch origin
+ return 0
+ cond_redirect git -C /opt/zram/openhabian-zram reset --hard origin/master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/openhabian-zram reset --hard origin/master \033[39;49;00m'

$ git -C /opt/zram/openhabian-zram reset --hard origin/master 
+ git -C /opt/zram/openhabian-zram reset --hard origin/master
HEAD is now at dada0fd remove dependency on unattended-upgrade.service
+ return 0
+ cond_redirect git -C /opt/zram/openhabian-zram clean --force -x -d
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/openhabian-zram clean --force -x -d \033[39;49;00m'

$ git -C /opt/zram/openhabian-zram clean --force -x -d 
+ git -C /opt/zram/openhabian-zram clean --force -x -d
+ return 0
+ cond_redirect git -C /opt/zram/openhabian-zram checkout master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/openhabian-zram checkout master \033[39;49;00m'

$ git -C /opt/zram/openhabian-zram checkout master 
+ git -C /opt/zram/openhabian-zram checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
+ return 0
+ echo OK
OK
+ return 0
+ echo OK
OK
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-09-19_11:45:17_CEST [openHABian] Setting up OverlayFS... '
2020-09-19_11:45:17_CEST [openHABian] Setting up OverlayFS... + cond_redirect make --always-make --directory=/opt/zram/overlayfs-tools
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ make --always-make --directory=/opt/zram/overlayfs-tools \033[39;49;00m'

$ make --always-make --directory=/opt/zram/overlayfs-tools 
+ make --always-make --directory=/opt/zram/overlayfs-tools
make: Entering directory '/opt/zram/overlayfs-tools'
gcc -Wall -std=c99 -c main.c
gcc -Wall -std=c99 -c logic.c
gcc -Wall -std=c99 -c sh.c
gcc -lm main.o logic.o sh.o -o overlay
make: Leaving directory '/opt/zram/overlayfs-tools'
+ return 0
+ mkdir -p /usr/local/lib/zram-config/
+ cond_redirect install -m 755 /opt/zram/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 755 /opt/zram/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay \033[39;49;00m'

$ install -m 755 /opt/zram/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay 
+ install -m 755 /opt/zram/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay
+ return 0
+ echo OK
OK
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-09-19_11:45:19_CEST [openHABian] Setting up ZRAM... '
2020-09-19_11:45:19_CEST [openHABian] Setting up ZRAM... + cond_redirect install -m 755 /opt/zram/openhabian-zram/zram-config /usr/local/sbin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 755 /opt/zram/openhabian-zram/zram-config /usr/local/sbin \033[39;49;00m'

$ install -m 755 /opt/zram/openhabian-zram/zram-config /usr/local/sbin 
+ install -m 755 /opt/zram/openhabian-zram/zram-config /usr/local/sbin
+ return 0
+ cond_redirect install -m 755 /opt/zram/openhabian-zram/zramsync /usr/local/sbin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 755 /opt/zram/openhabian-zram/zramsync /usr/local/sbin \033[39;49;00m'

$ install -m 755 /opt/zram/openhabian-zram/zramsync /usr/local/sbin 
+ install -m 755 /opt/zram/openhabian-zram/zramsync /usr/local/sbin
+ return 0
+ cond_redirect install -m 644 /opt/openhabian/includes/ztab /etc/ztab
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/openhabian/includes/ztab /etc/ztab \033[39;49;00m'

$ install -m 644 /opt/openhabian/includes/ztab /etc/ztab 
+ install -m 644 /opt/openhabian/includes/ztab /etc/ztab
+ return 0
+ mkdir -p /usr/local/share/zram-config/log
+ cond_redirect install -m 644 /opt/zram/openhabian-zram/ro-root.sh /usr/local/share/zram-config/ro-root.sh
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/zram/openhabian-zram/ro-root.sh /usr/local/share/zram-config/ro-root.sh \033[39;49;00m'

$ install -m 644 /opt/zram/openhabian-zram/ro-root.sh /usr/local/share/zram-config/ro-root.sh 
+ install -m 644 /opt/zram/openhabian-zram/ro-root.sh /usr/local/share/zram-config/ro-root.sh
+ return 0
+ cond_redirect install -m 644 /opt/zram/openhabian-zram/zram-config.logrotate /etc/logrotate.d/zram-config
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/zram/openhabian-zram/zram-config.logrotate /etc/logrotate.d/zram-config \033[39;49;00m'

$ install -m 644 /opt/zram/openhabian-zram/zram-config.logrotate /etc/logrotate.d/zram-config 
+ install -m 644 /opt/zram/openhabian-zram/zram-config.logrotate /etc/logrotate.d/zram-config
+ return 0
+ echo OK
OK
+ [[ -f /etc/systemd/system/find3server.service ]]
+ dpkg -s openhab2
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-09-19_11:45:19_CEST [openHABian] Setting up ZRAM service... '
2020-09-19_11:45:19_CEST [openHABian] Setting up ZRAM service... + cond_redirect install -m 644 /opt/zram/openhabian-zram/zram-config.service /etc/systemd/system/zram-config.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/zram/openhabian-zram/zram-config.service /etc/systemd/system/zram-config.service \033[39;49;00m'

$ install -m 644 /opt/zram/openhabian-zram/zram-config.service /etc/systemd/system/zram-config.service 
+ install -m 644 /opt/zram/openhabian-zram/zram-config.service /etc/systemd/system/zram-config.service
+ return 0
+ cond_redirect install -m 644 /opt/zram/openhabian-zram/zramsync.service /etc/systemd/system/zramsync.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/zram/openhabian-zram/zramsync.service /etc/systemd/system/zramsync.service \033[39;49;00m'

$ install -m 644 /opt/zram/openhabian-zram/zramsync.service /etc/systemd/system/zramsync.service 
+ install -m 644 /opt/zram/openhabian-zram/zramsync.service /etc/systemd/system/zramsync.service
+ return 0
+ cond_redirect systemctl -q daemon-reload
+ cond_redirect systemctl enable --now zram-config.service zramsync.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl enable --now zram-config.service zramsync.service \033[39;49;00m'

$ systemctl enable --now zram-config.service zramsync.service 
+ systemctl enable --now zram-config.service zramsync.service
Created symlink /etc/systemd/system/basic.target.wants/zram-config.service → /etc/systemd/system/zram-config.service.
Created symlink /etc/systemd/system/basic.target.wants/zramsync.service → /etc/systemd/system/zramsync.service.

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056037] Internal error: Oops: 207 [#1] SMP ARM

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056557] Process mkswap (pid: 24825, stack limit = 0xbc41cf08)

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056579] Stack: (0xcffe1aa8 to 0xcffe2000)

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056601] 1aa0:                   d32d9fe0 cc0ba000 00000000 de5f4270 de5f42a0 de5f42d0

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056630] 1ac0: c0621dfc 6e6dc0f5 cffe1b18 00000000 c1204f88 cc0ba000 d12d7080 cffa7600

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056658] 1ae0: bf320400 d2aec000 cffe1b4c cffe1af8 bf31d998 bf31505c c02a6450 c08a3610

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056687] 1b00: 00000001 cffd8000 004c89e2 d8f80c40 00000000 c1204f88 00000057 6e6dc0f5

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056715] 1b20: 00000008 d1e84b40 cffa7600 00001000 00000000 00000000 00001000 00001000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056743] 1b40: cffe1bac cffe1b50 bf31e184 bf31d660 00000001 d1e84b40 c020bc48 bf320198

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056772] 1b60: 00000000 00000000 00000000 c1204f88 d8f80c40 00001000 00000000 6e6dc0f5

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056800] 1b80: c020bbec c1204f88 d1e84b40 cffe1bb4 cffd8000 00000000 ffffffff d8f80c40

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056828] 1ba0: cffe1bec cffe1bb0 c0641110 bf31dfdc c037d85c 00000000 00000000 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056857] 1bc0: 00000000 6e6dc0f5 c1204f88 d1e84b40 00000008 00000800 cffe1e60 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056885] 1be0: cffe1c5c cffe1bf0 c0641348 c064101c c1359964 c0638538 00000000 c1204f88

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056914] 1c00: d1e84b40 00001000 d8f80c40 00000000 00000000 d8f80c40 cffe1c5c cffe1c28

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056942] 1c20: c0638538 c063838c cffe1c33 6e6dc0f5 cffe1c5c d0d83ec0 d1e84b40 00000801

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056971] 1c40: 00000800 cffe1e60 00000000 d8f80c40 cffe1c84 cffe1c60 c043f584 c0641300

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.056999] 1c60: 00000001 d0d83ec0 d0d83ec0 00000800 ef414e08 cffe1e60 cffe1cec cffe1c88

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057028] 1c80: c043f86c c043f3fc cffe1e60 d8f80c40 cffe1cd4 c0443e30 00001000 c1204f88

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057056] 1ca0: c043dbb0 cffe1e60 00000800 ef414e08 000257ff 00000000 c0382c24 6e6dc0f5

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057085] 1cc0: 20000013 ef414e08 00000000 d8f80c40 cffe1e60 c0443e30 cffe1e60 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057113] 1ce0: cffe1d24 cffe1cf0 c043fd6c c043f5c0 c043dbb0 cffe1d00 ffffffff ef414f10

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057141] 1d00: 00000000 cffe1d90 ef414f10 00000001 cffe1e60 00000000 cffe1d34 cffe1d28

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057169] 1d20: c0443120 c043fc88 cffe1d4c cffe1d38 c03818d4 c0443108 d8f80c40 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057198] 1d40: cffe1dfc cffe1d50 c0382f3c c03818bc 00000002 c0c0db08 00000001 c1204f88

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057226] 1d60: c043e7cc c043d304 00000000 c12a4d90 c1204fb4 ef414f10 c03818b0 00000002

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057254] 1d80: cffe0010 ffffffff ffffffff c0440001 d8f80c40 cffe1ec0 ef414f10 00000c00

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057283] 1da0: cffe1e14 cffe1db0 c0376b58 c0384318 00000c00 00000c00 d8f80c40 03ff3e90

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057311] 1dc0: c1204f88 cffe0030 00000c00 6e6dc0f5 00001000 ef414f10 c1204f88 cffe1e60

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057340] 1de0: 7fffffff 00000000 00000000 00000001 cffe1e34 cffe1e00 c03831dc c0382d00

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057368] 1e00: cffe1e00 cffe1e00 cffe1e08 cffe1e08 c0000000 6e6dc0f5 cffe1e14 cffe1e60

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057396] 1e20: ef414f10 ef414e08 cffe1e44 cffe1e38 c04430d0 c0383184 cffe1e5c cffe1e48

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057425] 1e40: c0385210 c04430c4 ef414f10 c1204f88 cffe1ed4 cffe1e60 c037b0b0 c03851ec

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057453] 1e60: 7fffffff 00000000 00000000 00000000 ffffffff 7fffffff 00000001 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057480] 1e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057509] 1ea0: cffe1f2c 6e6dc0f5 c03f87c8 ffffffff ef414f10 d1d939c0 00000000 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057537] 1ec0: 00000000 00000076 cffe1f0c cffe1ed8 c037c544 c037afcc ffffffff 7fffffff

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057565] 1ee0: 00000001 00000000 00000000 ffffffff 7fffffff ef414e08 c02011c4 cffe0000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057594] 1f00: cffe1f34 cffe1f10 c0442adc c037c4f0 ffffffff 7fffffff cffe0000 d1d939c0

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057622] 1f20: 00000000 00000000 cffe1f64 cffe1f38 c043704c c0442abc ffffffff 7fffffff

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057650] 1f40: 00000000 c041d0b8 d1d939c0 d1d939c0 00000000 00000076 cffe1f94 cffe1f68

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057679] 1f60: c0437104 c0436ff0 ffffffff 7fffffff 00000000 00000c00 b6f2f8f8 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057707] 1f80: 00000003 bebd7ef6 cffe1fa4 cffe1f98 c0437410 c04370c4 00000000 cffe1fa8

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057735] 1fa0: c0201000 c0437400 00000000 00000003 00000003 b6e52808 0000006c 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057763] 1fc0: 00000000 00000003 bebd7ef6 00000076 00000000 00000000 00000000 00033c98

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.057792] 1fe0: 00033dd0 bebd7798 00012cf0 b6dd88a4 60000010 00000003 00000000 00000000

Message from syslogd@openhab at Sep 19 11:45:22 ...
 kernel:[50461.059200] Code: e0844084 e1a04204 e0883004 e5939018 (e5991000) 

Next I will install a recent image as you suggested.

@mstormi
Copy link
Contributor

mstormi commented Sep 19, 2020

I'd believe it's a kernel issue.

Either way, nothing we can deal with in openHABian.

@thwint
Copy link
Author

thwint commented Sep 20, 2020

Still the same also with a new image. There seems to be someone else having a similar problem:
raspberrypi/linux#3839

So I assume you are right. There is nothing the opanHABian can do about it. I follow the other issue.

@mstormi
Copy link
Contributor

mstormi commented Sep 20, 2020

reopen if you have news on an openHABian malfunction

@mstormi mstormi closed this as completed Sep 20, 2020
@mstormi
Copy link
Contributor

mstormi commented Sep 23, 2020

FWIW, there was a report of someone who had this problem too and he tried the 64bit image and that worked
https://community.openhab.org/t/starting-from-scratch-on-a-raspberry-pi-4-8gb/105230/39

@mstormi mstormi reopened this Sep 23, 2020
@mstormi mstormi added bug Something isn't working hardware support Related to hardware we want to support upstream Not on us labels Oct 3, 2020
@mstormi
Copy link
Contributor

mstormi commented Oct 13, 2020

Will skip to install ZRAM on 8 GB RPi 4 if running in 32bit

@mstormi mstormi changed the title Kernel oops during installation/configuration of zram Kernel oops using ZRAM on RPi4/8GB 32bit Oct 14, 2020
@JAMESBOWLER
Copy link

It looks like this problem has been solved upstream.

Commit

@mstormi
Copy link
Contributor

mstormi commented Jan 1, 2021

not sure as the solved problem was on 32bit ARM.
We'll see when a new Raspberry Pi OS version becomes available.

@mstormi
Copy link
Contributor

mstormi commented Jan 17, 2021

Patch is dated Dec 2 and the current Raspi OS is dated Dec 4 so the patch is (very very likely) not in.
Let me know should you discover it is.

@Ltty
Copy link

Ltty commented Jan 25, 2021

There's been a release on Jan 11th, 2021 with kernel version 5.4. Can anyone confirm that ZRAM has been fixed with this build?

@mstormi
Copy link
Contributor

mstormi commented Jan 25, 2021

As I wrote right above: "the current Raspi OS is dated Dec 4" which is what the openHABian images use.
So in all likelihood: no.
It won't be fixable before there's a new Raspi OS release.

@ecdye
Copy link
Contributor

ecdye commented Jan 25, 2021

There's been a release on Jan 11th, 2021 with kernel version 5.4. Can anyone confirm that ZRAM has been fixed with this build?

If you would like there is plenty of documentation online on how to change your Linux kernel version. This is not supported and should not be attempted unless you know what you are doing.

@JAMESBOWLER
Copy link

Looks to be working now.

image

@mstormi
Copy link
Contributor

mstormi commented Jan 26, 2021

Did you deploy a new image from scratch? Which one?

1.6.3 was built after that new Raspi OS release. I forgot the build process is automatically pulling in the latest version (does not happen that often in fact) so yes this is to be expected. Cannot validate though as I don't have that HW.

@JAMESBOWLER
Copy link

1.6.2b

I downloading 1.6.3 now and will test again.

@JAMESBOWLER
Copy link

Just installed 1.6.3 fresh then installed zram using openhabian-config and it installed correctly and is running correctly

openhabian@openHABianDevice:~ $ zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo-rle 500M 24.9M 462.9K 1.2M 4 /opt/zram/zram1
/dev/zram0 lzo-rle 600M 4K 87B 4K 4 [SWAP]

@mstormi
Copy link
Contributor

mstormi commented Jan 27, 2021

Great, thanks.
Will remove the workaround from the code then close this.

@Ltty
Copy link

Ltty commented Jan 27, 2021

Not sure if this is really 100% solved. After activating zram and seeing it running correctly, the system goes into a reboot loop. The Pi keeps rebooting during startup. Reboot loop stops as soon as I disable zram again. I am on a Pi4 with 8gb.

@mstormi
Copy link
Contributor

mstormi commented Feb 3, 2021

So does it work or not ? Anyone to read please try and comment

@ecdye
Copy link
Contributor

ecdye commented Feb 4, 2021

Not sure if this is really 100% solved. After activating zram and seeing it running correctly, the system goes into a reboot loop. The Pi keeps rebooting during startup. Reboot loop stops as soon as I disable zram again. I am on a Pi4 with 8gb.

Are you on the latest kernel version?

@Ltty
Copy link

Ltty commented Feb 4, 2021

Yes, I am on the latest kernel. What I noticed (and unfortunately didn't have time to systematically test and debug yet). ZRAM works fine until the time I install PIVCCU on the PI. Openhab runs fine with and without ZRAM, tested both. Installed PIVCCU, runs stable without ZRAM enabled. As soon as I enable ZRAM, the system goes into a reboot loop and crashes during startup of the services.

As soon as I unplug the HB-RF-USB hardware, the reboot loop stops. If I uninstall zram everything's working fine again. Again, I haven't explicitly analyzed the root cause, so it's a (reproducible) observation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hardware support Related to hardware we want to support upstream Not on us
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants