linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	Peter Xu <peterx@redhat.com>
Cc: "open list : MEMORY MANAGEMENT" <linux-mm@kvack.org>
Subject: Re: soft-dirty kselftest is crashing on next-20221122
Date: Tue, 22 Nov 2022 16:45:02 +0100	[thread overview]
Message-ID: <9d5957da-0e8f-6f5d-a658-499953496978@redhat.com> (raw)
In-Reply-To: <21917884-f372-cd89-1c66-267f610390ab@redhat.com>

On 22.11.22 16:42, David Hildenbrand wrote:
> On 22.11.22 16:05, Muhammad Usama Anjum wrote:
>> On 11/22/22 7:49 PM, David Hildenbrand wrote:
>>> On 22.11.22 15:00, Muhammad Usama Anjum wrote:
>>>> Hello,
>>>>
>>>> I'm getting segmentation fault when mprotect file sub-tests in soft-dirty
>>>> kselftest are run on top next-20221122 and on v6.0. These sub-tests were
>>>> added by Peter recently. Has someone noticed this already?
>>>
>>> On 6.0.7-200.fc36.x86_64, all tests pass.
>>>
>>> # ./soft-dirty
>>> TAP version 13
>>> 1..15
>>> ok 1 Test test_simple
>>> ok 2 Test test_vma_reuse dirty bit of allocated page
>>> ok 3 Test test_vma_reuse dirty bit of reused address page
>>> ok 4 Test test_hugepage huge page allocation
>>> ok 5 Test test_hugepage huge page dirty bit
>>> ok 6 Test test_mprotect-anon dirty bit of new written page
>>> ok 7 Test test_mprotect-anon soft-dirty clear after clear_refs
>>> ok 8 Test test_mprotect-anon soft-dirty clear after marking RO
>>> ok 9 Test test_mprotect-anon soft-dirty clear after marking RW
>>> ok 10 Test test_mprotect-anon soft-dirty after rewritten
>>> ok 11 Test test_mprotect-file dirty bit of new written page
>>> ok 12 Test test_mprotect-file soft-dirty clear after clear_refs
>>> ok 13 Test test_mprotect-file soft-dirty clear after marking RO
>>> ok 14 Test test_mprotect-file soft-dirty clear after marking RW
>>> ok 15 Test test_mprotect-file soft-dirty after rewritten
>>> # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0
>>>
>>>
>>> Same on a kernel close to mm-unstable on top of 6.1.0-rc4:
>>>
>>>
>>> # ./soft-dirty
>>> TAP version 13
>>> 1..15
>>> ok 1 Test test_simple
>>> ok 2 Test test_vma_reuse dirty bit of allocated page
>>> ok 3 Test test_vma_reuse dirty bit of reused address page
>>> ok 4 Test test_hugepage huge page allocation
>>> ok 5 Test test_hugepage huge page dirty bit
>>> ok 6 Test test_mprotect-anon dirty bit of new written page
>>> ok 7 Test test_mprotect-anon soft-dirty clear after clear_refs
>>> ok 8 Test test_mprotect-anon soft-dirty clear after marking RO
>>> ok 9 Test test_mprotect-anon soft-dirty clear after marking RW
>>> ok 10 Test test_mprotect-anon soft-dirty after rewritten
>>> ok 11 Test test_mprotect-file dirty bit of new written page
>>> ok 12 Test test_mprotect-file soft-dirty clear after clear_refs
>>> ok 13 Test test_mprotect-file soft-dirty clear after marking RO
>>> ok 14 Test test_mprotect-file soft-dirty clear after marking RW
>>> ok 15 Test test_mprotect-file soft-dirty after rewritten
>>> # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0
>>>
>>>
>>> Different architecture? Maybe recompile the tests?I get the segmentation on "Linux (none) 6.1.0-rc6-next-20221122 #36 SMP
>> PREEMPT_DYNAMIC Tue Nov 22 20:02:02 PKT 2022 x86_64":
>>
>> soft-dirty[237]: segfault at ffffffffffffffff ip 0000000000401dff sp
>> 00007ffc4ae08ee0 error 7 in soft-dirty[401000+2000] likely on CPU 0 (core
>> 0, socket 0)
>> [  348.579595] Code: bf 00 00 00 00 e8 e1 f2 ff ff 48 89 45 f0 48 83 7d f0
>> 00 75 11 48 8d 3d 5f 14 00 00 b8 00 00 00 00 e8 75 f9 ff ff 48 8b 45 f0
>> <c6> 00 01 48 8b 55 f0 8b 45 cc 48 89 d6 89 c7 e8 50 05 00 00
>> 8root@(none):/home/usama/repos/kernel/linux_mainline/tools/testing/selftests/vm#
>> [  353.015360] soft-dirty[238]: segfault at ffffffffffffffff ip
>> 0000000000401dff sp 00007ffc8ec97f80 error 7 in soft-dirty[401000+2000]
>> likely on CPU 0 (core 0, socket 0)
>> [  353.016456] Code: bf 00 00 00 00 e8 e1 f2 ff ff 48 89 45 f0 48 83 7d f0
>> 00 75 11 48 8d 3d 5f 14 00 00 b8 00 00 00 00 e8 75 f9 ff ff 48 8b 45 f0
>> <c6> 00 01 48 8b 55 f0 8b 45 cc 48 89 d6 89 c7 e8 50 05 00 00 84 c0
>>
>> The config is attached. This is a minimal config. The kernel is run inside
>> a qemu instance with help of virtme scripts.
>>
> 
> 99.9% your config (+BTRFS, -debug symbols)
> 
> [root@vm-0 vm]# uname -a
> Linux vm-0 6.1.0-rc6-next-20221122 #4 SMP PREEMPT_DYNAMIC Tue Nov 22
> 15:37:42 UTC 2022 x86_64 x86_64 x8x
> [root@vm-0 vm]# ./soft-dirty
> TAP version 13
> 1..15
> ok 1 Test test_simple
> ok 2 Test test_vma_reuse dirty bit of allocated page
> ok 3 Test test_vma_reuse dirty bit of reused address page
> ok 4 Test test_hugepage huge page allocation
> ok 5 Test test_hugepage huge page dirty bit
> ok 6 Test test_mprotect-anon dirty bit of new written page
> ok 7 Test test_mprotect-anon soft-dirty clear after clear_refs
> ok 8 Test test_mprotect-anon soft-dirty clear after marking RO
> ok 9 Test test_mprotect-anon soft-dirty clear after marking RW
> ok 10 Test test_mprotect-anon soft-dirty after rewritten
> ok 11 Test test_mprotect-file dirty bit of new written page
> ok 12 Test test_mprotect-file soft-dirty clear after clear_refs
> ok 13 Test test_mprotect-file soft-dirty clear after marking RO
> ok 14 Test test_mprotect-file soft-dirty clear after marking RW
> ok 15 Test test_mprotect-file soft-dirty after rewritten
> # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0
> 
> 
> Are you maybe compiling the tests on the host or the guest does not have
> sufficient vCPU features (e.g., "-cpu host" on the kernel cmdline)?

s/kernel/QEMU/

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2022-11-22 15:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 14:00 Muhammad Usama Anjum
2022-11-22 14:49 ` David Hildenbrand
2022-11-22 15:05   ` Muhammad Usama Anjum
2022-11-22 15:42     ` David Hildenbrand
2022-11-22 15:45       ` David Hildenbrand [this message]
2022-11-22 15:52       ` Muhammad Usama Anjum

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=9d5957da-0e8f-6f5d-a658-499953496978@redhat.com \
    --to=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=usama.anjum@collabora.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