Re: OOPSes in mem_cgroup_protected
From: John Stultz
Date: Wed Jun 13 2018 - 15:40:30 EST
On Tue, Jun 12, 2018 at 9:33 PM, Roman Gushchin <guro@xxxxxx> wrote:
> On Tue, Jun 12, 2018 at 09:08:27PM -0700, John Stultz wrote:
>> On Tue, Jun 12, 2018 at 6:02 PM, John Stultz <john.stultz@xxxxxxxxxx> wrote:
>> > Hey Tejun,
>> > With the current linus/master, I'm able to fairly regularly trip
>> > OOPSes (two examples below) in mem_cgroup_protected(), which seems to
>> > be new. I haven't managed to trigger this sort of thing with v4.17.
>> > I've not had much time to dig in or bisect it - I only know that
>> > enabling most of the memory debuging config options didn't seem to
>> > trip anything prior to the issue. So I wanted to send you a heads up
>> > to see if there was already known, or if there was anything you might
>> > suggest to help chase this down.
>> So the line where we're crashing seems to be in mem_cgroup_protected():
>> parent_emin = READ_ONCE(parent->memory.emin);
>> where I'm guessing the parent->memory value is null, and emin is at
>> the 0x120 offset in the strucutre.
>> Reverting the following commits seems to avoid the issue.
>> bf8d5d52ffe8 ("memcg: introduce memory.min")
>> 5f93ad67436b ("mm: treat memory.low value inclusive")
>> 230671533d64 ("mm: memory.low hierarchical behavior")
>> I'm guessing I'm tripping over some path where the memory value never
>> gets initialized?
>> Any ideas or suggestions?
> Hi, John!
> The patch below should fix the problem.
> It's in the mm tree right now, and hopefully will be merged upstream asap.
> Sorry for the inconvenience.
No worries, thanks for the quick fix! The patch you sent seems to be