← 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

 

I have now installed the kernel image on a server which previously
experienced MySQL crashes every 1 to 2 hours. The server uses MySQL for
an Icinga2 monitoring database (so it's frequently writing) and is
configured to create btrfs snapshots every 5 minutes.

# cat /proc/version
Linux version 4.4.0-22-generic (root@gomeisa) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) ) #40~lp1584052 SMP Fri May 20 14:34:33 UTC 2016

I'll let it run for 24 hours and report back.

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