Ubuntu – How to get Ubuntu to stop hanging periodically?

ecryptfs

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?

Best Answer

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.