Linux ZFS port doesn't respect RLIMIT_FSIZE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Fix Released
|
Unknown
|
|||
linux (Ubuntu) |
Fix Released
|
High
|
Colin Ian King | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Yakkety |
Fix Released
|
Undecided
|
Unassigned | ||
Zesty |
Fix Released
|
High
|
Colin Ian King | ||
zfs-linux (Ubuntu) |
Fix Released
|
High
|
Colin Ian King | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Yakkety |
Fix Released
|
Undecided
|
Unassigned | ||
Zesty |
Fix Released
|
High
|
Colin Ian King |
Bug Description
== SRU Request, Yakkety, Xenial ==
bash -c 'ulimit -f 1024; yes | head -n2097152' >/path/
On ext4, this test case prints something along the lines of:
bash: line 1: 11274 Broken pipe yes
11275 File size limit exceeded(core dumped) | head -n2097152
On ZFS, this test case incorrectly exits zero with no output, demonstrating that ZFS does not respect RLIMIT_FSIZE.
I asked a friend to run this on Solaris 5.10 and FreeBSD 10.0-CURRENT, and on those systems this test case correctly generates SIGXFSZ; so it seems that this is a bug in the Linux port of ZFS.
(This was discovered while tracking down Launchpad test suite failures under LXD on ZFS. Launchpad uses RLIMIT_FSIZE in one place to guard against bugs that cause debdiff to generate arbitrarily large amounts of output and fill the disk.)
== Fix ==
Upstream fix https:/
== Test case ==
With the fix:
bash -c 'ulimit -f 1024; yes | head -n2097152' >/path/
should report:
bash: line 1: 11274 Broken pipe yes
11275 File size limit exceeded(core dumped) | head -n2097152
== Regression Potential ==
Could break read/writes semantics to zfs
-------
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-
ProcVersionSign
Uname: Linux 4.4.0-57-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.4
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Jan 13 10:01:36 2017
EcryptfsInUse: Yes
HibernationDevice: RESUME=
InstallationDate: Installed on 2013-03-01 (1413 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha amd64 (20130223.1)
MachineType: LENOVO 20BXCTO1WW
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.157.6
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/21/2015
dmi.bios.vendor: LENOVO
dmi.bios.version: JBET49WW (1.14 )
dmi.board.
dmi.board.name: 20BXCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: SDK0E50512 STD
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 20BXCTO1WW
dmi.product.
dmi.sys.vendor: LENOVO
Changed in linux (Ubuntu): | |
assignee: | nobody → Colin Ian King (colin-king) |
importance: | Undecided → Medium |
importance: | Medium → High |
Changed in linux: | |
status: | Unknown → New |
Changed in linux: | |
status: | New → Fix Released |
Changed in zfs-linux (Ubuntu Zesty): | |
status: | New → Fix Released |
importance: | Undecided → Medium |
assignee: | nobody → Colin Ian King (colin-king) |
Changed in linux (Ubuntu Zesty): | |
status: | In Progress → Fix Released |
Changed in zfs-linux (Ubuntu Zesty): | |
importance: | Medium → High |
Changed in linux (Ubuntu Zesty): | |
status: | Fix Released → Fix Committed |
description: | updated |
Changed in linux (Ubuntu Xenial): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu Yakkety): | |
status: | New → Invalid |
status: | Invalid → Fix Committed |
Fix is currently in review / testing: https:/ /github. com/behlendorf/ zfs/commit/ 230c03e59d3d13d 9b60125f73cf3ff f327b45c21