Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#988104: zram-tools: Service Zram fails to start due to writing acces

98 views
Skip to first unread message

Louis Sajous

unread,
May 5, 2021, 2:40:04 PM5/5/21
to
Package: zram-tools
Version: 0.3.3.1-1
Severity: important

Zram does not start when I launch my computer :

root@PC:~# systemctl status zramswap.service
[zramswap[4580]: /usr/sbin/zramswap: ligne 53 : echo: erreur d'écriture :
Périphérique ou ressource occupé]

It refers to lign 53 which is :
echo -n "${ALGO}" > /sys/block/zram0/comp_algorithm || elog "setting
compression algo to ${ALGO}"

When I try to write in this file, it fails :
root@PC:~# echo -n "lz4" > /sys/block/zram0/comp_algorithm
-bash: echo: erreur d'écriture : Périphérique ou ressource occupé

root@PC:~# ls -al /sys/block/zram0/comp_algorithm
-rw-r--r-- 1 root root 4096 5 mai 20:09 /sys/block/zram0/comp_algorithm
root@PC:~# ls -al /sys/devices/virtual/block/zram0/comp_algorithm
-rw-r--r-- 1 root root 4096 5 mai 20:09
/sys/devices/virtual/block/zram0/comp_algorithm
root@PC:~# echo $UID
0
root@PC:~# mount
[sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)]

I can't modify or delete this particular file, and Zram can't start without
modifying it.

Sorry for the french in the messages and for the quality of my report, it's
only my second.


-- System Information:
Debian Release: bullseye/sid
APT prefers testing-security
APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-6-amd64 (SMP w/2 CPU threads)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not
set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages zram-tools depends on:
ii bc 1.07.1-2+b2

Peter Allebone

unread,
Mar 3, 2022, 11:00:03 PM3/3/22
to
Hi,

I had the same issue as Louis Sajous but managed to find my issue.
I had previously used zram and loaded it into the modules when testing both options. i find that they are not compatible together and my service could also not start due to the same error.

I asked on reddit here and found nobody else had the problem which indicated to me that it was my setup.


I was then able to think about the problem and remember that it might be possible they conflicted so I reversed my setup of zram using commands such as:

 1175  sudo rm /etc/modules-load.d/zram.conf
 
 1176  sudo rm /etc/modprobe.d/zram.conf
 
 1177  sudo rm /etc/udev/rules.d/99-zram.rules  
 
 1178  sudo rm /etc/systemd/system/zram.service

Once I rebooted then the problem was resolved and zramswap could start normally. Hopefully it is the same problem for you.

The original guide I followed was this that caused a problem with zramswap without me knowing it would: https://www.techrepublic.com/article/how-to-enable-the-zram-module-for-faster-swapping-on-linux/

OP should check to see if a similar problem has caused his issue as the service does/can work if there is nothing unexpected and the system is as shipped by debian.

Kind regards
Pete
0 new messages