Bug 97172

Summary: [KBL] [IGT Basic] kms_psr_sink_crc/psr_basic produces a Segmentation fault (core dumped)
Product: DRI Reporter: Luis Botello <luis.botello.ortega>
Component: DRM/IntelAssignee: Rodrigo Vivi <rodrigo.vivi>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: blocker    
Priority: highest CC: intel-gfx-bugs
Version: XOrg git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: KBL i915 features: display/Other
Attachments:
Description Flags
dmesg.log
none
[PATCH] tests/kms_psr_sink_crc: commit before querying mode
none
Revert what blocks PSR
none
kbl-4.8rc5-kms_psr_sink__crc_psr_basic-output
none
kbl-4.8rc5-kms_psr_sink__crc_psr_basic-kern.log
none
kbl-4.8rc5-with-patch-126178-kms_psr_sink__crc_psr_basic-kern.log none

Description Luis Botello 2016-08-01 19:09:07 UTC
Created attachment 125468 [details]
dmesg.log

Details
===============================
kms_psr_sink_crc subtest psr_basic produces a Segmentation fault (core dumped)

Steps:
=================================
#./kms_psr_sink_crc --run-subtest psr_basic --debug

HW configuration
==================================
Hardware
Platform: KABY LAKE-U
CPU : Intel(R) Core(TM) @ 2.60GHz
MCP : KBL-U G0 2+2
QDF : QYQ8
Chipset PCH: SPT-LP C1
CRB : KABY LAKE U DDR3L RVP7 CRB FAB1

Software configuration
============================================
Linux distribution: Ubuntu 16.04 64 bits
Kernel: 4.7.0 6f87e85 from http://cgit.freedesktop.org/drm-intel/
   commit 6f87e85fa302ffdb4cb9f4cd712691165923c7a2
 Author: Chris Wilson <chris@chris-wilson.co.uk>
  Date:   Mon Aug 1 15:53:41 2016 +0100
  drm-intel-nightly: 2016y-08m-01d-14h-53m-17s UTC integration manifest
drm: libdrm-2.4.70 f19cd3a from git://anongit.freedesktop.org/mesa/drm
mesa: mesa-11.2.2 3a9f628from git://anongit.freedesktop.org/mesa/mesa
cairo: 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
xserver: xorg-server-1.18.0-502 c833c08 from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel: 2.99.917-688 49daf5d from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
libva: libva-1.7.0-40 f7e2263 from git://git.freedesktop.org/git/vaapi/libva
vaapi-intel-driver: 1.7.0-64 1cd6795 from git://git.freedesktop.org/git/vaapi/intel-driverGuC 9.14 from http://rdvivi-hillsboro.jf.intel.com/firmware/kbl_guc_ver9_14.tar.bz2 
DMC 1.01 from: https://01.org/linuxgraphics/downloads/kabylake-dmc-1.01 
Intel-Gpu-Tools 1.15-188 53b4dfdfrom http://anongit.freedesktop.org/git/xorg/app/intel-gpu-tools.git


Script output
=================================
IGT-Version: 1.15-g53b4dfd (x86_64) (Linux: 4.7.0-nightly x86_64)
(kms_psr_sink_crc:1303) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(kms_psr_sink_crc:1303) drmtest-DEBUG: Test requirement passed: !(fd<0)
(kms_psr_sink_crc:1303) drmtest-DEBUG: Test requirement passed: drmSetMaster(fd) == 0
(kms_psr_sink_crc:1303) igt-kms-DEBUG: VT: graphics mode set (mode was 0x0)
(kms_psr_sink_crc:1303) DEBUG: Test requirement passed: !(!psr_possible(&data))
(kms_psr_sink_crc:1303) igt-kms-DEBUG: display: init {
(kms_psr_sink_crc:1303) igt-kms-DEBUG: display: }
(kms_psr_sink_crc:1303) igt-kms-DEBUG: display: eDP-1: set_pipe(A)
Received signal SIGSEGV.
(kms_psr_sink_crc:1303) igt-kms-DEBUG: VT: original mode 0x0 restored
Segmentation fault (core dumped)

Attachments
=================================
dmesg.log
Comment 1 yann 2016-08-02 07:18:40 UTC
Updating priority/severity: IGT Basic Failure
Comment 2 Mika Kuoppala 2016-08-11 09:08:35 UTC
Created attachment 125697 [details] [review]
[PATCH] tests/kms_psr_sink_crc: commit before querying mode
Comment 3 Humberto Israel Perez Rodriguez 2016-08-30 19:47:50 UTC
(In reply to Mika Kuoppala from comment #2)
> Created attachment 125697 [details] [review] [review]
> [PATCH] tests/kms_psr_sink_crc: commit before querying mode

still fail with the patch


./kms_psr_sink_crc --run-subtest psr_basic --debug
_______________________________________________________
IGT-Version: 1.15-gdb97b69 (x86_64) (Linux: 4.8.0-rc4-nightly+ x86_64)
(kms_psr_sink_crc:27848) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: !(fd<0)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: drmSetMaster(fd) == 0
(kms_psr_sink_crc:27848) igt-kms-DEBUG: VT: graphics mode set (mode was 0x0)
(kms_psr_sink_crc:27848) DEBUG: Test requirement passed: !(!psr_possible(&data))
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: init {
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: }
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: eDP-1: set_pipe(A)
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: commit {
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     eDP-1: Selecting pipe A
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetCrtc pipe A, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetPlane pipe A, plane 1, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetCursor pipe A, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetCrtc pipe B, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetPlane pipe B, plane 1, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetCursor pipe B, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetCrtc pipe C, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetPlane pipe C, plane 1, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetCursor pipe C, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: }
(kms_psr_sink_crc:27848) igt-core-DEBUG: Starting subtest: psr_basic
(kms_psr_sink_crc:27848) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=3200, height=1800, format=0x34325258, tiling=0x100000000000001, size=0)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(kms_psr_sink_crc:27848) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=1, pitch=12800)
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: A.0: plane_set_fb(0)
(kms_psr_sink_crc:27848) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=3200, height=1800, format=0x34325258, tiling=0x100000000000001, size=0)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(kms_psr_sink_crc:27848) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=2, pitch=12800)
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: commit {
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     eDP-1: Selecting pipe A
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetCrtc pipe A, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: }
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: A.0: plane_set_fb(58)
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: commit {
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     eDP-1: Selecting pipe A
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     eDP-1: SetCrtc pipe A, fb 58, src (0, 0), mode 3200x1800
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: }
(kms_psr_sink_crc:27848) CRITICAL: Test assertion failure function main, file kms_psr_sink_crc.c:541:
(kms_psr_sink_crc:27848) CRITICAL: Failed assertion: wait_psr_entry(&data)
Stack trace:
  #0 [__igt_fail_assert+0x101]
  #1 [main+0x682]
  #2 [__libc_start_main+0xf0]
  #3 [_start+0x29]
  #4 [<unknown>+0x29]
Subtest psr_basic failed.
**** DEBUG ****
(kms_psr_sink_crc:27848) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=3200, height=1800, format=0x34325258, tiling=0x100000000000001, size=0)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(kms_psr_sink_crc:27848) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=1, pitch=12800)
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: A.0: plane_set_fb(0)
(kms_psr_sink_crc:27848) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=3200, height=1800, format=0x34325258, tiling=0x100000000000001, size=0)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(kms_psr_sink_crc:27848) drmtest-DEBUG: Test requirement passed: is_i915_device(fd) && has_known_intel_chipset(fd)
(kms_psr_sink_crc:27848) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=2, pitch=12800)
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: commit {
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     eDP-1: Selecting pipe A
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     SetCrtc pipe A, disabling
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: }
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: A.0: plane_set_fb(58)
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: commit {
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     eDP-1: Selecting pipe A
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display:     eDP-1: SetCrtc pipe A, fb 58, src (0, 0), mode 3200x1800
(kms_psr_sink_crc:27848) igt-kms-DEBUG: display: }
(kms_psr_sink_crc:27848) CRITICAL: Test assertion failure function main, file kms_psr_sink_crc.c:541:
(kms_psr_sink_crc:27848) CRITICAL: Failed assertion: wait_psr_entry(&data)
****  END  ****
Subtest psr_basic: FAIL (5.275s)
(kms_psr_sink_crc:27848) igt-core-DEBUG: Exiting with status code 99
(kms_psr_sink_crc:27848) igt-kms-DEBUG: VT: original mode 0x0 restored

real    0m5.868s
user    0m0.000s
sys     0m0.074s


Gfx Stack
=======================================================
Component         : drm
	tag       : libdrm-2.4.70-2-gb214b05
	commit    : b214b05ccd433c484a6a65e491a1a51b19e4811d 

Component         : cairo
	tag       : 1.15.2
	commit    : db8a7f1697c49ae4942d2aa49eed52dd73dd9c7a 



IGT commit:
==============================================

commit db97b69c5c134be35177c8d1fd502ca90d5f304a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Aug 30 14:35:36 2016 +0100

    prime_vgem: Fix fence flipping

    On the move to doing front/back flips, I managed to completely break the
    test by forgetting to pass the fence to be signaled.

    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Kernel
=======================================================
commit f4f46e5544894b2198cdfd5a226ee587d9834cc4
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Aug 29 16:09:42 2016 +0200

    drm-intel-nightly: 2016y-08m-29d-14h-09m-23s UTC integration manifest
Comment 4 Rodrigo Vivi 2016-09-02 15:59:46 UTC
Created attachment 126178 [details] [review]
Revert what blocks PSR

I believe there is a confusion here or at least 2 bugs.
I don't see the segmentation fault in the last log.
Is the segmentation fault happening always or sporadic?
Does Mika patch helps with the segmentation fault?

However even with Mika patch this test will fail anyway because it is blocked by a restriction that I don't believe it is correct. So please use the revert patch attached and then try to reproduce the segmentation fault again. In that case check if Mika patch helps with segmentation fault.

Thanks,
Rodrigo.
Comment 5 cprigent 2016-09-05 16:55:29 UTC
Assigned to me to check
Comment 6 cprigent 2016-09-13 11:03:18 UTC
Created attachment 126479 [details]
kbl-4.8rc5-kms_psr_sink__crc_psr_basic-output

(In reply to Rodrigo Vivi from comment #4)
> Is the segmentation fault happening always or sporadic?
Tested 10 times, it is 100% reproduced with:

Platform: KABY LAKE-U
Processor : Genuine Intel(R) CPU 0000 @ 1.80GHz (cpu family: 6, model: 142, stepping: 9)
MCP : KBL-U J0 2+3e
QDF : QL9J
PCH: PCH-LP C1
CRB : KABY LAKE U DDR3L RVP7
Rework: O-16

Software
BIOS: 45.1 3KBLSE2R1.R00.X045.P01.1606291634 from https://ubit-artifactory-ba.intel.com/artifactory/owr-repos/Submissions/ifwi/KBL_ORANGE_IFWI_2016_WW27_3_03_SR'17/
ME FW: 11.6.0.1065
EC FW: 1.24
KSC: 1.24
Linux distribution: Ubuntu 16.04 64 bits
Kernel: 4.8.0-rc5 bef9c1f from http://cgit.freedesktop.org/drm-intel/
  commit bef9c1f4afe24cfff578d386bde349add65673eb
  Author: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
  Date:   Mon Sep 12 11:35:34 2016 +0300
  drm-intel-nightly: 2016y-09m-12d-08h-35m-02s UTC integration manifest
libdrm-2.4.70-12 2d00869 from git://anongit.freedesktop.org/mesa/drm
mesa: mesa-11.2.2 3a9f628 from git://anongit.freedesktop.org/mesa/mesa
cairo 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
xorg-server-1.18.0-549 527c6ba from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel 2.99.917-703 15c5ff1 from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
libva-1.7.0-47 2ebf897 from git://git.freedesktop.org/git/vaapi/libva 
vaapi-intel-driver: 1.7.0-117 8c11f51 from git://git.freedesktop.org/git/vaapi/intel-driver
Intel-Gpu-Tools 1.16 f565b6c from http://anongit.freedesktop.org/git/xorg/app/intel-gpu-tools.git

External screen: DP: ASUS PB238Q

> Does Mika patch helps with the segmentation fault?
> 
> However even with Mika patch this test will fail anyway because it is
> blocked by a restriction that I don't believe it is correct. So please use
> the revert patch attached and then try to reproduce the segmentation fault
> again. In that case check if Mika patch helps with segmentation fault.

I applied the patch, I still reproduce the segmentation fault.
Same DUT with:
Kernel: 4.8.0-rc5 bef9c1f from http://cgit.freedesktop.org/drm-intel/
  commit 483a616213651ee738b0745f8bcfe4b0154b307a
  Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
  Date:   Mon Sep 12 22:08:14 2016 -0700
  drm-intel-nightly: 2016y-09m-13d-05h-07m-55s UTC integration manifest
  with https://bugs.freedesktop.org/attachment.cgi?id=126178 applied
Comment 7 cprigent 2016-09-13 11:06:59 UTC
Created attachment 126480 [details]
kbl-4.8rc5-kms_psr_sink__crc_psr_basic-kern.log
Comment 8 cprigent 2016-09-13 11:08:42 UTC
Created attachment 126481 [details]
kbl-4.8rc5-with-patch-126178-kms_psr_sink__crc_psr_basic-kern.log
Comment 9 Rodrigo Vivi 2016-09-20 00:25:26 UTC
I'm afraid you forgot to apply Mika's patch to intel-gpu-tools as requested.

So I tested it here and already merged Mika's patch.
So if you test kernel with this revert and latest igt you won't see the seg fault anymore.

So closing this bug. Reopen if you still see any segmentation fault with head of igt.
Comment 10 yann 2016-09-20 07:24:34 UTC
As reference, there is another patch submitted by Rodrigo for kms_psr_sink_crc igt test (Commit to a mode before querying it):
https://lists.freedesktop.org/archives/intel-gfx/2016-September/106824.html
Comment 11 Marius Vlad 2016-09-20 15:00:35 UTC
Mika's patch was merged into master, but just for reference Maarten 
added an alternative: 

https://lists.freedesktop.org/archives/intel-gfx/2016-September/106884.html.

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.