ecryptfs should recover better from "out of disk space"-situations

Bug #872905 reported by Rolf Leggewie
44
This bug affects 5 people
Affects Status Importance Assigned to Milestone
eCryptfs
Fix Released
Medium
Tyler Hicks
ecryptfs-utils (Ubuntu)
Invalid
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Quantal
Invalid
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Colin Ian King
Precise
Fix Released
Undecided
Colin Ian King
Quantal
Fix Released
Undecided
Colin Ian King

Bug Description

currently ecryptfs does not recover well when the encrypted disk had run out of disk space. This could be improved (maybe something similar to the space reserved for root on ext2 partitions?). The issue that I usually run into is 0-sized files under /home/.ecryptfs and the corresponding entries in /var/log/syslog. There may be other issues as well.

Thank you for your work

Rolf Leggewie (r0lf)
description: updated
Rolf Leggewie (r0lf)
description: updated
Revision history for this message
Rolf Leggewie (r0lf) wrote :
Revision history for this message
Tyler Hicks (tyhicks) wrote :

This is something I hope to address soon.

Changed in ecryptfs:
assignee: nobody → Tyler Hicks (tyhicks)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Tyler Hicks (tyhicks) wrote :

This is strictly a kernel issue, so I'm marking ecryptfs-utils as invalid.

Changed in ecryptfs-utils (Ubuntu):
status: New → Invalid
tags: added: kernel
Revision history for this message
Tyler Hicks (tyhicks) wrote :
Changed in ecryptfs:
status: Triaged → In Progress
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Thanks, Tyler!

Revision history for this message
Tyler Hicks (tyhicks) wrote :

The fix for this is in the eCryptfs next branch. It should go into Linus' tree in the 3.6 merge window.

Changed in ecryptfs:
status: In Progress → Fix Committed
Revision history for this message
Tyler Hicks (tyhicks) wrote :

This fix was merged into Linus' tree. It should be released in 3.6-rc1.

http://git.kernel.org/linus/8bc2d3cf612994a960c2e8eaea37f6676f67082a

Tyler Hicks (tyhicks)
Changed in ecryptfs:
status: Fix Committed → Fix Released
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Quantal):
assignee: nobody → Colin King (colin-king)
status: New → Fix Committed
Changed in linux (Ubuntu Precise):
assignee: nobody → Colin King (colin-king)
status: New → In Progress
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Precise):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.5.0-9.9

---------------
linux (3.5.0-9.9) quantal-proposed; urgency=low

  [ Daniel P. Berrange ]

  * SAUCE: (drop after 3.6) Forbid invocation of kexec_load() outside
    initial PID namespace
    - LP: #1034125

  [ Douglas Bagnall ]

  * SAUCE: Unlock the rc_dev lock when the raw device is missing
    - LP: #1015836

  [ Ike Panhc ]

  * [Config] Enable EDAC/CLK for highbank
    - LP: #1008345

  [ Leann Ogasawara ]

  * Revert "ubuntu: AUFS -- reenable"

  [ Rob Herring ]

  * SAUCE: net: calxedaxgmac: add write barriers around setting owner bit
    - LP: #1008345
  * SAUCE: ARM smp_twd: add back "arm,smp-twd" compatible property
    - LP: #1008345
  * SAUCE: ARM: highbank: add soft power and reset key event handling
    - LP: #1008345
  * SAUCE: ARM: highbank: use writel_relaxed variant for pwr requests
    - LP: #1008345
  * SAUCE: ahci: un-staticize ahci_dev_classify
    - LP: #1008345
  * SAUCE: ahci_platform: add custom hard reset for Calxeda ahci ctrlr
    - LP: #1008345

  [ Upstream Kernel Changes ]

  * rt2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb.
    - LP: #871904
  * Avoid sysfs oops when an rc_dev's raw device is absent
    - LP: #1015836
  * eCryptfs: Copy up POSIX ACL and read-only flags from lower mount
  * clk: add DT clock binding support
    - LP: #1008345
  * clk: add DT fixed-clock binding support
    - LP: #1008345
  * clk: add highbank clock support
  * edac: add support for Calxeda highbank memory controller
    - LP: #1008345
  * edac: add support for Calxeda highbank L2 cache ecc
    - LP: #1008345
  * net: calxedaxgmac: enable rx cut-thru mode
    - LP: #1008345
  * net: calxedaxgmac: fix hang on rx refill
    - LP: #1008345
  * eCryptfs: Revert to a writethrough cache model
    - LP: #1034012
  * eCryptfs: Initialize empty lower files when opening them
    - LP: #911507
  * eCryptfs: Unlink lower inode when ecryptfs_create() fails
    - LP: #872905
 -- Leann Ogasawara <email address hidden> Wed, 08 Aug 2012 08:39:42 -0700

Changed in linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Precise in -proposed solves the problem (3.2.0-30.47). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-precise' to 'verification-done-precise'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-precise
Revision history for this message
Colin Ian King (colin-king) wrote :

Hand tested this on precise: Linux ubuntu 3.2.0-30-generic #47-Ubuntu SMP Wed Aug 15 19:30:10 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Created lower ext2 file system, mounted ecryptfs on top. Filled lower to full, attempted to create file in upper, got full disk, file was not created and there was no zero byte lower ecrypted file created either.

If I repeated this on an older kernel, we get zero byte lower ecrypted files created, thus showing the older kernels manifest this bug where as the -proposed kernel fixes this issue.

tags: added: verification-done-precise
removed: verification-needed-precise
Revision history for this message
MMlosh (mmlosh) wrote :

What?
The fix is in 3.5 kernel
You can't test with stock precise 3.2 kernel.
That's the kernel I ran into this stupid bug with.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ecryptfs-utils (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (13.6 KiB)

This bug was fixed in the package linux - 3.2.0-30.48

---------------
linux (3.2.0-30.48) precise-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1041217

  [ Upstream Kernel Changes ]

  * mutex: Place lock in contended state after fastpath_lock failure
    - LP: #1041114

linux (3.2.0-30.47) precise-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1036581

  [ Andy Whitcroft ]

  * add support for generating binary device trees and install them in
    /lib/firmware
    - LP: #1030600
  * [Config] add dtb_file configuration for highbank
    - LP: #1030600

  [ Chris Van Hoof ]

  * SAUCE: dell-laptop: additional rfkill blacklist Dell XPS 13
    - LP: #1030957
  * [Config] Add cifs support to the nfs-modules list
    - LP: #1031398

  [ Daniel P. Berrange ]

  * SAUCE: (drop after 3.6) Forbid invocation of kexec_load() outside
    initial PID namespace
    - LP: #1034125

  [ Dann Frazier ]

  * [Config] Compile the rtc-pl031 driver builtin on the highbank kernel
    flavour
    - LP: #1035110

  [ Douglas Bagnall ]

  * SAUCE: Unlock the rc_dev lock when the raw device is missing
    - LP: #1015836

  [ Rob Herring ]

  * SAUCE: ARM: highbank: add soft power and reset key event handling
    - LP: #1033853
  * SAUCE: ARM: highbank: use writel_relaxed variant for pwr requests
    - LP: #1033853
  * SAUCE: ahci: un-staticize ahci_dev_classify
    - LP: #1033853
  * SAUCE: ahci_platform: add custom hard reset for Calxeda ahci ctrlr
    - LP: #1033853

  [ Stefan Bader ]

  * (pre-stable) KVM: VMX: Set CPU_BASED_RDPMC_EXITING for nested
    - LP: #1031090

  [ Tim Gardner ]

  * [Config] updateconfigs

  [ Upstream Kernel Changes ]

  * ideapad: generate valid key event only
    - LP: #1029834
  * mm: reduce the amount of work done when updating min_free_kbytes
    - LP: #1032640
  * mm: compaction: allow compaction to isolate dirty pages
    - LP: #1032640
  * mm: compaction: determine if dirty pages can be migrated without
    blocking within ->migratepage
    - LP: #1032640
  * mm: page allocator: do not call direct reclaim for THP allocations
    while compaction is deferred
    - LP: #1032640
  * mm: compaction: make isolate_lru_page() filter-aware again
    - LP: #1032640
  * mm: compaction: introduce sync-light migration for use by compaction
    - LP: #1032640
  * mm: vmscan: when reclaiming for compaction, ensure there are sufficient
    free pages available
    - LP: #1032640
  * mm: vmscan: do not OOM if aborting reclaim to start compaction
    - LP: #1032640
  * mm: vmscan: check if reclaim should really abort even if
    compaction_ready() is true for one zone
    - LP: #1032640
  * vmscan: promote shared file mapped pages
    - LP: #1032640
  * vmscan: activate executable pages after first usage
    - LP: #1032640
  * mm/vmscan.c: consider swap space when deciding whether to continue
    reclaim
    - LP: #1032640
  * mm: test PageSwapBacked in lumpy reclaim
    - LP: #1032640
  * mm: vmscan: convert global reclaim to per-memcg LRU lists
    - LP: #1032640
  * cpuset: mm: reduce large amounts of memory barrier related damage v3
    - LP: #1032640
  * mm/hugetlb: fix warni...

Changed in linux (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of this Stable Release Update 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 regresssions.

Revision history for this message
reliable-robin-22 (nicolasdiogo) wrote :

hello

today, I discovered that my installation has this problem.

Ubuntu 16.04 LTS x64

Linux mylaptop 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

it ran out of space, and after 40% of disk has been freed - it does not create new files;

the error gives:
# dmesg | tail
[ 6813.738671] ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-28]
[ 6813.738674] ecryptfs_create: Failed to create file inlower filesystem
[ 6813.833609] ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-28]
[ 6813.833615] ecryptfs_create: Failed to create file inlower filesystem
[ 6827.199794] ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-28]
[ 6827.199797] ecryptfs_create: Failed to create file inlower filesystem
[ 6827.271814] ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-28]
[ 6827.271817] ecryptfs_create: Failed to create file inlower filesystem
[ 7241.586390] BTRFS info (device dm-2): relocating block group 237326303232 flags 1
[ 7241.758894] BTRFS info (device dm-2): relocating block group 237326303232 flags 1

Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in ecryptfs-utils (Ubuntu Precise):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.