← Back to team overview

kernel-packages team mailing list archive

[Bug 1584052] Re: btrfs: file write crashes with false ENOSPC during snapshot creation since kernel 4.4 - fix available

 

The Xenial test kernel with a pick of 4da2e26 resolves the bug, no
negative side effects were encountered.

With the Xenial release kernel, there were 18 MySQL server crashes in a
24 hour period due to false ENOSPC indications. With the test kernel,
not a single crash occured in a 24 hour period.

Additionally, I've checked with a script derived from
https://patchwork.kernel.org/patch/7967161/ (see attachment), which
creates a temporary btrfs test image in a plain file. The script
provoked ENOSPC errors with the release kernel on most runs (sometimes
it missed, presumably due to timing conditions). The script could not
provoke a single ENOSPC condition with the test kernel.

** Attachment added: "Test script"
   https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1584052/+attachment/4668117/+files/test-btrfs-write-while-snapshotting.sh

-- 
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/1584052

Title:
  btrfs: file write crashes with false ENOSPC during snapshot creation
  since kernel 4.4 - fix available

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Xenial:
  In Progress

Bug description:
  Kernel 4.4 introduced a btrfs bug where a process writing a file while
  a snapshot creation is underway will receive a false ENOSPC error (No
  space left on device), even while there is plenty of free space on the
  file system. On systems where snapshots are created frequently, this
  leads to frequent database crashes (here with MySQL):

  2016-05-19T21:00:01.862106Z 0 [Warning] InnoDB: Retry attempts for writing partial data failed.
  2016-05-19T21:00:01.862133Z 0 [ERROR] InnoDB: Write to file ./ibdata1failed at offset 1048576, 16384 bytes should have been written, only 0 were written. Operating system error number 28. Check that your OS a
  nd file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
  2016-05-19T21:00:01.862143Z 0 [ERROR] InnoDB: Error number 28 means 'No space left on device'

  The problem is well known: http://www.spinics.net/lists/linux-btrfs/msg52672.html
  A patch is available: https://patchwork.kernel.org/patch/7967161/
  The patch has been committed to the Linux Kernel source tree on Feb 18, 2016: https://github.com/torvalds/linux/commits/master/fs/btrfs/file.c

  Creating snapshots for undo and backup purposes without interrupting
  database operations is a central aspect of btrfs usage. This bug
  breaks server operations and should be fixed in the xenial kernel.

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


References