Bug 105967 - [CI] igt@gem_exec_gttfill@basic - skip - not enough free RAM to execute the test
Summary: [CI] igt@gem_exec_gttfill@basic - skip - not enough free RAM to execute the test
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Tomi Sarvela
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-10 10:58 UTC by Martin Peres
Modified: 2018-06-21 19:58 UTC (History)
1 user (show)

See Also:
i915 platform: PNV
i915 features: GEM/execlists


Attachments

Description Martin Peres 2018-04-10 10:58:29 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4037/fi-pnv-d510/igt@gem_exec_gttfill@basic.html

Test requirement not met in function intel_require_memory, file ../lib/intel_os.c:292:
Test requirement: __intel_check_memory(count, size, mode, &required, &total)
Estimated that we need 129 objects and 517 MiB for the test, but only have 516 MiB available (RAM) and a maximum of 95882 objects
Last errno: 9, Bad file descriptor
Comment 1 Tomi Sarvela 2018-04-10 11:05:52 UTC
Disabled alsa-restore.service and apport.service, not much else left to do.
Comment 2 Chris Wilson 2018-04-10 11:27:53 UTC
How much memory do you think you have? Would it help if we say dumped /proc/slabinfo if the check fails?
Comment 3 Martin Peres 2018-04-10 11:59:07 UTC
(In reply to Chris Wilson from comment #2)
> How much memory do you think you have? Would it help if we say dumped
> /proc/slabinfo if the check fails?

Having both the total amount of memory and the output of /proc/slabinfo would be beneficial, yes!

Wanna write a patch for it?
Comment 4 Martin Peres 2018-04-10 11:59:41 UTC
(In reply to Martin Peres from comment #3)
> (In reply to Chris Wilson from comment #2)
> > How much memory do you think you have? Would it help if we say dumped
> > /proc/slabinfo if the check fails?
> 
> Having both the total amount of memory and the output of /proc/slabinfo
> would be beneficial, yes!
> 
> Wanna write a patch for it?

If so, make sure to add it to the lib/, so as any test that allocates loads of memory could use the helper :)
Comment 5 Chris Wilson 2018-04-11 08:41:59 UTC
More info in future:

commit e5829165c2ef96140c222429c0f174fb72c4324b (upstream/master)
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 10 13:16:16 2018 +0100

    lib: Dump meminfo and slabinfo if we complain about insufficient memory
    
    All too frequently, we fail our memory checks to a leak in the driver.
    While we give every opportunity for the driver to release the memory
    before we fail, if we do dump the meminfo and slabinfo, if available, so
    we can assign blame^W^W resolve the problem quickly.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=105967
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Martin Peres <martin.peres@linux.intel.com>
    Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
    Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Comment 6 Chris Wilson 2018-06-15 13:20:58 UTC
intel_os-WARNING: Insufficient free memory; /proc/meminfo:
MemTotal:         965812 kB
MemFree:          520256 kB
MemAvailable:     510932 kB
Buffers:             184 kB
Cached:            97664 kB
SwapCached:            0 kB
Active:           188800 kB
Inactive:         161496 kB
Active(anon):     128000 kB
Inactive(anon):   125308 kB
Active(file):      60800 kB
Inactive(file):    36188 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       1030140 kB
SwapFree:        1030140 kB
Dirty:               132 kB
Writeback:             0 kB
AnonPages:        252476 kB
Mapped:            96804 kB
Shmem:               856 kB
Slab:              67848 kB
SReclaimable:      26888 kB
SUnreclaim:        40960 kB
KernelStack:        2512 kB
PageTables:         6080 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1513044 kB
Committed_AS:     538144 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
AnonHugePages:     75776 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:       81356 kB
DirectMap2M:      950272 kB
Comment 7 Chris Wilson 2018-06-18 09:02:45 UTC
Fingers crossed the situation improves:

commit 778497e7965dc8662c770a89ebbd741778feb71e (HEAD, upstream/master)
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jun 15 14:31:19 2018 +0100

    lib: Purge os caches twice for good luck
    
    If at first we don't succeed, try, try again.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=105967
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Comment 8 Chris Wilson 2018-06-18 14:03:23 UTC
And my hopes were dashed. Still sporadic borderline failures.
Comment 9 Chris Wilson 2018-06-19 14:47:32 UTC
In today's iteration, give in and include "buffers" as free memory. Buffers corresponds to nr_blockdev_pages() so should just be pages backing file data, and easily disposable...

commit 9ab9268fa7eeda0a7ea6eb2ab02bb6c5b9c91ba0 (upstream/master, origin/master, origin/HEAD)
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jun 19 10:17:40 2018 +0100

    lib: Conservatively include residual buffers in the available ram estimate
    
    Add any buffers reported by sysinfo to the estimate of available memory.
    We do ask the kernel to purge it's caches before reporting sysinfo, but
    a few remain that may be forced out by our test usage, so include them.
    However, be conservative and only allow them to be swapped out.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=105967
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Comment 10 Chris Wilson 2018-06-21 11:04:39 UTC
I proclaim the problem swept under the carpet.
Comment 11 Martin Peres 2018-06-21 15:26:51 UTC
(In reply to Chris Wilson from comment #10)
> I proclaim the problem swept under the carpet.

Let's hope so! Thanks!
Comment 12 Chris Wilson 2018-06-21 19:58:20 UTC
Sadly premature, but I have a new plan https://patchwork.freedesktop.org/series/45176/


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.