14

Ever since Ubuntu 11.04, I have been experiencing random system hangs (I'm currently running 11.10). REISUB does not recover the system and a hard-boot is required. Scanning all the system logs (kern.log, syslog, dmesg) does not reveal anything remarkable to me other than a number of ecryptfs_encrypt_page errors which appear at 30 second intervals.

For example, here is the tail end of dmesg at the moment:

<snip/>
[ 2586.952174] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2586.952179] ecryptfs_writepage: Error encrypting page (upper index [0x000000000000001f])
[ 2586.952210] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2586.952212] ecryptfs_writepage: Error encrypting page (upper index [0x000000000000001f])
[ 2586.952244] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2586.952246] ecryptfs_writepage: Error encrypting page (upper index [0x000000000000001f])
[ 2616.952218] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2616.952222] ecryptfs_writepage: Error encrypting page (upper index [0x0000000000000020])
[ 2616.952254] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2616.952256] ecryptfs_writepage: Error encrypting page (upper index [0x0000000000000020])
[ 2616.952287] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2616.952289] ecryptfs_writepage: Error encrypting page (upper index [0x0000000000000020])
[ 2646.952211] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2646.952216] ecryptfs_writepage: Error encrypting page (upper index [0x0000000000000021])
[ 2646.952248] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2646.952250] ecryptfs_writepage: Error encrypting page (upper index [0x0000000000000021])
[ 2646.952281] ecryptfs_encrypt_page: Error attempting to write lower page; rc = [-5]
[ 2646.952283] ecryptfs_writepage: Error encrypting page (upper index [0x0000000000000021])

The hang I experience is characterized by:

  • Looping sound
  • Non-responsive keyboard/mouse
  • Screen freeze
  • Alt + SysReq + REISUB does not work

My exact issue seems to be described in another AskUbuntu question, however, I don't believe I'm experiencing a hardware problem. I dual-boot with Windows 7 and Windows 7 has been working flawlessly.

I have tried both Unity as well as Gnome-Shell, and both end up hanging. The hang is not predictable and I'm not sure what causes it. I thought it was being caused by streaming video from my file server (since that is what I most frequently do in Ubuntu and that is when the hangs were occurring), but last week the system hung despite playing a video file locally. It also hung once while doing nothing (only the browser was running).

For most of this year I've resorted to spending my time in Windows 7 as a result, but I'd really love to get Ubuntu stable again.

Any advice on diagnosing this issue?

  • 1
    I have trouble believing no one has experienced the same issue! I suppose I'll try the Ubuntu forums next. – mirzmaster Dec 07 '11 at 05:00
  • 1
    @mirzmanter Same issue here, and it is driving me insane. I'm about to downgrade to an older ubuntu, if I can't diagnose this. – William Dec 12 '11 at 22:24
  • Do you use open source graphics drivers? – RolandiXor Dec 16 '11 at 13:44
  • Does this occur when machine not busy, or during what action(s)? (assuming there is some pattern) – david6 Dec 19 '11 at 21:19
  • 1
    Having the same issue and this makes me mad. Several times a day. I'm using two pc's and it can even freeze event when I'm doing just nothing at all or working with another PC. This started from 11.04 and now happening with 11.10 – Yuriy Voziy Jan 13 '12 at 15:23
  • The answer posted by edmj000 seems to fit your symptoms exactly. Please test his remedy and +1 post accordingly. In the future you might want to try REISUB and BISECT to narrow down what could be the cause of all your troubles. This could have easily been mistaken as a hard-disk problem e.g. backing store on it's way out forcing high level writes to time out. Thanks. – ppetraki Jan 13 '12 at 18:27
  • Are you using encrypt-fs? This sounds an awful like like a video card problem -- what card do you have and does swapping the video card make any difference? – balloons Jan 13 '12 at 15:49
  • @ppetraki As I've just commented, I'm still experiencing the hangs albeit much less frequently. While backing up my files in preparation for a system format I noticed that the machine was no longer hanging, or so I thought. A couple of weeks later the hang occurred again. – mirzmaster May 31 '12 at 13:33
  • @david6 It occurs at random, although primarily while playing video -- my most frequent activity on the computer. – mirzmaster May 31 '12 at 13:34
  • @RolandTaylor Proprietary drivers, actually. – mirzmaster May 31 '12 at 13:35
  • You're still back to bisecting, which means removing features like cryptfs and proprietary drivers until, the system stabilizes. You could try setting up crashdump and sending a magic sysrq next time it hangs, but there's no guarantee that the magic sysrq will get through. A dump would get us the final dmesg logs and what the system was doing at the time of hang. You could also string a serial console to your system and just log it in the hopes that something interesting will pop up next time it hangs. – ppetraki Jun 01 '12 at 13:24

3 Answers3

5

The eCryptfs errors were caused by a regression.

It was fixed in Oneiric kernel version 3.0.0-15.25.

I'm not sure that the eCryptfs bug is what caused all of the problems you listed, but upgrading your kernel will remove one more variable while tracking down your issues.

tyhicks
  • 359
3

This appears to be occuring to some people who have upgraded from 11.04 to 11.10 and kept their encrypted home folder. There is no fix yet however there is a workaround. The issue can be resolved by deleting all encryptfs-encrypted files of zero lenght using the following command:

find /home/.ecryptfs/$USER/.Private/ -size 0c -exec ls '{}' \; | wc -l

Source: https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/870326

edm
  • 4,005
  • I have employed this suggestion, although it hasn't resolved the issue for me. The hangs do still occur albeit less frequently (and I'm not sure it's related to removing these zero-length files either). – mirzmaster May 31 '12 at 13:30
2

Some times it will take time to debug issues.Coming to your question,since when the error started to occur.Did you add or remove any new hardware or software before the occurrence of the error.

Diagnostics

  1. Run the memtest memory diagnostic tool provided with Live CD for alt least 24 hours.
  2. Check your hard disk health.
  3. Do you have dedicated graphics card installed in your computer,if yes please check the graphics drivers and update to recommended version.
upsla
  • 71
  • 2
    I've made an upgrade for Memory and HDD recently. Freezes happened with old Memory\HDD and now with the new ones. Nothing's changed – Yuriy Voziy Jan 13 '12 at 15:27