All of lore.kernel.org
 help / color / mirror / Atom feed
* BUG Re: mm: vma_merge: fix vm_page_prot SMP race condition against rmap_walk
@ 2016-09-27 10:16 ` Shaun Tancheff
  0 siblings, 0 replies; 6+ messages in thread
From: Shaun Tancheff @ 2016-09-27 10:16 UTC (permalink / raw)
  To: Andrea Arcangeli
  Cc: Andrew Morton, Kirill A. Shutemov, Vlastimil Babka, Michal Hocko,
	Ingo Molnar, Dave Hansen, Dan Williams, Johannes Weiner,
	Joonsoo Kim, Konstantin Khlebnikov, Chen Gang, Shaun Tancheff,
	Andrey Ryabinin, Thomas Gleixner, Mel Gorman, Piotr Kwapulinski,
	linux-mm, LKML, Shaun Tancheff

git bisect points at commit  c9634dcf00c9c93b ("mm: vma_merge: fix
vm_page_prot SMP race condition against rmap_walk")

Last lines to console are [transcribed]:

vma ffff8c3d989a7c78 start 00007fe02ed4c000 end 00007fe02ed52000
next ffff8c3d96de0c38 prev ffff8c3d989a6e40 mm ffff8c3d071cbac0
prot 8000000000000025 anon_vma ffff8c3d96fc9b28 vm_ops           (null)
pgoff 7fe02ed4c file           (null) private_data           (null)
flags: 0x8100073(read|write|mayread|maywrite|mayexec|account|softdirty)

Reproducer is an Ubuntu 16.04.1 LTS x86_64 running on a VM (VirtualBox).
Symptom is a solid hang after boot and switch to starting gnome session.

Hang at about 35s.

kdbg traceback is all null entries.

Let me know what additional information I can provide.

Regards,
Shaun Tancheff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* BUG Re: mm: vma_merge: fix vm_page_prot SMP race condition against rmap_walk
@ 2016-09-27 10:16 ` Shaun Tancheff
  0 siblings, 0 replies; 6+ messages in thread
From: Shaun Tancheff @ 2016-09-27 10:16 UTC (permalink / raw)
  To: Andrea Arcangeli
  Cc: Andrew Morton, Kirill A. Shutemov, Vlastimil Babka, Michal Hocko,
	Ingo Molnar, Dave Hansen, Dan Williams, Johannes Weiner,
	Joonsoo Kim, Konstantin Khlebnikov, Chen Gang, Shaun Tancheff,
	Andrey Ryabinin, Thomas Gleixner, Mel Gorman, Piotr Kwapulinski,
	linux-mm, LKML, Shaun Tancheff

git bisect points at commit  c9634dcf00c9c93b ("mm: vma_merge: fix
vm_page_prot SMP race condition against rmap_walk")

Last lines to console are [transcribed]:

vma ffff8c3d989a7c78 start 00007fe02ed4c000 end 00007fe02ed52000
next ffff8c3d96de0c38 prev ffff8c3d989a6e40 mm ffff8c3d071cbac0
prot 8000000000000025 anon_vma ffff8c3d96fc9b28 vm_ops           (null)
pgoff 7fe02ed4c file           (null) private_data           (null)
flags: 0x8100073(read|write|mayread|maywrite|mayexec|account|softdirty)

Reproducer is an Ubuntu 16.04.1 LTS x86_64 running on a VM (VirtualBox).
Symptom is a solid hang after boot and switch to starting gnome session.

Hang at about 35s.

kdbg traceback is all null entries.

Let me know what additional information I can provide.

Regards,
Shaun Tancheff

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG Re: mm: vma_merge: fix vm_page_prot SMP race condition against rmap_walk
  2016-09-27 10:16 ` Shaun Tancheff
@ 2016-09-27 16:05   ` Andrea Arcangeli
  -1 siblings, 0 replies; 6+ messages in thread
From: Andrea Arcangeli @ 2016-09-27 16:05 UTC (permalink / raw)
  To: Shaun Tancheff
  Cc: Andrew Morton, Kirill A. Shutemov, Vlastimil Babka, Michal Hocko,
	Ingo Molnar, Dave Hansen, Dan Williams, Johannes Weiner,
	Joonsoo Kim, Konstantin Khlebnikov, Chen Gang, Andrey Ryabinin,
	Thomas Gleixner, Mel Gorman, Piotr Kwapulinski, linux-mm, LKML,
	Shaun Tancheff

Hello,

On Tue, Sep 27, 2016 at 05:16:15AM -0500, Shaun Tancheff wrote:
> git bisect points at commit  c9634dcf00c9c93b ("mm: vma_merge: fix
> vm_page_prot SMP race condition against rmap_walk")

I assume linux-next? But I can't find the commit, but I should know
what this is.

> 
> Last lines to console are [transcribed]:
> 
> vma ffff8c3d989a7c78 start 00007fe02ed4c000 end 00007fe02ed52000
> next ffff8c3d96de0c38 prev ffff8c3d989a6e40 mm ffff8c3d071cbac0
> prot 8000000000000025 anon_vma ffff8c3d96fc9b28 vm_ops           (null)
> pgoff 7fe02ed4c file           (null) private_data           (null)
> flags: 0x8100073(read|write|mayread|maywrite|mayexec|account|softdirty)

It's a false positive, you have DEBUG_VM_RB=y, you can disable it or
cherry-pick the fix:

https://git.kernel.org/cgit/linux/kernel/git/andrea/aa.git/commit/?id=74d8b44224f31153e23ca8a7f7f0700091f5a9b2

The assumption validate_mm_rb did isn't valid anymore on the new code
during __vma_unlink, the validation code must be updated to skip the
next vma instead of the current one after this change. It's a bug in
DEBUG_VM_RB=y, if you keep DEBUG_VM_RB=n there's no bug.

> Reproducer is an Ubuntu 16.04.1 LTS x86_64 running on a VM (VirtualBox).
> Symptom is a solid hang after boot and switch to starting gnome session.
> 
> Hang at about 35s.
> 
> kdbg traceback is all null entries.
> 
> Let me know what additional information I can provide.

I already submitted the fix to Andrew last week:

https://marc.info/?l=linux-mm&m=147449253801920&w=2

I assume it's pending for merging in -mm.

If you can test this patch and confirm the problem goes away with
DEBUG_VM_RB=y it'd be great.

Thanks,
Andrea

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG Re: mm: vma_merge: fix vm_page_prot SMP race condition against rmap_walk
@ 2016-09-27 16:05   ` Andrea Arcangeli
  0 siblings, 0 replies; 6+ messages in thread
From: Andrea Arcangeli @ 2016-09-27 16:05 UTC (permalink / raw)
  To: Shaun Tancheff
  Cc: Andrew Morton, Kirill A. Shutemov, Vlastimil Babka, Michal Hocko,
	Ingo Molnar, Dave Hansen, Dan Williams, Johannes Weiner,
	Joonsoo Kim, Konstantin Khlebnikov, Chen Gang, Andrey Ryabinin,
	Thomas Gleixner, Mel Gorman, Piotr Kwapulinski, linux-mm, LKML,
	Shaun Tancheff

Hello,

On Tue, Sep 27, 2016 at 05:16:15AM -0500, Shaun Tancheff wrote:
> git bisect points at commit  c9634dcf00c9c93b ("mm: vma_merge: fix
> vm_page_prot SMP race condition against rmap_walk")

I assume linux-next? But I can't find the commit, but I should know
what this is.

> 
> Last lines to console are [transcribed]:
> 
> vma ffff8c3d989a7c78 start 00007fe02ed4c000 end 00007fe02ed52000
> next ffff8c3d96de0c38 prev ffff8c3d989a6e40 mm ffff8c3d071cbac0
> prot 8000000000000025 anon_vma ffff8c3d96fc9b28 vm_ops           (null)
> pgoff 7fe02ed4c file           (null) private_data           (null)
> flags: 0x8100073(read|write|mayread|maywrite|mayexec|account|softdirty)

It's a false positive, you have DEBUG_VM_RB=y, you can disable it or
cherry-pick the fix:

https://git.kernel.org/cgit/linux/kernel/git/andrea/aa.git/commit/?id=74d8b44224f31153e23ca8a7f7f0700091f5a9b2

The assumption validate_mm_rb did isn't valid anymore on the new code
during __vma_unlink, the validation code must be updated to skip the
next vma instead of the current one after this change. It's a bug in
DEBUG_VM_RB=y, if you keep DEBUG_VM_RB=n there's no bug.

> Reproducer is an Ubuntu 16.04.1 LTS x86_64 running on a VM (VirtualBox).
> Symptom is a solid hang after boot and switch to starting gnome session.
> 
> Hang at about 35s.
> 
> kdbg traceback is all null entries.
> 
> Let me know what additional information I can provide.

I already submitted the fix to Andrew last week:

https://marc.info/?l=linux-mm&m=147449253801920&w=2

I assume it's pending for merging in -mm.

If you can test this patch and confirm the problem goes away with
DEBUG_VM_RB=y it'd be great.

Thanks,
Andrea

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG Re: mm: vma_merge: fix vm_page_prot SMP race condition against rmap_walk
  2016-09-27 16:05   ` Andrea Arcangeli
@ 2016-09-27 20:05     ` Shaun Tancheff
  -1 siblings, 0 replies; 6+ messages in thread
From: Shaun Tancheff @ 2016-09-27 20:05 UTC (permalink / raw)
  To: Andrea Arcangeli
  Cc: Shaun Tancheff, Andrew Morton, Kirill A. Shutemov,
	Vlastimil Babka, Michal Hocko, Ingo Molnar, Dave Hansen,
	Dan Williams, Johannes Weiner, Joonsoo Kim,
	Konstantin Khlebnikov, Chen Gang, Andrey Ryabinin,
	Thomas Gleixner, Mel Gorman, Piotr Kwapulinski, linux-mm, LKML

Confirmed:
  - Removing DEBUG_VM_RB fixes the hang.

Also confirmed:
 - Above patch fixes the hang when DEBUG_VM_RB is re-enabled.

Thanks!



On Tue, Sep 27, 2016 at 11:05 AM, Andrea Arcangeli <aarcange@redhat.com> wrote:
> Hello,
>
> On Tue, Sep 27, 2016 at 05:16:15AM -0500, Shaun Tancheff wrote:
>> git bisect points at commit  c9634dcf00c9c93b ("mm: vma_merge: fix
>> vm_page_prot SMP race condition against rmap_walk")
>
> I assume linux-next? But I can't find the commit, but I should know
> what this is.
>
>>
>> Last lines to console are [transcribed]:
>>
>> vma ffff8c3d989a7c78 start 00007fe02ed4c000 end 00007fe02ed52000
>> next ffff8c3d96de0c38 prev ffff8c3d989a6e40 mm ffff8c3d071cbac0
>> prot 8000000000000025 anon_vma ffff8c3d96fc9b28 vm_ops           (null)
>> pgoff 7fe02ed4c file           (null) private_data           (null)
>> flags: 0x8100073(read|write|mayread|maywrite|mayexec|account|softdirty)
>
> It's a false positive, you have DEBUG_VM_RB=y, you can disable it or
> cherry-pick the fix:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_cgit_linux_kernel_git_andrea_aa.git_commit_-3Fid-3D74d8b44224f31153e23ca8a7f7f0700091f5a9b2&d=DQIBAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=mhyVFRknYnKxpypFw43nt0xMGGZX0r4k-qe6PIyp5ew&s=QjS2W4fUFnnJl4YxCk4WB30v5281AC4B7bAQeP8KWlQ&e=
>
> The assumption validate_mm_rb did isn't valid anymore on the new code
> during __vma_unlink, the validation code must be updated to skip the
> next vma instead of the current one after this change. It's a bug in
> DEBUG_VM_RB=y, if you keep DEBUG_VM_RB=n there's no bug.
>
>> Reproducer is an Ubuntu 16.04.1 LTS x86_64 running on a VM (VirtualBox).
>> Symptom is a solid hang after boot and switch to starting gnome session.
>>
>> Hang at about 35s.
>>
>> kdbg traceback is all null entries.
>>
>> Let me know what additional information I can provide.
>
> I already submitted the fix to Andrew last week:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__marc.info_-3Fl-3Dlinux-2Dmm-26m-3D147449253801920-26w-3D2&d=DQIBAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=mhyVFRknYnKxpypFw43nt0xMGGZX0r4k-qe6PIyp5ew&s=EIo2P9JsNNIZSPoTgxO2vC5DJE4p6-HeOznwL1qhowo&e=
>
> I assume it's pending for merging in -mm.
>
> If you can test this patch and confirm the problem goes away with
> DEBUG_VM_RB=y it'd be great.
>
> Thanks,
> Andrea



-- 
Shaun Tancheff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG Re: mm: vma_merge: fix vm_page_prot SMP race condition against rmap_walk
@ 2016-09-27 20:05     ` Shaun Tancheff
  0 siblings, 0 replies; 6+ messages in thread
From: Shaun Tancheff @ 2016-09-27 20:05 UTC (permalink / raw)
  To: Andrea Arcangeli
  Cc: Shaun Tancheff, Andrew Morton, Kirill A. Shutemov,
	Vlastimil Babka, Michal Hocko, Ingo Molnar, Dave Hansen,
	Dan Williams, Johannes Weiner, Joonsoo Kim,
	Konstantin Khlebnikov, Chen Gang, Andrey Ryabinin,
	Thomas Gleixner, Mel Gorman, Piotr Kwapulinski, linux-mm, LKML

Confirmed:
  - Removing DEBUG_VM_RB fixes the hang.

Also confirmed:
 - Above patch fixes the hang when DEBUG_VM_RB is re-enabled.

Thanks!



On Tue, Sep 27, 2016 at 11:05 AM, Andrea Arcangeli <aarcange@redhat.com> wrote:
> Hello,
>
> On Tue, Sep 27, 2016 at 05:16:15AM -0500, Shaun Tancheff wrote:
>> git bisect points at commit  c9634dcf00c9c93b ("mm: vma_merge: fix
>> vm_page_prot SMP race condition against rmap_walk")
>
> I assume linux-next? But I can't find the commit, but I should know
> what this is.
>
>>
>> Last lines to console are [transcribed]:
>>
>> vma ffff8c3d989a7c78 start 00007fe02ed4c000 end 00007fe02ed52000
>> next ffff8c3d96de0c38 prev ffff8c3d989a6e40 mm ffff8c3d071cbac0
>> prot 8000000000000025 anon_vma ffff8c3d96fc9b28 vm_ops           (null)
>> pgoff 7fe02ed4c file           (null) private_data           (null)
>> flags: 0x8100073(read|write|mayread|maywrite|mayexec|account|softdirty)
>
> It's a false positive, you have DEBUG_VM_RB=y, you can disable it or
> cherry-pick the fix:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_cgit_linux_kernel_git_andrea_aa.git_commit_-3Fid-3D74d8b44224f31153e23ca8a7f7f0700091f5a9b2&d=DQIBAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=mhyVFRknYnKxpypFw43nt0xMGGZX0r4k-qe6PIyp5ew&s=QjS2W4fUFnnJl4YxCk4WB30v5281AC4B7bAQeP8KWlQ&e=
>
> The assumption validate_mm_rb did isn't valid anymore on the new code
> during __vma_unlink, the validation code must be updated to skip the
> next vma instead of the current one after this change. It's a bug in
> DEBUG_VM_RB=y, if you keep DEBUG_VM_RB=n there's no bug.
>
>> Reproducer is an Ubuntu 16.04.1 LTS x86_64 running on a VM (VirtualBox).
>> Symptom is a solid hang after boot and switch to starting gnome session.
>>
>> Hang at about 35s.
>>
>> kdbg traceback is all null entries.
>>
>> Let me know what additional information I can provide.
>
> I already submitted the fix to Andrew last week:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__marc.info_-3Fl-3Dlinux-2Dmm-26m-3D147449253801920-26w-3D2&d=DQIBAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=mhyVFRknYnKxpypFw43nt0xMGGZX0r4k-qe6PIyp5ew&s=EIo2P9JsNNIZSPoTgxO2vC5DJE4p6-HeOznwL1qhowo&e=
>
> I assume it's pending for merging in -mm.
>
> If you can test this patch and confirm the problem goes away with
> DEBUG_VM_RB=y it'd be great.
>
> Thanks,
> Andrea



-- 
Shaun Tancheff

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-27 20:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-27 10:16 BUG Re: mm: vma_merge: fix vm_page_prot SMP race condition against rmap_walk Shaun Tancheff
2016-09-27 10:16 ` Shaun Tancheff
2016-09-27 16:05 ` Andrea Arcangeli
2016-09-27 16:05   ` Andrea Arcangeli
2016-09-27 20:05   ` Shaun Tancheff
2016-09-27 20:05     ` Shaun Tancheff

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.