Bug 101847 - [CI] kms_atomic_transition subsets plane-use-after-nonblocking-unbind(-fencing) fail
Summary: [CI] kms_atomic_transition subsets plane-use-after-nonblocking-unbind(-fencin...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high critical
Assignee: Maarten Lankhorst
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
: 102333 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-19 19:13 UTC by Armando Antonio
Modified: 2017-10-04 17:06 UTC (History)
3 users (show)

See Also:
i915 platform: ALL
i915 features: display/atomic


Attachments
kernel log (4.89 MB, text/plain)
2017-07-19 19:13 UTC, Armando Antonio
no flags Details
dmesg log (48.06 KB, text/plain)
2017-07-19 19:14 UTC, Armando Antonio
no flags Details
output (36.89 KB, text/plain)
2017-07-19 19:14 UTC, Armando Antonio
no flags Details
Tests Log (IVB) (34.07 KB, text/plain)
2017-07-25 14:45 UTC, Hector Velazquez
no flags Details
Dmesg.log (IVB) (148.75 KB, text/plain)
2017-07-25 14:46 UTC, Hector Velazquez
no flags Details

Description Armando Antonio 2017-07-19 19:13:48 UTC
Created attachment 132774 [details]
kernel log

The following test fail on KBL with latest configuration


====================================================
Test list
====================================================
igt@kms_atomic_transition@plane-use-after-nonblocking-unbind


=====================================================
Graphics stack
====================================================
Component: drm
    tag: libdrm-2.4.81-31-g23e234a
    commit: 23e234a3503f51b9d9c585123d33b936f522808d
Component: cairo
    tag: 1.15.6-2-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51
Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-96-gfb1ddc4
    commit: fb1ddc47003ad6a683db79beeb81b6cbab1feb7c
======================================
             Software
======================================
kernel version              : 4.13.0-rc1-drm-tip-ww29-commit-f1c32d6+
/bin/bash: gfx-desktop: command not found
architecture                : x86_64
os version                  : Ubuntu 16.10
os codename                 : yakkety
kernel driver               : i915
bios revision               : 5.12
bios release date           : 09/12/2016
hardware acceleration       : disabled
swap partition              : enabled on (/dev/sda3)

======================================
        Graphic drivers
======================================
modesetting                 : enabled
modesetting compiled for    : 1.18.4 X.Org Video Driver
xorg-xserver                : 1.18.4
libdrm                      : 2.4.82
cairo                       : 1.15.7
intel-gpu-tools (tag)       : intel-gpu-tools-1.19-96-gfb1ddc4
intel-gpu-tools (commit)    : fb1ddc4

======================================
             Hardware
======================================
platform                   : Kabylake-Nuc
motherboard model          : MS-B142
motherboard id             : MS-B1421
form factor                : Desktop
manufacturer               : Micro-StarInternationalCo.,Ltd.
cpu family                 : Core i7
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
gpu card                   : Intel Corporation Device 5916 (rev 02) (prog-if 00 [VGA controller])
memory ram                 : 15.51 GB
max memory ram             : 64 GB
cpu thread                 : 4
cpu core                   : 2
cpu model                  : 142
cpu stepping               : 9
socket                     : Other
signature                  : Type 0, Family 6, Model 142, Stepping 9
hard drive                 : 111GiB (120GB)
current cd clock frequency : 337500 kHz
maximum cd clock frequency : 675000 kHz

displays connected         : DP-1
Comment 1 Armando Antonio 2017-07-19 19:14:08 UTC
Created attachment 132775 [details]
dmesg log
Comment 2 Armando Antonio 2017-07-19 19:14:43 UTC
Created attachment 132776 [details]
output
Comment 3 Ricardo Madrigal 2017-07-20 18:47:49 UTC
The following tests fail on BYT with latest configuration

====================================================
Test list
====================================================
igt@kms_atomic_transition@plane-use-after-nonblocking-unbind

====================================================
Graphic Stack
====================================================
Component: drm
     tag: libdrm-2.4.81-31-g23e234a
     commit: 23e234a3503f51b9d9c585123d33b936f522808d
Component: cairo
    tag: 1.15.6-2-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51
Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-96-gfb1ddc4
    commit: fb1ddc47003ad6a683db79beeb81b6cbab1feb7c
Component: piglit
    tag: piglit-v1
    commit: 56e7e5583cd4a3ca15a8cda154d46d168959dd25

======================================
             Hardware
======================================
motherboard model          : .................................
motherboard id             : DN2820FYK
form factor                : Desktop
manufacturer               : .................................
cpu family                 : Celeron
cpu family id              : 6
cpu information            : Intel(R) Celeron(R) CPU  N2830  @ 2.16GHz
gpu card                   : Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display (rev 0e) (prog-if 00 [VGA controller])
memory ram                 : 7.66 GB
max memory ram             : 8 GB
cpu thread                 : 2
cpu core                   : 2
cpu model                  : 55
cpu stepping               : 8
socket                     : <OUT OF SPEC>
signature                  : Type 0, Family 6, Model 55, Stepping 8
hard drive                 : 111GiB (120GB)
current cd clock frequency : 266667 kHz
maximum cd clock frequency : 400000 kHz
displays connected         : HDMI-A-1
Comment 4 Elizabeth 2017-07-21 16:12:59 UTC
Adding tag into "Whiteboard" field - ReadyForDev
*Status is correct
*Platform is included
*Feature is included
*Priority and Severity correctly set
*Logs included
Comment 5 Hector Velazquez 2017-07-25 14:45:13 UTC
Created attachment 132958 [details]
Tests Log (IVB)
Comment 6 Hector Velazquez 2017-07-25 14:45:35 UTC
The following test fail on IVB with latest configuration

Tests List:

igt@kms_atomic_transition@plane-use-after-nonblocking-unbind


This is my configuration:

====================================================
Graphic Stack
====================================================
Component: drm
    tag: libdrm-2.4.81-33-g3876bc2
    commit: 3876bc246a07070a6043159cd7623d4def9bbd4c

Component: cairo
    tag: 1.15.6-2-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-112-g493151b
    commit: 493151b0768aa4ca535cef49cb7efa174a9c3a77

Component: piglit
    tag: piglit-v1
    commit: 973892687cf5c2f8e2dbe1d22998b82736643787


======================================
             Hardware
======================================
platform                   : Ivy Bridge
motherboard model          : HPEliteBookRevolve810G1
motherboard id             : 18F8
form factor                : Notebook
manufacturer               : Hewlett-Packard
cpu family                 : Core i5
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i5-3437U CPU @ 1.90GHz
gpu card                   : Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
memory ram                 : 3.7 GB
max memory ram             : 16 GB
cpu thread                 : 4
cpu core                   : 2
cpu model                  : 58
cpu stepping               : 9
socket                     : Other
signature                  : Type 0, Family 6, Model 58, Stepping 9
hard drive                 : 119GiB (128GB)
current cd clock frequency : 400000 kHz
maximum cd clock frequency : 400000 kHz
displays connected         : LVDS-1 DP-3
Comment 7 Hector Velazquez 2017-07-25 14:46:05 UTC
Created attachment 132959 [details]
Dmesg.log (IVB)
Comment 8 Armando Antonio 2017-07-25 19:57:20 UTC
The following test fail on BDW with latest configuration

====================================================
Test list
====================================================
igt@kms_atomic_transition@plane-use-after-nonblocking-unbind


====================================================
Graphic Stack
====================================================
Component: drm
    tag: libdrm-2.4.81-33-g3876bc2
    commit: 3876bc246a07070a6043159cd7623d4def9bbd4c

Component: cairo
    tag: 1.15.6-2-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-112-g493151b
    commit: 493151b0768aa4ca535cef49cb7efa174a9c3a77

Component: piglit
    tag: piglit-v1
    commit: 973892687cf5c2f8e2dbe1d22998b82736643787

======================================
             Software
======================================
kernel version              : 4.13.0-rc1-drm-tip-ww30-commit-2a4f730+
/bin/bash: BDW-2-NUC5i7RYB: command not found
architecture                : x86_64
os version                  : Ubuntu 16.10
os codename                 : yakkety
kernel driver               : i915
bios revision               : 5.6
bios release date           : 05/29/2015
hardware acceleration       : disabled
swap partition              : enabled on (/dev/sda3)

======================================
        Graphic drivers
======================================
modesetting                 : enabled
modesetting compiled for    : 1.18.4 X.Org Video Driver
xorg-xserver                : 1.18.4
libdrm                      : 2.4.82
cairo                       : 1.15.7
intel-gpu-tools (tag)       : intel-gpu-tools-1.19-116-g76bce77
intel-gpu-tools (commit)    : 76bce77

======================================
             Hardware
======================================
platform                   : Broadwell
motherboard id             : NUC5i7RYB
form factor                : Desktop
cpu family                 : Core i7
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
gpu card                   : Intel Corporation Iris Graphics 6100 (rev 09) (prog-if 00 [VGA controller])
memory ram                 : 7.71 GB
max memory ram             : 16 GB
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                 : 447GiB (480GB)
current cd clock frequency : 337500 kHz
maximum cd clock frequency : 540000 kHz
displays connected         : HDMI-A-1 DP-1
Comment 9 Hector Velazquez 2017-07-28 21:23:37 UTC
The following tests FAIL on BSW with this configuration

Tests List:

igt@kms_atomic_transition@plane-use-after-nonblocking-unbind



This is my configuration:

====================================================
Graphic Stack
====================================================
Component: drm
    tag: libdrm-2.4.81-33-g3876bc2
    commit: 3876bc246a07070a6043159cd7623d4def9bbd4c
	
Component: cairo
    tag: 1.15.6-2-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-125-gf145475
    commit: f145475173b6d28e550dde27cc361cfb517cbbc3

Component: piglit
    tag: piglit-v1
    commit: 3ff4501e5b8c3f44dfb284edb60b4db7b71ed290



**************************************************************
* * * * * * * * SPECIFICATIONS * * * * * * * * * * * 
**************************************************************

======================================
             Software
======================================
kernel version              : 4.13.0-rc2-drm-tip-ww30-commit-1eb8669+
/bin/bash: BSW-1-BRASWELL: command not found
architecture                : x86_64
os version                  : Ubuntu 16.10
os codename                 : yakkety
kernel driver               : i915
bios revision               : 0.33
bios release date           : 08/12/2015
ksc                         : 0.16
hardware acceleration       : disabled
swap partition              : enabled on (/dev/sda3)

======================================
        Graphic drivers
======================================
modesetting                 : enabled
modesetting compiled for    : 1.18.4 X.Org Video Driver
xorg-xserver                : 1.18.4
libdrm                      : 2.4.82
cairo                       : 1.15.7
intel-gpu-tools (tag)       : intel-gpu-tools-1.19-125-gf145475
intel-gpu-tools (commit)    : f145475

======================================
             Hardware
======================================
platform                   : Braswell
motherboard model          : 10G9000NUS
motherboard id             : BRASWELL
form factor                : Desktop
manufacturer               : LENOVO
cpu family                 : Pentium
cpu family id              : 6
cpu information            : Intel(R) Pentium(R) CPU  N3700  @ 1.60GHz
gpu card                   : Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21) (prog-if 00 [VGA controller])
memory ram                 : 7.68 GB
max memory ram             : 8 GB
cpu thread                 : 4
cpu core                   : 4
cpu model                  : 76
cpu stepping               : 3
socket                     : Socket BGA1155
signature                  : Type 0, Family 6, Model 76, Stepping 3
hard drive                 : 74GiB (80GB)
current cd clock frequency : 266667 kHz
maximum cd clock frequency : 320000 kHz
displays connected         : DP-1 DP-3

======================================
             Firmware
======================================

======================================
             kernel parameters
======================================
quiet drm.debug=0x1e resume=/dev/sda3 fastboot
Comment 10 Marta Löfstedt 2017-08-03 07:55:25 UTC
Note, this test was recently added to IGT git@33fd63f5067d0850
Maybe it has never passed on affected platforms.
Comment 11 Marta Löfstedt 2017-08-03 08:43:02 UTC
<mlankhorst> marta_: it's explicitly meant to fail
<mlankhorst> kernel issue
Comment 12 Maarten Lankhorst 2017-08-03 09:53:56 UTC
When doing a nonblocking plane disable, followed by another update to that plane the last update doesn't wait for the former, causing a potential use-after-free.

The real fix has to be in the kernel..
Comment 13 Martin Peres 2017-08-16 10:02:56 UTC
Adding the [CI] tag and bumping the priority because it affects CI.
Comment 14 Martin Peres 2017-08-16 13:36:16 UTC
Also seen on igt@kms_atomic_transition@plane-use-after-nonblocking-unbind-fencing, recommended by Marteen to re-use the same bug report.

Full logs: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_2968/shard-hsw5/igt@kms_atomic_transition@plane-use-after-nonblocking-unbind-fencing.html
Comment 15 Chris Wilson 2017-08-21 12:10:29 UTC
*** Bug 102333 has been marked as a duplicate of this bug. ***
Comment 17 Maarten Lankhorst 2017-08-29 14:03:59 UTC
After various tries I finally came up with a sort-of clean solution..

https://patchwork.freedesktop.org/series/29476/
Comment 18 Jari Tahvanainen 2017-08-30 11:14:32 UTC
[Tested-by/SKL]: The patch series seem to improve situation (FAIL -> SUCCESS) on dev-skl-i5-6600k
	drm-tip: 2017y-08m-30d-08h-12m-34s UTC integration manifest
		Subtest plane-use-after-nonblocking-unbind: FAIL (0,087s)
	git am "https://patchwork.freedesktop.org/series/29476/".mbox
		Subtest plane-use-after-nonblocking-unbind: SUCCESS (0,643s) like it did on shards-HSW. Review ongoing on series.
Comment 19 Marta Löfstedt 2017-09-04 09:20:49 UTC
FYI

The result of igt@kms_atomic_transition@plane-use-after-nonblocking-unbind

changed from failed to incomplete from:

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3025/shard-hsw2/igt@kms_atomic_transition@plane-use-after-nonblocking-unbind.html
Comment 20 Marta Löfstedt 2017-09-04 09:58:30 UTC
(In reply to Marta Löfstedt from comment #19)
> FYI
> 
> The result of igt@kms_atomic_transition@plane-use-after-nonblocking-unbind
> 
> changed from failed to incomplete from:
> 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3025/shard-hsw2/
> igt@kms_atomic_transition@plane-use-after-nonblocking-unbind.html

cibuglog doesn't currently detect these changes from failed -> incomplete. Hence, the developer will not notice that a patch-set caused this "regression".
Comment 21 Maarten Lankhorst 2017-09-10 16:13:37 UTC
commit 21a01abbe32a3cbeb903378a24e504bfd9fe0648
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Mon Sep 4 12:48:37 2017 +0200

    drm/atomic: Fix freeing connector/plane state too early by tracking commits, v3.
Comment 22 Elizabeth 2017-10-04 17:06:03 UTC
Verified on KBL, BYT, IVB, BDW, and BSW. Closing.
$ : sudo -E ./intel-graphics/intel-gpu-tools/tests/kms_atomic_transition --r plane-use-after-nonblocking-unbind
IGT-Version: 1.19-g26d0da4 (x86_64) (Linux: 4.14.0-rc3-drm-tip-ww40-commit-d8f7188+ x86_64)
Running test on pipe A with resolution 1920x1080 and sprite size 1920x1080 alpha 1
Running test on pipe A with resolution 1920x1080 and sprite size 1920x1080 alpha 1
Running test on pipe B with resolution 1920x1080 and sprite size 1920x1080 alpha 1
Running test on pipe B with resolution 1920x1080 and sprite size 1920x1080 alpha 1
Running test on pipe C with resolution 1920x1080 and sprite size 1920x1080 alpha 1
Running test on pipe C with resolution 1920x1080 and sprite size 1920x1080 alpha 1
Subtest plane-use-after-nonblocking-unbind: SUCCESS (0.872s)


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.