qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Alexandr Moshkov" <dtalexundeer@yandex-team.ru>
Subject: Re: Failure of func-x86_64-memlock
Date: Tue, 9 Sep 2025 11:19:13 +0200	[thread overview]
Message-ID: <fd7b3742-c445-4b26-9f3f-e277f4131545@redhat.com> (raw)
In-Reply-To: <4957da97-4d2e-41db-9bb1-9197a577369d@linaro.org>

On 09/09/2025 09.48, Richard Henderson wrote:
> On 9/8/25 10:12, Thomas Huth wrote:
>> On 05/09/2025 12.26, Richard Henderson wrote:
>>> Hi guys,
>>>
>>> This test has been failing on my laptop for a few weeks.
>>> Any idea why?
>>
>> FWIW, the test still works for me (after enabling it with "ulimit -l 
>> 2097152").
>>
>>> There's nothing logged in tests/functional/x86_64/test_memlock*/*,
>>> which itself seems like a bug.
>>
>> Is there maybe any hint in meson-logs/testlog-thorough.txt instead?
> 
> Ah, yes, there it is:
> 
> TAP version 13
> not ok 1 test_memlock.MemlockTest.test_memlock_off
> ok 2 test_memlock.MemlockTest.test_memlock_on
> ok 3 test_memlock.MemlockTest.test_memlock_onfault
> 1..3
> ----------------------------------- stderr -----------------------------------
> /home/rth/qemu/src/python/qemu/qmp/legacy.py:89: DeprecationWarning: There 
> is no current event loop
>    self._aloop = asyncio.get_event_loop()
> Traceback (most recent call last):
>    File "/home/rth/qemu/src/tests/functional/x86_64/test_memlock.py", line 
> 40, in test_memlock_off
>      self.assertTrue(status['VmLck'] == 0)
> AssertionError: False is not true
> 
> 
> So it seems there's some non-zero amount of memory locked in the process, 
> likely nothing to do with what we're trying to test, but we're asserting 
> anyway.
> 
> Digging into /proc/pic/smaps, I have:
> 
> 79d7d3547000-79d7d354b000 rw-p 00000000 00:00 0
> Size:                 16 kB
> KernelPageSize:        4 kB
> MMUPageSize:           4 kB
> Rss:                  16 kB
> Pss:                  16 kB
> Pss_Dirty:            16 kB
> Shared_Clean:          0 kB
> Shared_Dirty:          0 kB
> Private_Clean:         0 kB
> Private_Dirty:        16 kB
> Referenced:           16 kB
> Anonymous:            16 kB
> KSM:                   0 kB
> LazyFree:              0 kB
> AnonHugePages:         0 kB
> ShmemPmdMapped:        0 kB
> FilePmdMapped:         0 kB
> Shared_Hugetlb:        0 kB
> Private_Hugetlb:       0 kB
> Swap:                  0 kB
> SwapPss:               0 kB
> Locked:               16 kB
> THPeligible:           0
> ProtectionKey:         0
> VmFlags: rd wr mr mw me lo ac sd
> 
> It's not labeled in /proc/pid/maps, so without more work I don't know where 
> it comes from, but *something* in my system libraries has asked for 4 pages 
> of locked memory.

Ok, then the easiest fix is likely to allow some few locked pages in that 
assert statement? Care to send a patch?

  Thomas



      reply	other threads:[~2025-09-09  9:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 10:26 Failure of func-x86_64-memlock Richard Henderson
2025-09-05 12:11 ` Alex Bennée
2025-09-08 10:12 ` Thomas Huth
2025-09-09  7:48   ` Richard Henderson
2025-09-09  9:19     ` Thomas Huth [this message]

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=fd7b3742-c445-4b26-9f3f-e277f4131545@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=dtalexundeer@yandex-team.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).