fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs

Bug #1983148 reported by Vasya Pupkin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This is a duplicate of https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1969247 because the bug is critical and still not fixed in Ubuntu 20.04.

Problem: fallocate() called with FALLOC_FL_ZERO_RANGE flag must return error on ZFS, but in Ubuntu 20.04 it doesn't return error and just creates zero-sized files.

This causes hard to recover data corruption with MySQL server 8.0.30 (because it started using fallocate() for redo files). More info here: https://bugs.mysql.com/bug.php?id=108012

Also, I cannot set affected package name as "zfsutils-linux" for some reason, but the problem is in zfsutils-linux, not zfs-linux (such package doesn't even exist in Ubuntu 20.04).

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: zfsutils-linux 0.8.3-1ubuntu12.14
ProcVersionSignature: Ubuntu 5.15.0-41.44~20.04.1-generic 5.15.39
Uname: Linux 5.15.0-41-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl icp
ApportVersion: 2.20.11-0ubuntu27.24
Architecture: amd64
CasperMD5CheckMismatches: ./boot/grub/efi.img
CasperMD5CheckResult: fail
Date: Fri Jul 29 21:51:34 2022
InstallationDate: Installed on 2021-01-21 (554 days ago)
InstallationMedia: Ubuntu-Server 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
ProcEnviron:
 SHELL=/bin/bash
 LANG=C.UTF-8
 TERM=screen.xterm-256color
 PATH=(custom, no user)
SourcePackage: zfs-linux
UpgradeStatus: No upgrade log present (probably fresh install)

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

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

Changed in zfs-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Rich (rincebrain) wrote :

The source package which produces the binary package zfsutils-linux is called zfs-linux.

https://github.com/openzfs/zfs/pull/13338 is what you'd like to cherrypick to fix this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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