← Back to team overview

kernel-packages team mailing list archive

[Bug 1215513] Re: System locks up, requires hard reset

 

here is solution:

run mkswap with "-c"
mkswap -c /dev/zram0

(you can fix this in package zram-config, if you want :)
cat /etc/init/zram-config.conf | grep mkswap
    mkswap /dev/zram${DEVNUMBER}

you need to change this line to:
    mkswap -c /dev/zram${DEVNUMBER}


Explanation:

See:


modprobe zram zram_num_devices=1

( dmesg | grep zram ) :

[  979.545213] zram: module is from the staging directory, the quality is unknown, you have been warned.
[  979.550810] zram: Creating 1 devices ...


Next:

echo $((345*1024*1024)) > /sys/block/zram0/disksize

(dmesg still silent....)


Next:


mkswap /dev/zram0
Setting up swapspace version 1, size = 353276 KiB
no label, UUID=a95522e0-fb27-4dce-8006-3e3cbf9a6f75


(dmesg:)

[ 1115.120823] Buffer I/O error on device zram0, logical block 88319
[ 1115.120838] Buffer I/O error on device zram0, logical block 88319
[ 1115.121111] Buffer I/O error on device zram0, logical block 88319
[ 1115.121145] Buffer I/O error on device zram0, logical block 88319
[ 1115.121166] Buffer I/O error on device zram0, logical block 88319
....

See! "logical block 88319"! 88319 * 4096 = 361754624; error on bite
number 361754624 (one block = 4096 bites)

I was create 361758720 bites (echo $((345*1024*1024)) returns 361758720;

3617858720 (memory, for zram) - 361754624 (number of bite with error ) =
4096!

Zram create device, with damaged last sector!

How to solve it?

mkswap --help:

....
 -c, --check               check bad blocks before creating the swap area


mkswap -c /dev/zram0
one bad page
Setting up swapspace version 1, size = 353272 KiB
no label, UUID=bb7a0771-5f00-47b0-9238-723b8cd61b20

Yes, one bad page!


(you can see difference in size; - without "-c" option "size = 353276 KiB", with it - succesfully find "one bad page", and size is 4 KB less:  
size = 353272 KiB

....
swapon /dev/zram0 -p 10

and, dmesg:


 1546.782347] Buffer I/O error on device zram0, logical block 88319
[ 1546.782369] Buffer I/O error on device zram0, logical block 88319
[ 1546.782500] Buffer I/O error on device zram0, logical block 88319


....

You can see, time(in beginning of "dmesg"): time not when you run
"swapon", time = time when "mkswap" check partition"; so, your "swap" is
safe and stable!

Enjoy!


And some explanation (I use another bugreports)
Just comment here, #25 : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1215513/comments/25

...
[ 1.659040] Adding 1025396k swap on /dev/zram0. Priority:100 extents:1 across:1025396k SS
[ 20.719906] Buffer I/O error on device zram0, logical block 256349
...

Lets try to calculate:

(what a pity, I can not see bites, only kilobites! but...)

(block ) 256349 * 4 (four kilobites per page) = 1025396k (place of "bad"
sector); as you can see, it is the last sector : ""[1.659040] Adding
1025396k swap on /dev/zram0"

Time of this error can be random.... When OS try to use this "last zram
sector", it freezes or somethind else...

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1215513

Title:
  System locks up, requires hard reset

Status in “linux” package in Ubuntu:
  Fix Released
Status in “linux” source package in Precise:
  Fix Committed
Status in “linux” source package in Quantal:
  Fix Committed
Status in “linux” source package in Raring:
  Fix Committed
Status in “linux” source package in Saucy:
  Fix Released

Bug description:
  Since I started using 3.8.0-29 I experienced system lock ups at random
  times. First one was while running Virtualbox (windows guest) but
  later have been without virtualbox running for example while shutting
  down or while reading a webpage.

  I could not find any relevant log, but I'd post any log file
  considered useful.

  This has hapened in 2 different machines (the one im reporting from is
  intel with intel graphics and the other is AMD with radeon graphics).
  Both 64 bits.

  Up until 3.8.0-27 inclusive I had not had a lockup in years in any of
  those machines. I have been running Ubuntu 64 bit since at least 2008
  in one of them.

  ProblemType: Bug
  DistroRelease: Ubuntu 13.04
  Package: linux-image-3.8.0-29-generic 3.8.0-29.42
  ProcVersionSignature: Ubuntu 3.8.0-29.42-generic 3.8.13.5
  Uname: Linux 3.8.0-29-generic x86_64
  ApportVersion: 2.9.2-0ubuntu8.3
  Architecture: amd64
  AudioDevicesInUse:
   USER        PID ACCESS COMMAND
   /dev/snd/controlC0:  fede       1829 F.... pulseaudio
  CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
  CurrentDmesg:
   
  Date: Thu Aug 22 12:49:35 2013
  HibernationDevice: RESUME=UUID=ee5b2280-eed3-41e2-8675-103fbdd703d1
  InstallationDate: Installed on 2012-12-03 (261 days ago)
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
  IwConfig:
   eth0      no wireless extensions.
   
   lo        no wireless extensions.
  Lsusb:
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
   Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
   Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
   Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
   Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MarkForUpload: True
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.8.0-29-generic root=UUID=0d34a8a5-2002-47e8-9128-a35623612ec1 ro quiet splash vt.handoff=7
  RelatedPackageVersions:
   linux-restricted-modules-3.8.0-29-generic N/A
   linux-backports-modules-3.8.0-29-generic  N/A
   linux-firmware                            1.106
  RfKill:
   
  SourcePackage: linux
  StagingDrivers: zram
  UpgradeStatus: Upgraded to raring on 2013-04-25 (118 days ago)
  dmi.bios.date: 09/11/2006
  dmi.bios.vendor: Intel Corp.
  dmi.bios.version: TS94610J.86A.0047.2006.0911.0110
  dmi.board.asset.tag: Base Board Asset Tag
  dmi.board.name: D946GZIS
  dmi.board.vendor: Intel Corporation
  dmi.board.version: AAD66165-501
  dmi.chassis.type: 2
  dmi.modalias: dmi:bvnIntelCorp.:bvrTS94610J.86A.0047.2006.0911.0110:bd09/11/2006:svn:pn:pvr:rvnIntelCorporation:rnD946GZIS:rvrAAD66165-501:cvn:ct2:cvr:

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1215513/+subscriptions


References