Re: soft-dirty kselftest is crashing on next-20221122

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/22/22 8:42 PM, 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)?
Thank you for testing it out. Sorry for the noise. I'm compiling tests
natively and running the them in qemu instances which also has "-cpu host"
option. I'll try to debug.

-- 
BR,
Muhammad Usama Anjum




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux