Bug 92227

Summary: [SKL] gem_pwrite_snooped is failing because an test assertion fail
Product: DRI Reporter: Elio <elio.martinez.monroy>
Component: DRM/IntelAssignee: Olivier Berthier <olivierx.berthier>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs, olivierx.berthier, ramix.ben.hassine
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: HSW, SKL i915 features:
Attachments:
Description Flags
Dmesg logs none

Description Elio 2015-10-01 21:36:49 UTC
Created attachment 118580 [details]
Dmesg logs

Test enviroment:
Name: drm-intel-testing

Description: IGT tools manage all basic functions for graphics stack

CPU: Intel(R) CPU @ 1.60GHz

Board: : Wilson Beach DVT2 Ultrabook

GPU: SoC: Broadwell 2+2 D0 (QDF : QGHA)

Kernel 4.3.0-rc8-drm-intel-testing-2015-08-28
Mesa: mesa-10.6.7 from http://cgit.freedesktop.org/mesa/mesa/
Xf86_video_intel: 2.99.917 from
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/
Libdrm: libdrm-2.4.64 from http://cgit.freedesktop.org/mesa/drm/
Cairo: 1.14.2 from http://cgit.freedesktop.org/cairo
libva: libva-1.6.0 from http://cgit.freedesktop.org/libva/
intel-driver: 1.6.1. from http://cgit.freedesktop.org/vaapi/intel-driver
xorg: 1.17.99 installed with script git_xorg.sh
Xserver: xorg-server-1.17.2 from http://cgit.freedesktop.org/xorg/xserver
Intel-gpu-tools: 1.12 from http://cgit.freedesktop.org/xorg/app/intel-gpu

Steps to reproduce:

1. Install intel graphic stack with mentioned configuration
2. Install igt
3. Execute ./run-test.sh gem_pwrite_snooped

Expected result:  Test should pass without issues

Actual result:
Returncode	99
Time	0:00:00.029333
Stdout	
IGT-Version: 1.12-g1f9e055 (x86_64) (Linux: 4.3.0-rc2-drm-intel-nightly+ x86_64)
Stack trace:
  #0 [__igt_fail_assert+0xf1]
  #1 [main+0x306]
  #2 [__libc_start_main+0xf5]
  #3 [_start+0x29]
  #4 [<unknown>+0x29]
FAIL (0.018s)
Stderr	
Test assertion failure function test, file gem_pwrite_snooped.c:125:
Failed assertion: memchr_inv(buf, 0xff, object_size) == NULL
Test gem_pwrite_snooped failed.
**** DEBUG ****
(gem_pwrite_snooped:2537) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
Test requirement passed: fd >= 0
Test requirement passed: ret == 0
Test requirement passed: ret == 0
Test assertion failure function test, file gem_pwrite_snooped.c:125:
Failed assertion: memchr_inv(buf, 0xff, object_size) == NULL
****  END  ****
Comment 1 Olivier Berthier 2015-10-02 13:26:07 UTC
Also reproduced on Sky Lake Y.
Here the dmesg with more details :

[  455.491350] gem_pwrite_snooped: executing
[  455.491692] [drm:drm_stub_open] 
[  455.491704] [drm:drm_open_helper] pid = 2718, minor = 0
[  455.491714] [drm:i915_gem_open] 
[  455.491845] [drm:drm_setup] 
[  455.491861] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, DRM_IOCTL_VERSION
[  455.491868] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.492131] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_CREATE
[  455.492162] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_PWRITE
[  455.492299] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_EXECBUFFER2
[  455.493085] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.493093] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_EXECBUFFER2
[  455.493210] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.493217] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_EXECBUFFER2
[  455.493519] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.493528] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_EXECBUFFER2
[  455.493636] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_WAIT
[  455.493707] [drm:i915_drop_caches_set] Dropping caches: 0x00000004
[  455.493965] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, DRM_IOCTL_GEM_CLOSE
[  455.494015] [drm:drm_stub_open] 
[  455.494021] [drm:drm_open_helper] pid = 2718, minor = 0
[  455.494028] [drm:i915_gem_open] 
[  455.494156] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, DRM_IOCTL_VERSION
[  455.494161] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494188] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_GET_APERTURE
[  455.494207] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494212] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494216] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494221] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494225] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494230] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494234] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494239] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GETPARAM
[  455.494249] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_CREATE
[  455.494317] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_CREATE
[  455.494700] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_SET_DOMAIN
[  455.495132] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_SET_CACHING
[  455.495142] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_PWRITE
[  455.495199] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_SET_CACHING
[  455.495223] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_CREATE
[  455.495310] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_PWRITE
[  455.495335] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_EXECBUFFER2
[  455.495976] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, DRM_IOCTL_GEM_CLOSE
[  455.495990] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_CREATE
[  455.496013] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, DRM_IOCTL_GEM_CLOSE
[  455.496062] [drm:drm_ioctl] pid=2718, dev=0xe200, auth=1, I915_GEM_PREAD
[  455.500078] gem_pwrite_snooped: exiting, ret=99
Comment 2 cprigent 2015-10-14 10:32:45 UTC
Reproduced on BSW:
Hardware:
Platform: Braswell M
CPU : Intel(R) Celeron N3060 1.60GHz @ 1.6 GHz (family: 6, model: 76 stepping: 4)
SoC : BSW D0
QDF : K6XC
CRB : BRASWELL RVP Fab2
Mandatory Reworks : All 
Feature Reworks: F28, F32, F33, F35, F37
Optional reworks : O-01a; O-02, O-03
Software :
Linux distribution: Ubuntu 14.04 LTS 64 bits 
BIOS : BRAS.X64.B084.R00.1508310642
TXE FW : 2.0.0.2073
Ksc : 1.08
kernel 4.3.0-rc3-drm-intel-nightly+ (eb69e51) from git://anongit.freedesktop.org/drm-intel
Mesa - 11.0.2 from http://cgit.freedesktop.org/mesa/mesa/
xf86-video-intel - 2.99.917 from http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/
Libdrm - 2.4.64 from http://cgit.freedesktop.org/mesa/drm/
Libva - 1.6.1 from http://cgit.freedesktop.org/libva/
vaapi intel-driver - 1.6.1 from http://cgit.freedesktop.org/vaapi/intel-driver
Cairo - 1.14.2 from http://cgit.freedesktop.org/cairo
Xorg Xserver - 1.17.2 from http://cgit.freedesktop.org/xorg/xserver
Comment 3 Humberto Israel Perez Rodriguez 2015-10-15 19:00:41 UTC
Reproduced on HSW with the latest configuration:

Configuration :
---------------------------------------------
kernel: 4.3.0-rc4-drm-intel-testing-2015-10-10
xorg-server-1.17.2
libdrm-2.4.65
xf86-video-intel-2.99.917
mesa-11.0.2
libva-1.6.1
intel-driver-1.6.1
cairo-1.14.2
IGT Version : 1.12-g1f9e055
Comment 4 Chris Wilson 2015-10-16 10:05:46 UTC
commit e3ac13e16a4a1311e8e73f242e878d74c2063341
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Oct 16 11:01:42 2015 +0100

    tests/gem_pwrite_snooped: Fix use of GCC pragmas
    
    Apparently GCC treats the #pragma directive as a code block and so we
    returned unconditionally from memchr_inv() on the first byte fubaring
    the test.
    
    commit b04691b3e8e62bd105f0f4d8d3b9e7da187f0c90
    Author: Thomas Wood <thomas.wood@intel.com>
    Date:   Tue Sep 8 11:16:46 2015 +0100
    
        tests/gem_pwrite_snooped: disable const cast warning
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92227
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 5 cprigent 2015-10-20 06:50:35 UTC
Still reproduced on BSW. Let's try again with next setup.

Platform: Braswell M
CPU : Intel(R) Celeron N3060 1.60GHz @ 1.6 GHz (family: 6, model: 76 stepping: 4)
SoC : BSW D0
QDF : K6XC
CRB : BRASWELL RVP Fab2
Mandatory Reworks : All 
Feature Reworks: F28, F32, F33, F35, F37
Optional reworks : O-01a; O-02, O-03

BIOS : BRAS.X64.B084.R00.1508310642
TXE FW : 2.0.0.2073
Ksc : 1.08
Linux distribution: Ubuntu 14.04 LTS 64 bits
kernel 4.3.0-rc5-drm-intel-nightly+ 819f710081d7ea116b9b44a9264061d2c030f009 from git://anongit.freedesktop.org/drm-intel
Mesa - 11.0.3 from http://cgit.freedesktop.org/mesa/mesa/
xf86-video-intel - 2.99.917 from http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/
Libdrm - 2.4.65 from http://cgit.freedesktop.org/mesa/drm/
Libva - 1.6.1 from http://cgit.freedesktop.org/libva/
vaapi intel-driver - 1.6.1 from http://cgit.freedesktop.org/vaapi/intel-driver
Cairo - 1.14.2 from http://cgit.freedesktop.org/cairo
Xorg Xserver - 1.17.2 from http://cgit.freedesktop.org/xorg/xserver

Kernel commit 819f710081d7ea116b9b44a9264061d2c030f009
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Oct 14 19:05:17 2015 +0200
drm-intel-nightly: 2015y-10m-14d-17h-04m-36s UTC integration manifest
Comment 6 Chris Wilson 2015-10-20 08:56:45 UTC
(In reply to cprigent from comment #5)
> Still reproduced on BSW. Let's try again with next setup.

Then you didn't test the right igt.
Comment 7 cprigent 2015-10-20 10:00:32 UTC
Also reproduced on SKL-Y. It will be also tried with next setup.

Platform: SKY LAKE Y A0 
CPU : Intel(R) Core(TM) m5-6Y57 CPU @ 1.10GHz (family: 6, model: 78  stepping: 3)
MCP : SKL-Y  D1 2+2 (ou ULX-D1)
QDF : QJK9 
CPU : SKL D0
Chipset PCH: Sunrise Point LP C1       
CRB : SKY LAKE Y LPDDR3 RVP3 CRB FAB2
Reworks : All Mandatories + FBS02,FBS03, F23, O-02 & O-06
BIOS : SKLSE2R1.R00.X097.B02.1509020030
ME FW : 11.0.0.1173
Ksc (EC FW): 1.19

Linux distribution: Ubuntu 14.04 LTS 64 bits
kernel 4.3.0-rc5-drm-intel-nightly+ 819f710081d7ea116b9b44a9264061d2c030f009 from git://anongit.freedesktop.org/drm-intel
Mesa - 11.0.3 from http://cgit.freedesktop.org/mesa/mesa/
xf86-video-intel - 2.99.917 from http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/
Libdrm - 2.4.65 from http://cgit.freedesktop.org/mesa/drm/
Libva - 1.6.1 from http://cgit.freedesktop.org/libva/
vaapi intel-driver - 1.6.1 from http://cgit.freedesktop.org/vaapi/intel-driver
Cairo - 1.14.2 from http://cgit.freedesktop.org/cairo
Xorg Xserver - 1.17.2 from http://cgit.freedesktop.org/xorg/xserver

Kernel commit 819f710081d7ea116b9b44a9264061d2c030f009
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Oct 14 19:05:17 2015 +0200
drm-intel-nightly: 2015y-10m-14d-17h-04m-36s UTC integration manifest
Comment 8 Chris Wilson 2015-10-28 09:40:38 UTC
*** Bug 92700 has been marked as a duplicate of this bug. ***
Comment 9 cprigent 2015-11-01 13:45:27 UTC
Reproduced on BSW-M and SKL-Y with last setup.

Assigned to Olivier to confirm the IGT version we are using.

Platform: Braswell M
CPU : Intel(R) Celeron N3060 1.60GHz @ 1.6 GHz (family: 6, model: 76 stepping: 4)
SoC : BSW D0
QDF : K6XC
CRB : BRASWELL RVP Fab2
Mandatory Reworks : All 
Feature Reworks: F28, F32, F33, F35, F37
Optional reworks : O-01a; O-02, O-03
Software
BIOS : BRAS.X64.B084.R00.1508310642
TXE FW : 2.0.0.2073
Ksc : 1.08

Platform: SKY LAKE Y A0 
CPU : Intel(R) Core(TM) m5-6Y57 CPU @ 1.10GHz (family: 6, model: 78  stepping: 3)
MCP : SKL-Y  D1 2+2 (ou ULX-D1)
QDF : QJK9 
CPU : SKL D0
Chipset PCH: Sunrise Point LP C1       
CRB : SKY LAKE Y LPDDR3 RVP3 CRB FAB2
Reworks : All Mandatories + FBS02,FBS03, F23, O-02 & O-06
Software
BIOS : SKLSE2R1.R00.X097.B02.1509020030
ME FW : 11.0.0.1173
Ksc (EC FW): 1.19

Linux distribution: Ubuntu 14.04 LTS 64 bits
kernel 4.3.0-rc6-drm-intel-nightly+ (ab48d30) from git://anongit.freedesktop.org/drm-intel
commit ab48d308f2fe5a8ad3d2fd57d313e74995cf1c20
Author: Daniel Vetter <daniel.vetter@ffwll.ch> 
Date: Fri Oct 23 12:03:04 2015 +0200 drm-intel-nightly: 2015y-10m-23d-10h-02m-25s UTC integration manifest
Mesa 11.0.4 from http://cgit.freedesktop.org/mesa/mesa/
xf86-video-intel - 2.99.917 from http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/
Libdrm - 2.4.65 from http://cgit.freedesktop.org/mesa/drm/
Libva - 1.6.1 from http://cgit.freedesktop.org/libva/
vaapi intel-driver - 1.6.1 from http://cgit.freedesktop.org/vaapi/intel-driver
Cairo - 1.14.2 from http://cgit.freedesktop.org/cairo
Xorg Xserver - 1.17.2 from http://cgit.freedesktop.org/xorg/xserver
Comment 10 Olivier Berthier 2015-11-19 15:22:59 UTC
Reproduced on Sky Lake Y with the kernel 4.3.0-rc5 drm-intel-next-fixes-2015-11-06.

Setup:
------

Hardware
Platform: SKY LAKE Y A0 
CPU : Intel(R) Core(TM) m5-6Y57 CPU @ 1.10GHz (family: 6, model: 78  stepping: 3)
MCP : SKL-Y  D0 2+2 (ou ULX-D1)
QDF : QJA4 
CPU : SKL D0
Chipset PCH: Sunrise Point LP C1       
CRB : SKY LAKE Y LPDDR3 RVP3 CRB FAB2
Reworks : All Mandatories

Software
BIOS : SKLSE2R1.R00.B104.B01.1511110114
ME FW : 11.0.0.1191
Ksc (EC FW): 1.19
Linux : Ubuntu 15.04 64 bits
Kernel : 4.3.0-rc5 drm-intel-next-fixes-2015-11-06
commit 816d2206f0f9953ca854e4ff1a2749a5cbd62715
Merge: d0baf92 1b0e3a0
Author: Dave Airlie <airlied@gmail.com>
Date:   Sat Nov 7 17:16:59 2015 +1000

    Merge tag 'drm-intel-next-fixes-2015-11-06' of git://anongit.freedesktop.org/drm-in
 

cairo: 1.14.2
drm: 2.4.65
vaapi/intel-driver: 1.6.1
vaapi/libva: 1.6.1
mesa: mesa-11.0.5
xf86-video-intel: 2.99.917
xserver:  xorg-server-1.17.2

Intel GPU Tools: master bfea74a9f64a900bcb90f946b38746781017449f
Comment 11 Chris Wilson 2015-11-20 10:13:15 UTC
I repeat,

commit e3ac13e16a4a1311e8e73f242e878d74c2063341
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Oct 16 11:01:42 2015 +0100

    tests/gem_pwrite_snooped: Fix use of GCC pragmas

so testing on igt older than that is pointless.
Comment 12 Rami 2015-11-20 11:32:19 UTC
Not reproduced on BSW with last setup:
Hardware:
Platform: Braswell M 
CPU : Intel(R) Celeron N3060 1.60GHz @ 1.6 GHz (family: 6, model: 76 stepping: 4)
SoC : BSW C0
QDF : K6XC
CRB : BRASWELL RVP Fab2
Mandatory Reworks : All Feature Reworks: F28, F32, F33, F35, F37
Optional reworks : O-01a; O-02, O-03 

Software:
Linux distribution: Ubuntu 15.04 LTS 64 bits 
BIOS : BRAS.X64.B084.R00.1508310642
TXE FW : 2.0.0.2073
Ksc : 1.08
kernel  drm-intel-nightly: 2015y-11m-12d-15h-35m-53s UTC integration manifest
commit 4c2531304c0a2f36f6b2cce2add5b5b2bd3fd893
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Thu Nov 12 17:36:12 2015 +0200
cairo: (HEAD, tag: 1.14.2) 93422b3cb5e0ef8104b8194c8873124ce2f5ea2d from git://git.freedesktop.org/git/cairo
drm: (HEAD, tag: libdrm-2.4.65, tag: 2.4.65) c3496167637e35cf8a52d5e7e53a412e79d80db0 from git://git.freedesktop.org/git/mesa/drm
intel-driver: (HEAD, tag: 1.6.1, origin/v1.6-branch) 35858c69166b845c59ca32e19a3dbb0b758df209 from git://git.freedesktop.org/git/vaapi/intel-driver
libva: (HEAD, tag: libva-1.6.1, origin/v1.6-branch) 613eb962b45fbbd1526d751e88e0d8897af6c0e0 from git://git.freedesktop.org/git/vaapi/libva
mesa: (HEAD, tag: mesa-11.0.5) ee57c22141c42d9b511a7dfa5971c4428cd1c6e7 from git://git.freedesktop.org/git/mesa/mesa
xf86-video-intel: (HEAD, tag: 2.99.917) baec802b21387d04aebb10ac29e719a1800c5aa0 from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
xserver: (HEAD, tag: xorg-server-1.17.2) 2123f7682d522619f101b05fb75efa75dabbe371 from git://git.freedesktop.org/git/xorg/xserver

* Tools *
intel-gpu-tools: (HEAD, origin/master, origin/HEAD, master) b718f50f92cf7ed825c90ff54940cb155d110a2c from git://git.freedesktop.org/git/xorg/app/intel-gpu-tools
Comment 13 Humberto Israel Perez Rodriguez 2016-01-07 17:15:23 UTC
The following tests pass in BDW with the next configuration :

./gem_pwrite_snooped

kernel drm-intel-testing:

commit 91587c722c28c4116dedbfbf08aa874377bc76f8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Dec 4 17:35:54 2015 +0100

    drm-intel-nightly: 2015y-12m-04d-16h-35m-07s UTC integration manifest


kernel version : 4.4.0-rc3
git url        : git://anongit.freedesktop.org/drm-intel
git branch     : drm-intel-testing
git describe   : drm-intel-next-2015-11-20-rebased-13721-g91587c7

igt tools :
branch : intel-gpu-tools-1.13
commit : 2db78a4995a8ee298ae0cd68879baf80407a0e5e

cairo version: 1.15.2 / commit :  db8a7f1 
drm version :  libdrm-2.4.66  / commit : b38a4b2 
intel-driver : 1.6.2 / commit: 683edee
libva version : libva-1.6.2 / commit : 304bc13
mesa version : mesa-11.0.8 / commit : 261daab 
xf86-video-intel version : 2.99.917  / commit : baec802 
xserver version :xorg-server-1.18.0 / commit :7921764
Comment 14 cprigent 2016-02-22 16:08:42 UTC
So closed

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.