zram-config is not working on non-English locales in vivid

Bug #1448530 reported by asgard2 on 2015-04-25
52
This bug affects 7 people
Affects Status Importance Assigned to Milestone
zram-config (Ubuntu)
High
Unassigned
Vivid
High
Unassigned

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.

---------------------

The zram-config package install works without errors, but at swapon -s, no zram devices are listed.

$ dmesg | grep zram
[ 26.933769] zram: Created 4 device(s) ...

$ swapon -s
Filename Type Size Used Priority
/var/cache/swap/swap0 file 4194300 223296 -1

This problem exist on my notebook and I can recreate it on a fresh 15.04 vm install.

$ 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: failed (Result: exit-code) since Mi 2015-04-29 13:25:17 CEST; 4min 39s ago
  Process: 538 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=255)
 Main PID: 538 (code=exited, status=255)

Apr 29 13:25:16 test-VirtualBox systemd[1]: Starting Initializes zram swaping...
Apr 29 13:25:16 test-VirtualBox init-zram-swapping[538]: sh: echo: I/O error
Apr 29 13:25:16 test-VirtualBox init-zram-swapping[538]: mkswap: error: swap area needs to be at least 40 KiB
Apr 29 13:25:17 test-VirtualBox init-zram-swapping[538]: swapon: /dev/zram0: Swap-Header konnte nicht gelesen werden
Apr 29 13:25:17 test-VirtualBox systemd[1]: zram-config.service: main process exited, code=exited, status=255/n/a
Apr 29 13:25:17 test-VirtualBox systemd[1]: Failed to start Initializes zram swaping.
Apr 29 13:25:17 test-VirtualBox systemd[1]: Unit zram-config.service entered failed state.
Apr 29 13:25:17 test-VirtualBox systemd[1]: zram-config.service failed.

---
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: XFCE
DistroRelease: Ubuntu 15.04
InstallationDate: Installed on 2015-04-25 (0 days ago)
InstallationMedia: Xubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422.1)
Package: zram-config 0.3
PackageArchitecture: all
ProcVersionSignature: Ubuntu 3.19.0-15.15-generic 3.19.3
Tags: vivid
Uname: Linux 3.19.0-15-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True

apport information

tags: added: apport-collected vivid
description: updated

apport information

apport information

Apr 25 21:51:35 username-VirtualBox systemd[1]: Failed to start Initializes zram swaping.
Apr 25 21:51:35 username-VirtualBox systemd[1]: zram-config.service failed.

tags: added: systemd-boot
Martin Pitt (pitti) wrote :

Please file bugs with Apport (i. e. ubuntu-bug). What does

  sudo systemctl status -l zram-config.service

say? Does this work under upstart?

Changed in zram-config (Ubuntu):
status: New → Incomplete
Martin Pitt (pitti) wrote :

For the record, I tried "apt-get install zram-config" on a 15.04 VM and rebooted, and it works fine.

asgard2 (kamp000x) wrote :

@Martin Pitt (pitti): how?
I just recreated a new vm with extra swap partition, but the error message is the same.
=> error_message.txt

asgard2 (kamp000x) on 2015-04-29
description: updated
asgard2 (kamp000x) wrote :

@Martin Pitt (pitti)
I suppose you tested on a system with english language and not with german?

After I saw this bug report:
https://bugs.launchpad.net/ubuntu/+source/zram-config/+bug/1443699
I tried an english installation and zram works ...

However, this did not solve the problem.

Mélodie (meets) wrote :

Hi,

I have done 2 bug reports and was notified my bug report was a duplicate of here. It's not exactly happening the same way, so I come here and bring the link to mine: #1449678

It works partly, in a French install (why would the language be involved? zram is nothing else than a kernel module creating a block device in ram!). But it creates only one device where 2 would be expected in a PC with 2 CPU: #1449665 and in #1449678 I report a partial failure, as one block device is created, but the stop/start /restart processes using systemctl do not work.

I see. Script uses `free` command and then greps the output. And `free` command uses l10n, so grep is unsuccessful. I have Russian localization, so I faced this bug too.

Changed in zram-config (Ubuntu):
status: Incomplete → Fix Committed
summary: - zram not working on vivid
+ zram-config is not working on non-English locales in vivid
asgard2 (kamp000x) wrote :

The patch works, thanks.

Mélodie (meets) wrote :

That might be. I have started a

Mélodie (meets) wrote :

sorry (there should be a mean to edit a comment). I started a Live desktop Vivid in Virtualbox and started it with English on. zram-config was not installed in that one ISO, I added it on the fly in the Live. Here is are the results:
http://paste.ubuntu.com/10946580/

Please notice, right after installing it isn't started, as shows the output of "cat /proc/swaps" invoked immediately after. I would think the post install script would take care of it.

The attachment "Added LANG=C before "free" command. Works like a charm." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in zram-config (Ubuntu):
status: Fix Committed → Confirmed
Changed in zram-config (Ubuntu):
importance: Undecided → High
Martin Pitt (pitti) on 2015-05-19
tags: removed: systemd-boot
Martin Pitt (pitti) wrote :

Thanks! Uploaded with using LC_ALL, as that's stronger/safer than LANG.

Changed in zram-config (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zram-config - 0.4

---------------
zram-config (0.4) wily; urgency=medium

  * Call "free" command under C locale to avoid it failing under non-English
    locales. Thanks GamePad64 for the initial patch! (LP: #1448530)

 -- Martin Pitt <email address hidden> Fri, 29 May 2015 13:04:37 +0200

Changed in zram-config (Ubuntu):
status: Fix Committed → Fix Released
Didier Roche (didrocks) on 2015-06-15
Changed in zram-config (Ubuntu Vivid):
importance: Undecided → High
Didier Roche (didrocks) on 2015-06-15
description: updated

Hello asgard2, or anyone else affected,

Accepted zram-config into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zram-config/0.3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in zram-config (Ubuntu Vivid):
status: New → Fix Committed
tags: added: verification-needed

Hello,

finally its running :))

Changed in zram-config (Ubuntu Vivid):
assignee: nobody → Björn Schmidt (bjoern-schmidt)
status: Fix Committed → In Progress

Its running in the newest proposed Version0.31

Changed in zram-config (Ubuntu Vivid):
assignee: Björn Schmidt (bjoern-schmidt) → nobody

How do i verifie that the patch works? Where is the button?

asgard2 (kamp000x) wrote :

I can confirm that zram-config 0.3.1 is working.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zram-config - 0.3.1

---------------
zram-config (0.3.1) vivid; urgency=medium

  * Backport 2 fixes from wily:
    - Call "free" command under C locale to avoid it failing under non-English
    locales. Thanks GamePad64 for the initial patch! (LP: #1448530)
    - rmmod doesn't support -w anymore, ensure that the module is removed and
    that the service stops properly (LP: #1449678)

 -- Didier Roche <email address hidden> Mon, 15 Jun 2015 10:13:05 +0200

Changed in zram-config (Ubuntu Vivid):
status: In Progress → Fix Released

The verification of the Stable Release Update for zram-config has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers