RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1278992 - ceph-osd aborts during 'XFS: possible memory allocation deadlock in kmem_alloc (mode:0x8250)' when directory block size of 64k used
Summary: ceph-osd aborts during 'XFS: possible memory allocation deadlock in kmem_allo...
Keywords:
Status: CLOSED DUPLICATE of bug 1721498
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kernel
Version: 7.1
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 7.4
Assignee: fs-maint
QA Contact: Zorro Lang
URL:
Whiteboard:
Depends On:
Blocks: 1203710 1295577 1298243 1313485 1469559
TreeView+ depends on / blocked
 
Reported: 2015-11-06 23:47 UTC by Kyle Squizzato
Modified: 2023-09-07 18:43 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-25 08:50:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1597523 0 None None None Never

Description Kyle Squizzato 2015-11-06 23:47:21 UTC
Description of problem:
ceph-osd daemons begin to suicide during XFS memory allocation deadlocks.  The following messages are printed to /var/log/messages: 

XFS: possible memory allocation deadlock in kmem_alloc (mode:0x8250)  

This appears to occur when a directory block size of 64k used: 

 -n size=65536

Version-Release number of selected component (if applicable):
3.10.0-123.20.1.el7.x86_64 

How reproducible:
Not sure how the issue can be reproduced, however the issue appears to occur when Ceph OSD's are under heavy load in a Ceph (Firefly) cluster.


Actual results:
XFS deadlocks and ceph-osd's suicide. 


Expected results:
No XFS deadlock or ceph-osd suicide's.

Comment 2 Brian Foster 2015-11-07 15:03:00 UTC
Just as a quick first step experiment, I formatted an '-n size=64k' fs and ran a quick file creation/deletion loop with a debug printk() in xlog_cil_insert_format_items() to dump the size of any >PAGE_SIZE allocation requests. I very quickly see allocs up to around 64k, some even larger:

...
xlog_cil_insert_format_items(243): buf_size 64984 (nbytes 64880 niovecs 3)
xlog_cil_insert_format_items(243): buf_size 65112 (nbytes 65008 niovecs 3)
xlog_cil_insert_format_items(243): buf_size 65368 (nbytes 65264 niovecs 3)
xlog_cil_insert_format_items(243): buf_size 65496 (nbytes 65392 niovecs 3)
xlog_cil_insert_format_items(243): buf_size 65728 (nbytes 65640 niovecs 2)
...

From that perspective, it doesn't seem that surprising to see allocation failures from kmem_zalloc() calls here if we assume memory fragmentation is an eventuality. Further, we're in KM_NOFS context which I assume precludes things like writeback, etc., but even if we weren't, those are still order 4 or larger sized requests.

My first question is, without having yet dug into the core context for these allocation sizes, is there any reason for not using something like kmem_zalloc_large() here (assuming we preserve the KM_SLEEP behavior)?

Comment 3 Dave Chinner 2015-11-09 10:41:18 UTC
Why are is the filesystem configured to use 64k directory block sizes? Are they putting millions of files in a single directory? If not, then just use the default directory block size and the problem goes away....

-Dave.

Comment 14 Eric Sandeen 2016-06-30 16:27:11 UTC
This is a known issue w/ 64k dirs, and there is no current solution, though workarounds exist (i.e. don't mkfs w/ that option).

For now moving to 7.4, though AFAIK there has been no upstream activity on this either, so 7.4 is not necessarily likely, either.

Comment 15 Joseph Kachuck 2017-10-24 20:44:28 UTC
Hello HPE,
From comment 14. Should this bug be moved to a medium or low bug?

As it appears this issue will not be fixed. Would HPE like a kbase stating this option do not work?

Thank You
Joe Kachuck

Comment 16 Dave Wysochanski 2018-03-29 18:40:57 UTC
As far as I know there's no plans to address this and there's no recent activity in the bug.  Feel free to reopen if you have new information.


Note You need to log in before you can comment on or make changes to this bug.