[Bug 1449678] Re: (Vivid) zram-config 0.3 Job for zram-config.service failed

Mélodie meets at gmx.fr
Sun Jun 21 16:47:48 UTC 2015


Hi,

I have found a way to make it work right.

While zram was loaded, with one block device created only instead of two
as I have a dual-core, and with a priority 100 instead of 5 as the zram-
config brings I did this:

$ sudo swapoff /dev/zram0
$ sudo rmmod zram

then edited /etc/modprobe.d/blacklist.conf and added this:

blacklist zram

since the other day, I had no more zram loaded nor zram virtual device
loaded. Just now I thought of a test while zram is not loaded at boot
time:

$ sudo apt-get install zram-config
.......
.......
Réception de : 1 http://archive.ubuntu.com/ubuntu/ vivid-proposed/universe zram-config all 0.3.1 [4 266 B]
........
.......
$


$ sudo systemctl enable zram-config
$ sudo systemctl start zram-config
$

While I'm here: Could the zram-config script come with some outputs
there? Confirmation "we have created a symlink blabla... " and after,
"we have started zram-config successfully" ? That would be nice. :)

Result:
$ cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/sda6                               partition	4607996	0	-1
/dev/zram0                              partition	947216	0	5
/dev/zram1                              partition	947216	0	5
$

Now it works as it's supposed to!


Some more tests to be sure, with the systemctl commands "status", "restart", "start", and "stop":

***************
[melodie at bento64:~]$ sudo systemctl status -l zram-config.service
● zram-config.service - Initializes zram swaping
   Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since dim. 2015-06-21 18:33:11 CEST; 9min ago
  Process: 4906 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=0/SUCCESS)
 Main PID: 4906 (code=exited, status=0/SUCCESS)

juin 21 18:33:11 bento64 systemd[1]: Starting Initializes zram swaping...
juin 21 18:33:11 bento64 init-zram-swapping[4906]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:33:11 bento64 init-zram-swapping[4906]: pas d'étiquette, UUID=6c74759b-83cd-47a1-b911-f5242c125979
juin 21 18:33:11 bento64 init-zram-swapping[4906]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:33:11 bento64 init-zram-swapping[4906]: pas d'étiquette, UUID=3e6fce71-7773-40e4-9dcb-3dfe509ec23d
juin 21 18:33:11 bento64 systemd[1]: Started Initializes zram swaping.
[melodie at bento64:~]$ sudo systemctl restart zram-config
[melodie at bento64:~]$ sudo systemctl status -l zram-config.service
● zram-config.service - Initializes zram swaping
   Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since dim. 2015-06-21 18:43:44 CEST; 4s ago
  Process: 4985 ExecStop=/usr/bin/end-zram-swapping (code=exited, status=0/SUCCESS)
  Process: 4996 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=0/SUCCESS)
 Main PID: 4996 (code=exited, status=0/SUCCESS)

juin 21 18:43:44 bento64 systemd[1]: Starting Initializes zram swaping...
juin 21 18:43:44 bento64 init-zram-swapping[4996]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:43:44 bento64 init-zram-swapping[4996]: pas d'étiquette, UUID=13e90b6a-1f85-40d3-b468-a77332c14f97
juin 21 18:43:44 bento64 init-zram-swapping[4996]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:43:44 bento64 init-zram-swapping[4996]: pas d'étiquette, UUID=1864b236-4b6f-433d-b3e3-5ae7c3b8a88a
juin 21 18:43:44 bento64 systemd[1]: Started Initializes zram swaping.
[melodie at bento64:~]$ sudo systemctl stop zram-config
[melodie at bento64:~]$ sudo systemctl status -l zram-config.service
● zram-config.service - Initializes zram swaping
   Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since dim. 2015-06-21 18:44:00 CEST; 2s ago
  Process: 5031 ExecStop=/usr/bin/end-zram-swapping (code=exited, status=0/SUCCESS)
  Process: 4996 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=0/SUCCESS)
 Main PID: 4996 (code=exited, status=0/SUCCESS)

juin 21 18:43:44 bento64 systemd[1]: Starting Initializes zram swaping...
juin 21 18:43:44 bento64 init-zram-swapping[4996]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:43:44 bento64 init-zram-swapping[4996]: pas d'étiquette, UUID=13e90b6a-1f85-40d3-b468-a77332c14f97
juin 21 18:43:44 bento64 init-zram-swapping[4996]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:43:44 bento64 init-zram-swapping[4996]: pas d'étiquette, UUID=1864b236-4b6f-433d-b3e3-5ae7c3b8a88a
juin 21 18:43:44 bento64 systemd[1]: Started Initializes zram swaping.
juin 21 18:44:00 bento64 systemd[1]: Stopping Initializes zram swaping...
juin 21 18:44:00 bento64 systemd[1]: Stopped Initializes zram swaping.
[melodie at bento64:~]$ sudo systemctl start zram-config
[melodie at bento64:~]$ sudo systemctl status -l zram-config.service
● zram-config.service - Initializes zram swaping
   Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since dim. 2015-06-21 18:44:18 CEST; 2s ago
  Process: 5031 ExecStop=/usr/bin/end-zram-swapping (code=exited, status=0/SUCCESS)
  Process: 5050 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=0/SUCCESS)
 Main PID: 5050 (code=exited, status=0/SUCCESS)

juin 21 18:44:18 bento64 systemd[1]: Starting Initializes zram swaping...
juin 21 18:44:18 bento64 init-zram-swapping[5050]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:44:18 bento64 init-zram-swapping[5050]: pas d'étiquette, UUID=6ab6c3ad-6380-4190-af69-c9aedae3e1c2
juin 21 18:44:18 bento64 init-zram-swapping[5050]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:44:18 bento64 init-zram-swapping[5050]: pas d'étiquette, UUID=99b8b1d5-2873-43a4-9130-551000a5832f
juin 21 18:44:18 bento64 systemd[1]: Started Initializes zram swaping.
[melodie at bento64:~]$ 


***************

They all show it works correctly.

Again, after "restart" "stop" and "start" some confirmation messages for
success would be nice.

One more: I'd like to have some direct mean to setup the size of the
block devices to my liking. A /etc/default/zram configuration file for
this purpose, for example, would be nice.

Best regards,
Mélodie

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to zram-config in Ubuntu.
https://bugs.launchpad.net/bugs/1449678

Title:
  (Vivid) zram-config 0.3 Job for zram-config.service failed

Status in zram-config package in Ubuntu:
  Fix Released
Status in zram-config source package in Vivid:
  Fix Committed

Bug description:
  [Impact] 
   * People using some non English locale, zram devices are not loaded
   * The service fails to stop and unloading zram module as well

  [Test Case]
   * Install the new zram-config package
   * Reboot and check that the zram devices are created:
  $ swapon -s
  -> returns some zram devices
   * $ sudo systemctl status -l zram-config.service
  -> no error
   * Stop the service:
  $ sudo systemctl stop zram-config.service
   * $ sudo systemctl status -l zram-config.service
  -> no error
   * swapon -s
  -> no more zram device listed

  [Regression Potential] 
   * Services loading change may impact English-local user. However, the fix has already been confirmed to be working on wily.
   * Stopping the service was already failing on unloading the module, so no additional regression is possible there.

  --------------------
  Hi,

  While testing how zram-config is going in Ubuntu Vivid, I meet with
  error while doing restart and or stop/start.

  It seems to stop fine but throws an error when starting again or
  performing a restart.

  I have installed zram-config 0.3 just today and haven't rebooted yet.
  The CPU is "AMD Athlon(tm) II X2 260 Processor"

  As stated in bug #1449665 there is one block device created:

  $ cat /proc/swaps
  Filename				Type		Size	Used	Priority
  /dev/zram0                              partition	947216	0	5
  $

  Here:
  $ sudo systemctl stop zram-config
  $ cat /proc/swaps
  Filename				Type		Size	Used	Priority
  /dev/zram0                              partition	947216	0	5
  $

  after the stop, the prompt is back without error, but it has done
  nothing.

  With restart:
  $ sudo systemctl restart zram-config
  Job for zram-config.service failed. See "systemctl status zram-config.service" and "journalctl -xe" for details.
  $

  When invoking the suggested commands:
  ****
  $ LANG=C systemctl status zram-config.service -l
  * zram-config.service - Initializes zram swaping
     Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2015-04-28 19:34:37 CEST; 2min 7s ago
    Process: 744 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=255)
   Main PID: 744 (code=exited, status=255)

  Apr 28 19:34:37 bento64 init-zram-swapping[744]: sh: echo: I/O error
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: mkswap: error: /dev/zram0 is mounted; will not make swapspace
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: swapon: /dev/zram0 : échec de swapon: Périphérique ou ressource occupé
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: /usr/bin/init-zram-swapping: 21: /usr/bin/init-zram-swapping: cannot create /sys/block/zram1/disksize: Directory nonexistent
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: /dev/zram1: Aucun fichier ou dossier de ce type
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: swapon: stat failed /dev/zram1: Aucun fichier ou dossier de ce type
  Apr 28 19:34:37 bento64 systemd[1]: zram-config.service: main process exited, code=exited, status=255/n/a
  Apr 28 19:34:37 bento64 systemd[1]: Failed to start Initializes zram swaping.
  Apr 28 19:34:37 bento64 systemd[1]: Unit zram-config.service entered failed state.
  Apr 28 19:34:37 bento64 systemd[1]: zram-config.service failed.
  $
  ****

  ****
  -- Unit zram-config.service has begun starting up.
  Apr 28 19:34:37 bento64 audit[781]: <audit-1107> pid=781 uid=102 auid=4294967295 ses=4294967295 msg='apparmo
                                       exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: sh: echo: I/O error
  Apr 28 19:34:37 bento64 kernel: zram: Cannot change disksize for initialized device
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: mkswap: error: /dev/zram0 is mounted; will not make swapspa
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: swapon: /dev/zram0<C2><A0>: <C3><A9>chec de swapon: P<C3>
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: /usr/bin/init-zram-swapping: 21: /usr/bin/init-zram-swappin
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: /dev/zram1: Aucun fichier ou dossier de ce type
  Apr 28 19:34:37 bento64 init-zram-swapping[744]: swapon: stat failed /dev/zram1: Aucun fichier ou dossier de
  Apr 28 19:34:37 bento64 systemd[1]: zram-config.service: main process exited, code=exited, status=255/n/a
  Apr 28 19:34:37 bento64 systemd[1]: Failed to start Initializes zram swaping.
  -- Subject: Unit zram-config.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  --
  -- Unit zram-config.service has failed.
  --
  -- The result is failed.
  Apr 28 19:34:37 bento64 systemd[1]: Unit zram-config.service entered failed state.
  Apr 28 19:34:37 bento64 systemd[1]: zram-config.service failed.
  Apr 28 19:34:37 bento64 polkitd(authority=local)[3990]: Unregistered Authentication Agent for unix-process:7
  Apr 28 19:34:37 bento64 audit[781]: <audit-1107> pid=781 uid=102 auid=4294967295 ses=4294967295 msg='apparmo
                                       exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
  Apr 28 19:34:37 bento64 kernel: audit: type=1107 audit(1430242477.545:27): pid=781 uid=102 auid=4294967295 s
                                   exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
  lines 1809-1834/1834 (END)

  ****

  I have done a test using directly the scripts created for /usr/bin,
  the results seem interesting:

  $ sudo /usr/bin/end-zram-swapping
  rmmod: ERROR: unexpected getopt_long() value 'w'.
  $ cat /proc/swaps
  Filename				Type		Size	Used	Priority
  $

  $ LANG=C sudo /usr/bin/init-zram-swapping
  sh: echo: I/O error
  mkswap: error: /dev/zram0 is mounted; will not make swapspace
  swapon: /dev/zram0: swapon failed: Device or resource busy
  /usr/bin/init-zram-swapping: 21: /usr/bin/init-zram-swapping: cannot create /sys/block/zram1/disksize: Directory nonexistent
  /dev/zram1: No such file or directory
  swapon: stat failed /dev/zram1: No such file or directory
  $

  I hope I have tested the right way. If anything more is needed, log
  files or so, please ask.

  Best regards,
  Mélodie

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zram-config/+bug/1449678/+subscriptions



More information about the foundations-bugs mailing list