XFS: memory allocation deadlock in kmem_alloc (mode:0x8250)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Rafael David Tinoco | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
=== SRU Justification ===
Impact: xfs can hang on lack of contiguous memory page to be allocated.
Fix: upstream patch (b3f03bac813220
Testcase:
- buddyinfo showing lack of contiguous blocks to be allocated (fragmented memory)
- to create 1 million files in 1 directory (attached script as an example)
- to observe message: XFS: possible memory allocation deadlock in kmem_alloc (mode:0x250)
=== Original Description ===
It was brought to my attention the following situation:
http://
Precise kernel does not have XFS fix for kmem_alloc deadlock and users are facing this problem.
Output example:
"""
NFO: task ceph-osd:17047 blocked for more than 120 seconds.
[153972.073476] "echo 0 > /proc/sys/
[153972.076322] ceph-osd D ffff880869a28a60 0 17047 5423 0x00000000
[153972.076324] ffff880869a28750 0000000000000002 ffff880867788ee8 ffff8807e4e47500
[153972.079259] ffff880517addfd8 ffff880517addfd8 ffff880517addfd8 ffff880869a28750
[153972.082244] 0000000000000004 ffff880517addd48 ffff880517addd50 7fffffffffffffff
[153972.085278] Call Trace:
[153972.088310] [<ffffffff81410
[153972.091371] [<ffffffff8100a
[153972.094386] [<ffffffff81070
[153972.097358] [<ffffffff81412
[153972.100322] [<ffffffff81070
[153972.103292] [<ffffffff811a3
[153972.106212] [<ffffffff811a3
[153972.109085] [<ffffffff8134e
[153972.111954] [<ffffffff813eb
[153972.114839] [<ffffffff81053
[153972.117743] [<ffffffff81002
[153972.120632] [<ffffffff81052
[153972.123521] [<ffffffff81002
[153972.126400] [<ffffffff81414
[153972.299643] XFS: possible memory allocation deadlock in kmem_alloc (mode:0x250)
[153972.868782] XFS: possible memory allocation deadlock in kmem_alloc (mode:0x250)
[153973.038189] XFS: possible memory allocation deadlock in kmem_alloc (mode:0x250)
[153974.309978] XFS: possible memory allocation deadlock in kmem_alloc (mode:0x250)
"""
Fix, already included in Utopic, is upstream commit: b3f03bac8132207
Author: Dave Chinner <email address hidden>
Date: Tue Dec 3 23:50:57 2013 +1100
xfs: xfs_dir2_
If we are using a large directory block size, and memory becomes
fragmented, we can get memory allocation failures trying to
kmem_alloc(64k) for a temporary buffer. However, there is not need
for a directory buffer sized allocation, as the end result ends up
in the inode literal area. This is, at most, slightly less than 2k
of space, and hence we don't need an allocation larger than that
fora temporary buffer.
Signed-off-by: Dave Chinner <email address hidden>
Reviewed-by: Ben Myers <email address hidden>
Signed-off-by: Ben Myers <email address hidden>
CVE References
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
assignee: | nobody → Rafael David Tinoco (inaddy) |
Changed in linux (Ubuntu Trusty): | |
assignee: | nobody → Rafael David Tinoco (inaddy) |
status: | New → Confirmed |
Changed in linux (Ubuntu Utopic): | |
assignee: | Rafael David Tinoco (inaddy) → Chris J Arges (arges) |
assignee: | Chris J Arges (arges) → nobody |
status: | Confirmed → Fix Released |
tags: | added: cfs |
tags: |
added: cts removed: cfs |
Changed in linux (Ubuntu Trusty): | |
status: | Confirmed → Fix Committed |
I've made available a temporary hotfix for this issue:
https:/ /launchpad. net/~inaddy/ +archive/ ubuntu/ lp1382333
(available in some hours from now)
Anyone who suffer from this issue is welcome to give me feedback on the hotfix.
Thank you very much
Rafael Tinoco