From: Felix Blyakher <felixb@sgi.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Justin Piszcz <jpiszcz@lucidpixels.com>,
linux-kernel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: Kernel 2.6.30: Memory/XFS leak, OOM killer kills many processes
Date: Thu, 11 Jun 2009 16:35:08 -0500 [thread overview]
Message-ID: <96F5FBF8-17B6-4AA9-BAB4-377AF596692C@sgi.com> (raw)
In-Reply-To: <4A313F84.20900@sandeen.net>
On Jun 11, 2009, at 12:31 PM, Eric Sandeen wrote:
> Justin Piszcz wrote:
>>
>> On Thu, 11 Jun 2009, Justin Piszcz wrote:
>>
>>> Hello,
>>>
>>> I have a daily cron that backs up my root filesystem using
>>> xfsdump, it has
>>> remain unchanged for at least 7-10 kernel versions. When I
>>> migrated to
>>> 2.6.30, when the xfsdump ran at its scheduled time, nearly all of my
>>> processes were killed due to an OOM situation, I can reproduce the
>>> situation.
>>>
>>> Kernel: 2.6.30
>>> Dist: Debian Testing
>>> xfsdump: 2.2.48-1
>>
>> Kernel 2.6.29.4 does not exhibit this problem:
>>
>> xfsdump: estimated dump size: 8694781376 bytes
>> xfsdump: creating dump session media file 0 (media 0, file 0)
>> xfsdump: dumping ino map
>> xfsdump: dumping directories
>> xfsdump: dumping non-directory files
>> xfsdump: ending media file
>> xfsdump: media file size 8294709848 bytes
>> xfsdump: dump size (non-dir files) : 8208863560 bytes
>> xfsdump: dump complete: 102 seconds elapsed
>> xfsdump: Dump Status: SUCCESS
>>
>> XFS(?) bug in 2.6.30.
>
> Any chance for a bisect run? :)
Well, Hedi (@sgi) pointed out to the problem without
bisect :)
commit 28e211700a81b0a934b6c7a4b8e7dda843634d2f
Author: Christoph Hellwig <hch@infradead.org>
Date: Tue Feb 24 08:39:02 2009 -0500
xfs: fix getbmap vs mmap deadlock
we do allocate memory for out
out = kmem_zalloc(bmv->bmv_count * sizeof(struct getbmapx),
KM_MAYFAIL);
but I am not seeing where it's being released.
If I am reading the code correctly we need to handle the freeing in
in out_unlock_iolock.
The following should fix it:
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 4b0f6ef..7928b99 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -6086,6 +6086,7 @@ xfs_getbmap(
break;
}
+ kmem_free(out);
return error;
}
Felix
>
>
> Or, just as a thought, watch slabtop while you run the dump?
>
> -Eric
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2009-06-11 21:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-11 16:15 Justin Piszcz
2009-06-11 17:00 ` Justin Piszcz
2009-06-11 17:31 ` Eric Sandeen
2009-06-11 19:02 ` Felix Blyakher
2009-06-11 22:02 ` Mike Dresser
2009-06-11 21:35 ` Felix Blyakher [this message]
2009-06-12 8:37 ` Justin Piszcz
2009-06-12 9:57 ` Michael Weissenbacher
2009-06-12 15:54 ` Felix Blyakher
2009-06-11 18:49 ` markus reichelt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96F5FBF8-17B6-4AA9-BAB4-377AF596692C@sgi.com \
--to=felixb@sgi.com \
--cc=jpiszcz@lucidpixels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®