Bug 100667 - [HSW/BDW/BSW/GLK] gem_render_linear_blits@swap-thrash producing "Cannot allocate memory"
Summary: [HSW/BDW/BSW/GLK] gem_render_linear_blits@swap-thrash producing "Cannot alloc...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: maria guadalupe
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-12 22:03 UTC by maria guadalupe
Modified: 2017-10-03 20:45 UTC (History)
1 user (show)

See Also:
i915 platform: BDW, BSW/CHT, GLK, HSW
i915 features: GEM/Other


Attachments
dmesg_BDW.log (231.50 KB, text/plain)
2017-04-12 22:03 UTC, maria guadalupe
no flags Details
dmesg_HSW.log (100.19 KB, text/plain)
2017-04-12 22:16 UTC, maria guadalupe
no flags Details
dmesg_HSW_latest_commit.log (1.70 MB, text/x-log)
2017-06-27 22:01 UTC, Humberto Israel Perez Rodriguez
no flags Details

Description maria guadalupe 2017-04-12 22:03:00 UTC
Created attachment 130817 [details]
dmesg_BDW.log

the following test are failing with below configuration.

======== Steps to reproduce ===========
#./gem_render_linear_blits --run-subtest swap-thrash
       

            Software
======================================
kernel version            : 4.11.0-rc5-drm-tip-ww15-commit-71610c6+
architecture              : x86_64
os version                : Ubuntu 16.10
os codename               : yakkety
kernel driver             : i915
bios revision             : 5.6
bios release date         : 09/06/2016

======================================
        Graphic drivers
======================================
modesetting               : modesetting_drv.so
xorg-xserver              : 1.18.4
libdrm                    : 2.4.76
Aborted (core dumped)
cairo                     : 1.15.5
xserver                   : X.Org X Server 1.19.99.1
intel-gpu-tools (tag)     : intel-gpu-tools-1.18-56-g56741ce
intel-gpu-tools (commit)  : 56741ce

======================================
             Hardware
======================================
platform                  : BDW
motherboard id            : NUC5i5RYB
form factor               : Desktop
cpu family                : Core i5
cpu family id             : 6
cpu information           : Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
gpu card                  : Intel Corporation HD Graphics 6000 (rev 09) (prog-if 00 [VGA controller])
max memory ram            : 16 GB
Invalid MIT-MAGIC-COOKIE-1 keyxdpyinfo:  unable to open display ":0".
cpu thread                : 4
cpu core                  : 2
cpu model                 : 61
cpu stepping              : 4
socket                    : Socket BGA1168
signature                 : Type 0, Family 6, Model 61, Stepping 4
hard drive                : 74GiB (80GB)

======================================
             kernel parameters
======================================
quiet drm.debug=0xe resume=/dev/sda3 fastboot

=====================================
               output 
=====================================

**** DEBUG ****
(gem_render_linear_blits:2245) DEBUG: Test requirement passed: swap_mb > 0
(gem_render_linear_blits:2245) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:2245) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:2245) intel-os-DEBUG: Checking 14,932 surfaces of size 1,048,576 bytes (total 15,664,984,064) against RAM + swap
(gem_render_linear_blits:2245) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:2245) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:2245) intel-os-DEBUG: Test requirement passed: __intel_check_memory(count, size, mode, &required, &total)
(gem_render_linear_blits:2245) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:2245) DEBUG: Test requirement passed: render_copy
(gem_render_linear_blits:2245) INFO: Verifying initialisation - 14932 buffers of 1048576 bytes
(gem_render_linear_blits:2245) ioctl-wrappers-CRITICAL: Test assertion failure function gem_read, file ioctl_wrappers.c:401:
(gem_render_linear_blits:2245) ioctl-wrappers-CRITICAL: Failed assertion: __gem_read(fd, handle, offset, buf, length) == 0
(gem_render_linear_blits:2245) ioctl-wrappers-CRITICAL: Last errno: 12, Cannot allocate memory
(gem_render_linear_blits:2245) ioctl-wrappers-CRITICAL: error: -12 != 0
Comment 1 maria guadalupe 2017-04-12 22:16:10 UTC
Created attachment 130818 [details]
dmesg_HSW.log
Comment 2 Jari Tahvanainen 2017-05-23 10:13:50 UTC
Still timeout with 4.11.0-drm-tip-ww18-commit-fb550f8+ (KBL-2-MS-B1421). Execution ends as incomplete (timeout) so with KBL we are back on bug 91454.
With 4.12.0-rc1-drm-tip-ww20-commit-9b25870+ (BSW-1-BRASWELL) and 4.12.0-rc1-drm-tip-ww20-commit-9b25870+ (BDW-1-NUC5i5MYBE) and 4.11.0-rc8-drm-tip-ww18-commit-7f02755+ (HSW-1-D54250WYK) result is fail, tracked on bug 100667, removing BSW, BDW and HSW from here.
Comment 3 Humberto Israel Perez Rodriguez 2017-06-01 00:12:09 UTC
(In reply to Jari Tahvanainen from comment #2)
> Still timeout with 4.11.0-drm-tip-ww18-commit-fb550f8+ (KBL-2-MS-B1421).
> Execution ends as incomplete (timeout) so with KBL we are back on bug 91454.
> With 4.12.0-rc1-drm-tip-ww20-commit-9b25870+ (BSW-1-BRASWELL) and
> 4.12.0-rc1-drm-tip-ww20-commit-9b25870+ (BDW-1-NUC5i5MYBE) and
> 4.11.0-rc8-drm-tip-ww18-commit-7f02755+ (HSW-1-D54250WYK) result is fail,
> tracked on bug 100667, removing BSW, BDW and HSW from here.

Jari the bug 100667 is the same that this, adding BSW in the title due to the test igt@gem_render_linear_blits@swap-thrash keeps fail

IGT-Version: 1.18-g00ce341 (x86_64) (Linux: 4.12.0-rc3-drm-tip-ww22-commit-4aa1d46+ x86_64)
(gem_render_linear_blits:1390) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1390) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1390) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(gem_render_linear_blits:1390) ioctl-wrappers-DEBUG: Test requirement passed: err == 0
(gem_render_linear_blits:1390) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1390) igt-core-DEBUG: Starting subtest: swap-thrash
(gem_render_linear_blits:1390) DEBUG: Test requirement passed: swap_mb > 0
(gem_render_linear_blits:1390) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1390) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1390) intel-os-DEBUG: Checking 15,766 surfaces of size 1,048,576 bytes (total 16,539,922,432) against RAM + swap
(gem_render_linear_blits:1390) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1390) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1390) intel-os-DEBUG: Test requirement passed: __intel_check_memory(count, size, mode, &required, &total)
(gem_render_linear_blits:1390) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1390) DEBUG: Test requirement passed: render_copy
Verifying initialisation - 15766 buffers of 1048576 bytes
(gem_render_linear_blits:1390) ioctl-wrappers-CRITICAL: Test assertion failure function gem_read, file ioctl_wrappers.c:401:
(gem_render_linear_blits:1390) ioctl-wrappers-CRITICAL: Failed assertion: __gem_read(fd, handle, offset, buf, length) == 0
(gem_render_linear_blits:1390) ioctl-wrappers-CRITICAL: Last errno: 12, Cannot allocate memory
(gem_render_linear_blits:1390) ioctl-wrappers-CRITICAL: error: -12 != 0
Stack trace:
  #0 [__igt_fail_assert+0x101]
  #1 [gem_read+0x91]
  #2 [<unknown>+0x91]
Subtest swap-thrash failed.
**** DEBUG ****
(gem_render_linear_blits:1390) DEBUG: Test requirement passed: swap_mb > 0
(gem_render_linear_blits:1390) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1390) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1390) intel-os-DEBUG: Checking 15,766 surfaces of size 1,048,576 bytes (total 16,539,922,432) against RAM + swap
(gem_render_linear_blits:1390) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1390) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1390) intel-os-DEBUG: Test requirement passed: __intel_check_memory(count, size, mode, &required, &total)
(gem_render_linear_blits:1390) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1390) DEBUG: Test requirement passed: render_copy
(gem_render_linear_blits:1390) INFO: Verifying initialisation - 15766 buffers of 1048576 bytes
(gem_render_linear_blits:1390) ioctl-wrappers-CRITICAL: Test assertion failure function gem_read, file ioctl_wrappers.c:401:
(gem_render_linear_blits:1390) ioctl-wrappers-CRITICAL: Failed assertion: __gem_read(fd, handle, offset, buf, length) == 0
(gem_render_linear_blits:1390) ioctl-wrappers-CRITICAL: Last errno: 12, Cannot allocate memory
(gem_render_linear_blits:1390) ioctl-wrappers-CRITICAL: error: -12 != 0
****  END  ****
Subtest swap-thrash: FAIL (210.259s)
(gem_render_linear_blits:1390) igt-core-DEBUG: Exiting with status code 99
(gem_render_linear_blits:1390) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
Comment 4 Chris Wilson 2017-06-14 10:00:51 UTC
commit eaf41801559a687cc7511c04dc712984765c9dd7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jun 9 12:03:47 2017 +0100

    drm/i915: Remove __GFP_NORETRY from our buffer allocator
Comment 5 Elizabeth 2017-06-16 21:27:19 UTC
In order to be able to close this bug, please test and share results. Thank you.
Comment 6 Humberto Israel Perez Rodriguez 2017-06-27 22:00:43 UTC
with latest commit from drm-tip this test piglit shows as timeout and it was killed by itself if we run it alone, i am wondering if in the latest kernel commits from drm-tip is included the fix ?

kernel commit
=================================================
commit bf26e1dbbba24a7697559f1131d4be99747b7646
Author:     Martin Peres <martin.peres@linux.intel.com>
AuthorDate: Tue Jun 27 16:59:42 2017 +0300
Commit:     Martin Peres <martin.peres@linux.intel.com>
CommitDate: Tue Jun 27 16:59:42 2017 +0300

    drm-tip: 2017y-06m-27d-13h-59m-07s UTC integration manifest


graphic stack
==============================================================
Component: drm
    tag: libdrm-2.4.80-30-gb9549c9
    commit: b9549c954e190010a79e6691983b6ae16eac83d5

Component: cairo
    tag: 1.15.4-28-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.18-299-g8d30021
    commit: 8d300218439724551873b5ab46b270ecc17f290d

Component: piglit
    tag: piglit-v1
    commit: df444e3c93f9ca768978319e28adfd484bd2558b


test output
==============================================================
IGT-Version: 1.19-g8d30021 (x86_64) (Linux: 4.12.0-rc7-drm-tip-ww26-commit-bf26e1d+ x86_64)
(gem_render_linear_blits:1365) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1365) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1365) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(gem_render_linear_blits:1365) ioctl-wrappers-DEBUG: Test requirement passed: err == 0
(gem_render_linear_blits:1365) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1365) igt-core-DEBUG: Starting subtest: swap-thrash
(gem_render_linear_blits:1365) DEBUG: Test requirement passed: swap_mb > 0
(gem_render_linear_blits:1365) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1365) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1365) intel-os-DEBUG: Checking 15,738 surfaces of size 1,048,576 bytes (total 16,510,550,016) against RAM + swap
(gem_render_linear_blits:1365) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1365) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1365) intel-os-DEBUG: Test requirement passed: __intel_check_memory(count, size, mode, &required, &total)
(gem_render_linear_blits:1365) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1365) DEBUG: Test requirement passed: render_copy
Verifying initialisation - 15738 buffers of 1048576 bytes
Killed

real	13m4.900s
user	0m4.557s
sys	4m38.729s


please see the dmesg_HSW_latest_commit.log attached for HSW platform


and with the commit suggested by Chris this test on HSW was killed by itself please check the following output

HSW output with kernel commit eaf41801559a687cc7511c04dc712984765c9dd7
====================================
IGT-Version: 1.19-g8d30021 (x86_64) (Linux: 4.12.0-rc3drm-tip-ww26-commit-eaf4180-bug-100667+ x86_64)
(gem_render_linear_blits:1439) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1439) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1439) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(gem_render_linear_blits:1439) ioctl-wrappers-DEBUG: Test requirement passed: err == 0
(gem_render_linear_blits:1439) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1439) igt-core-DEBUG: Starting subtest: swap-thrash
(gem_render_linear_blits:1439) DEBUG: Test requirement passed: swap_mb > 0
(gem_render_linear_blits:1439) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1439) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1439) intel-os-DEBUG: Checking 15,746 surfaces of size 1,048,576 bytes (total 16,518,942,720) against RAM + swap
(gem_render_linear_blits:1439) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1439) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1439) intel-os-DEBUG: Test requirement passed: __intel_check_memory(count, size, mode, &required, &total)
(gem_render_linear_blits:1439) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1439) DEBUG: Test requirement passed: render_copy
Verifying initialisation - 15746 buffers of 1048576 bytes
Killed

real	35m42.138s
user	0m4.513s
sys	11m44.378s


tested on BSW/GLK/BDW/HSW
Comment 7 Humberto Israel Perez Rodriguez 2017-06-27 22:01:22 UTC
Created attachment 132289 [details]
dmesg_HSW_latest_commit.log
Comment 8 maria guadalupe 2017-08-02 22:14:08 UTC
this test Failed with the following configuration
 
======================================
             Software
======================================
kernel version              : 4.13.0-rc3-drm-tip-ww31-commit-fcb630a+
/bin/bash: gfx-desktop: command not found
architecture                : x86_64
os version                  : Ubuntu 17.04
os codename                 : zesty
kernel driver               : i915
bios revision               : 52.23
ksc                         : 1.36

======================================
        Graphic drivers
======================================
modesetting                 : enabled
modesetting compiled for    : 1.19.3 X.Org Video Driver
xorg-xserver                : 1.19.3
intel-gpu-tools             : 1.17-1

======================================
             Hardware
======================================
platform                   : Geminilake
motherboard model          : Geminilake
motherboard id             : GLKRVP1DDR4(05)
form factor                : Hand Held
manufacturer               : IntelCorp.
cpu family id              : 6
cpu information            : Genuine Intel(R) CPU @ 1.10GHz
gpu card                   : Intel Corporation Device 3184 (rev 01) (prog-if 00 [VGA controller])
memory ram                 : 5.64 GB
max memory ram             : 16 GB
display resolution         : 3840x1080
cpu thread                 : 4
cpu core                   : 4
hard drive                 : 223GiB (240GB)
current cd clock frequency : 316800 kHz
maximum cd clock frequency : 316800 kHz
displays connected         : eDP-1 HDMI-A-2 DP

==================================================
                    Output
==================================================
./gem_render_linear_blits --run-subtest swap-thrash --debug
IGT-Version: 1.19-g6e1ccfa (x86_64) (Linux: 4.13.0-rc3-drm-tip-ww31-commit-fcb630a+ x86_64)
(gem_render_linear_blits:1235) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1235) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1235) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(gem_render_linear_blits:1235) ioctl-wrappers-DEBUG: Test requirement passed: err == 0
(gem_render_linear_blits:1235) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1235) igt-core-DEBUG: Starting subtest: swap-thrash
(gem_render_linear_blits:1235) DEBUG: Test requirement passed: swap_mb > 0
(gem_render_linear_blits:1235) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1235) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1235) intel-os-DEBUG: Checking 9,820 surfaces of size 1,048,576 bytes (total 10,302,046,208) against RAM + swap
(gem_render_linear_blits:1235) drmtest-DEBUG: Test requirement passed: !(fd<0)
(gem_render_linear_blits:1235) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(gem_render_linear_blits:1235) intel-os-DEBUG: Test requirement passed: __intel_check_memory(count, size, mode, &required, &total)
(gem_render_linear_blits:1235) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(gem_render_linear_blits:1235) DEBUG: Test requirement passed: render_copy
Verifying initialisation - 9820 buffers of 1048576 bytes
Killed
Comment 9 Chris Wilson 2017-09-07 19:47:26 UTC
Back to killed as expected. ENOMEM bug gone.


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.