lib/igt_kms: Fix memory corruption
PATCH v4 1/1 lib/igt_kms: Fix memory corruption
virtio-gpu kernel driver, which provides KMS, reports 16 for count_crtcs which exceeds IGT_MAX_PIPES set to 8. The function igt_display_require allocates memory for IGT_MAX_PIPES members of igt_pipe_t structures, but then writes into it based on the count_crtcs reported by the kernel, resulting in memory corruption.
# malloc(): corrupted top size
# Received signal SIGABRT.
# Stack trace:
# #0 [fatal_sig_handler+0x17b] # #1 [__sigaction+0x40] # #2 [pthread_key_delete+0x14c] # #3 [gsignal+0x12] # #4 [abort+0xd3] # #5 [__fsetlocking+0x290] # #6 [timer_settime+0x37a] # #7 [__default_morecore+0x1f1b] # #8 [__libc_calloc+0x161] # #9 [drmModeGetPlaneResources+0x44] # #10 [igt_display_require+0x194] # #11 [__igt_unique____real_main1356+0x93c] # #12 [main+0x3f] # #13 [__libc_init_first+0x8a] # #14 [__libc_start_main+0x85] # #15 [_start+0x21]
Increase IGT_MAX_PIPES to 16 to fix this memory corruption issue. igt_display_require initializes display and allocate resources as a prerequisite for the tests. Fail the test if count_crtcs exceeds IGT_MAX_PIPES with debug information. Additionally, update the test documentation to cover up to 16 pipes, and blacklist tests from pipe-i to pipe-p on both the XE blocklist and the intel-ci blacklist.
This fix is required for drm-ci to run igt tests on virtio-gpu.
--- lib/igt_kms.c | 6 +++++- lib/igt_kms.h | 20 +++++++++++++++++++- tests/intel-ci/blacklist.txt | 10 +++++++++- tests/intel-ci/xe.blocklist.txt | 6 +++--- tests/intel/kms_ccs.c | 24 ++++++++++++++++++++++++ tests/kms_bw.c | 2 +- 6 files changed, 61 insertions(+), 7 deletions(-)
lib/igt_kms.c +5 -1
@@ -906,7 +906,7 @@ static igt_plane_t *igt_get_assigned_primary(igt_output_t *output, igt_pipe_t *p*/ const char *kmstest_pipe_name (enum pipe pipe) { -static const char str[] ="A\0B\0C\0D\0E\0F\0G\0H" ; +static const char str[] ="A\0B\0C\0D\0E\0F\0G\0H\0I\0J\0K\0L\0M\0N\0O\0P" ;_Static_assert (sizeof (str) ==IGT_MAX_PIPES *2 ,"Missing pipe name" );
@@ -2770,6 +2770,10 @@ void igt_display_require(igt_display_t *display, int drm_fd) }#endif +igt_assert_f (resources->count_crtcs <=IGT_MAX_PIPES , +"count_crtcs exceeds IGT_MAX_PIPES, resources->count_crtcs=%d, IGT_MAX_PIPES=%d\n" , + resources->count_crtcs,IGT_MAX_PIPES ); + display->n_pipes =IGT_MAX_PIPES ; display->pipes =calloc (sizeof (igt_pipe_t), display->n_pipes);igt_assert_f (display->pipes,"Failed to allocate memory for %d pipes\n" , display->n_pipes);
lib/igt_kms.h +19 -1
@@ -57,6 +57,16 @@* @PIPE_D: Fourth crtc. * @PIPE_E: Fifth crtc. * @PIPE_F: Sixth crtc. +* @PIPE_G: Seventh crtc. +* @PIPE_H: Eighth crtc. +* @PIPE_I: Ninth crtc. +* @PIPE_J: Tenth crtc. +* @PIPE_K: Eleventh crtc. +* @PIPE_L: Twelfth crtc. +* @PIPE_M: Thirteenth crtc. +* @PIPE_N: Fourteenth crtc. +* @PIPE_O: Fifteenth crtc. +* @PIPE_P: Sixteenth crtc. * @IGT_MAX_PIPES: Max number of pipes allowed. */ enum pipe {
@@ -70,7 +80,15 @@ enum pipe {PIPE_F ,PIPE_G ,PIPE_H , - IGT_MAX_PIPES +PIPE_I , +PIPE_J , +PIPE_K , +PIPE_L , +PIPE_M , +PIPE_N , +PIPE_O , +PIPE_P , +IGT_MAX_PIPES };const char *kmstest_pipe_name (enum pipe pipe);int kmstest_pipe_to_index (char pipe);
tests/intel-ci/blacklist.txt +9 -1
@@ -117,12 +117,20 @@ igt@gem_ctx_isolation@.*-s4 ############################################### igt@i915_suspend@shrink ############################################### -# pipe-e, pipe-f, pipe-g, pipe-h no current HW support +# pipe-e, pipe-f, pipe-g, pipe-h, pipe-i, pipe-j, pipe-k, pipe-l, pipe-m, pipe-n, pipe-o, pipe-p no current HW support ############################################### igt@.*@.*pipe-e($|-.*) igt@.*@.*pipe-f($|-.*) igt@.*@.*pipe-g($|-.*) igt@.*@.*pipe-h($|-.*) +igt@.*@.*pipe-i($|-.*) +igt@.*@.*pipe-j($|-.*) +igt@.*@.*pipe-k($|-.*) +igt@.*@.*pipe-l($|-.*) +igt@.*@.*pipe-m($|-.*) +igt@.*@.*pipe-n($|-.*) +igt@.*@.*pipe-o($|-.*) +igt@.*@.*pipe-p($|-.*) ############################################### # Temporary workarounds for CI-impacting bugs
tests/intel-ci/xe.blocklist.txt +3 -3
@@ -44,11 +44,11 @@ igt@syncobj_.* igt@template igt@tools_test ################################################################## -# KMS: Pipe E, F, G and H are not available on Intel hardware, +# KMS: Pipe E, F, G, H, I, J, K, L, M, N, O and P are not available on Intel hardware, # hence can't use more than 4 displays. ################################################################## -igt@.*@.*pipe-(e|f|g|h).* -igt@kms_bw@.*-(5|6|7|8)-displays-.* +igt@.*@.*pipe-(e|f|g|h|i|j|k|l|m|n|o|p).* +igt@kms_bw@.*-(5|6|7|8|9|10|11|12|13|14|15|16)-displays-.* ################################################################## # KMS: Tests specific to i915 driver ##################################################################
tests/intel/kms_ccs.c +24 -0
@@ -53,6 +53,14 @@* @pipe-F: Pipe F * @pipe-G: Pipe G * @pipe-H: Pipe H +* @pipe-I: Pipe I +* @pipe-J: Pipe J +* @pipe-K: Pipe K +* @pipe-L: Pipe L +* @pipe-M: Pipe M +* @pipe-N: Pipe N +* @pipe-O: Pipe O +* @pipe-P: Pipe P * * arg[2]: *
@@ -90,6 +98,14 @@* @pipe-F: Pipe F * @pipe-G: Pipe G * @pipe-H: Pipe H +* @pipe-I: Pipe I +* @pipe-J: Pipe J +* @pipe-K: Pipe K +* @pipe-L: Pipe L +* @pipe-M: Pipe M +* @pipe-N: Pipe N +* @pipe-O: Pipe O +* @pipe-P: Pipe P * * arg[2]: *
@@ -131,6 +147,14 @@* @pipe-F: Pipe F * @pipe-G: Pipe G * @pipe-H: Pipe H +* @pipe-I: Pipe I +* @pipe-J: Pipe J +* @pipe-K: Pipe K +* @pipe-L: Pipe L +* @pipe-M: Pipe M +* @pipe-N: Pipe N +* @pipe-O: Pipe O +* @pipe-P: Pipe P * * arg[2]: *
tests/kms_bw.c +1 -1
@@ -37,7 +37,7 @@* Mega feature: General Display Features * Test category: functionality test * -* arg[1].values: 1, 2, 3, 4, 5, 6, 7, 8 +* arg[1].values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * * arg[2]: *
Signature · 1 line
2.40.1
Patchwork
CI[igt-dev] ✗ CI.xeBAT: failure for lib/igt_kms: Fix memory corruption (rev4)
== Series Details ==
== Series Details ==
Series: lib/igt_kms: Fix memory corruption (rev4)
URL : https://patchwork.freedesktop.org/series/125599/
State : failure
== Summary ==
CI Bug Log - changes from XEIGT_7581_BAT -> XEIGTPW_10156_BAT
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with XEIGTPW_10156_BAT absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in XEIGTPW_10156_BAT, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
Participating hosts (0 -> 3)
------------------------------
Additional (3): bat-dg2-oem2 bat-adlp-7 bat-atsm-2
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in XEIGTPW_10156_BAT:
### IGT changes ###
#### Possible regressions ####
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- bat-adlp-7: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-adlp-7/igt@[email protected]
Known issues
------------
Here are the changes found in XEIGTPW_10156_BAT that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-oem2: NOTRUN -> [SKIP][2] ([Intel XE#623])
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-oem2: NOTRUN -> [SKIP][3] ([Intel XE#624])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
* igt@kms_addfb_basic@invalid-set-prop-any:
- bat-atsm-2: NOTRUN -> [SKIP][4] ([i915#6077]) +33 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
* igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg2-oem2: NOTRUN -> [FAIL][5] ([Intel XE#609]) +1 other test fail
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
- bat-adlp-7: NOTRUN -> [FAIL][6] ([Intel XE#609]) +2 other tests fail
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-adlp-7/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- bat-atsm-2: NOTRUN -> [SKIP][7] ([Intel XE#782]) +5 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size:
- bat-dg2-oem2: NOTRUN -> [FAIL][8] ([Intel XE#692] / [Intel XE#773])
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
* igt@kms_dsc@dsc-basic:
- bat-atsm-2: NOTRUN -> [SKIP][9] ([Intel XE#784])
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
- bat-dg2-oem2: NOTRUN -> [SKIP][10] ([Intel XE#423])
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
- bat-adlp-7: NOTRUN -> [SKIP][11] ([Intel XE#423])
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-adlp-7/igt@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank:
- bat-atsm-2: NOTRUN -> [SKIP][12] ([Intel XE#541]) +3 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@kms_flip@basic-flip-vs-wf_vblank.html
* igt@kms_flip@basic-flip-vs-wf_vblank@a-dp3:
- bat-dg2-oem2: NOTRUN -> [FAIL][13] ([Intel XE#480]) +1 other test fail
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@kms_flip@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
- bat-adlp-7: NOTRUN -> [FAIL][14] ([Intel XE#480]) +1 other test fail
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-adlp-7/igt@kms_flip@[email protected]
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-dg2-oem2: NOTRUN -> [SKIP][15] ([i915#5274])
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- bat-dg2-oem2: NOTRUN -> [FAIL][16] ([Intel XE#608])
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
- bat-adlp-7: NOTRUN -> [DMESG-FAIL][17] ([Intel XE#282] / [i915#2017])
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-adlp-7/igt@[email protected]
- bat-atsm-2: NOTRUN -> [SKIP][18] ([Intel XE#783])
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
* igt@kms_hdmi_inject@inject-audio:
- bat-atsm-2: NOTRUN -> [SKIP][19] ([Intel XE#540]) +3 other tests skip
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-b-dp-3:
- bat-dg2-oem2: NOTRUN -> [FAIL][20] ([Intel XE#400] / [Intel XE#616]) +2 other tests fail
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-xr24:
- bat-atsm-2: NOTRUN -> [SKIP][21] ([i915#1836]) +6 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
* igt@kms_prop_blob@basic:
- bat-atsm-2: NOTRUN -> [SKIP][22] ([Intel XE#780])
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
* igt@kms_psr@primary_page_flip:
- bat-dg2-oem2: NOTRUN -> [SKIP][23] ([Intel XE#535]) +2 other tests skip
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@kms_psr@primary_page_flip.html
* igt@kms_psr@sprite_plane_onoff:
- bat-atsm-2: NOTRUN -> [SKIP][24] ([Intel XE#535]) +2 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@kms_psr@sprite_plane_onoff.html
* igt@xe_compute@compute-square:
- bat-atsm-2: NOTRUN -> [SKIP][25] ([Intel XE#672])
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
- bat-dg2-oem2: NOTRUN -> [SKIP][26] ([Intel XE#672])
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
* igt@xe_evict@evict-beng-small-external:
- bat-adlp-7: NOTRUN -> [SKIP][27] ([Intel XE#261] / [Intel XE#688]) +15 other tests skip
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-adlp-7/igt@[email protected]
* igt@xe_exec_fault_mode@many-basic:
- bat-dg2-oem2: NOTRUN -> [SKIP][28] ([Intel XE#288]) +17 other tests skip
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@[email protected]
* igt@xe_exec_fault_mode@twice-userptr-invalidate:
- bat-adlp-7: NOTRUN -> [SKIP][29] ([Intel XE#288]) +17 other tests skip
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-adlp-7/igt@[email protected]
* igt@xe_exec_fault_mode@twice-userptr-invalidate-imm:
- bat-atsm-2: NOTRUN -> [SKIP][30] ([Intel XE#288]) +17 other tests skip
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@[email protected]
* igt@xe_huc_copy@huc_copy:
- bat-atsm-2: NOTRUN -> [SKIP][31] ([Intel XE#255])
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-atsm-2/igt@xe_huc_copy@huc_copy.html
- bat-dg2-oem2: NOTRUN -> [SKIP][32] ([Intel XE#255])
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-dg2-oem2/igt@xe_huc_copy@huc_copy.html
* igt@xe_mmap@vram:
- bat-adlp-7: NOTRUN -> [SKIP][33] ([Intel XE#263])
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/bat-adlp-7/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[Intel XE#255]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/255
[Intel XE#261]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/261
[Intel XE#263]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/263
[Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282
[Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288
[Intel XE#400]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/400
[Intel XE#423]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/423
[Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
[Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524
[Intel XE#535]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/535
[Intel XE#540]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/540
[Intel XE#541]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/541
[Intel XE#608]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/608
[Intel XE#609]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/609
[Intel XE#616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/616
[Intel XE#623]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/623
[Intel XE#624]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/624
[Intel XE#672]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/672
[Intel XE#688]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/688
[Intel XE#692]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/692
[Intel XE#773]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/773
[Intel XE#780]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/780
[Intel XE#782]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/782
[Intel XE#783]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/783
[Intel XE#784]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/784
[i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
[i915#2017]: https://gitlab.freedesktop.org/drm/intel/issues/2017
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#6077]: https://gitlab.freedesktop.org/drm/intel/issues/6077
Build changes
-------------
* IGT: IGT_7581 -> IGTPW_10156
* Linux: xe-484-b11007e91f8785a96903d9d3c3d1efbe7e969eaf -> xe-485-b3890fb4386dcef68a96888141c4cc773f6241ce
IGTPW_10156: 10156
IGT_7581: 7581
xe-484-b11007e91f8785a96903d9d3c3d1efbe7e969eaf: b11007e91f8785a96903d9d3c3d1efbe7e969eaf xe-485-b3890fb4386dcef68a96888141c4cc773f6241ce: b3890fb4386dcef68a96888141c4cc773f6241ce
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10156/index.html
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for lib/igt_kms: Fix memory corruption (rev4)
In reply to Vignesh Raman== Series Details ==
== Series Details ==
Series: lib/igt_kms: Fix memory corruption (rev4)
URL : https://patchwork.freedesktop.org/series/125599/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13859 -> IGTPW_10156
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_10156 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10156, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/index.html
Participating hosts (33 -> 32)
------------------------------
Additional (1): bat-dg2-9
Missing (2): fi-kbl-soraka bat-adlp-11
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_10156:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@hangcheck:
- bat-mtlp-6: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/bat-mtlp-6/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-mtlp-6/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@reset:
- fi-apl-guc: [PASS][3] -> [DMESG-WARN][4] +36 other tests dmesg-warn
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/fi-apl-guc/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/fi-apl-guc/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in IGTPW_10156 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_mmap@basic:
- bat-dg2-9: NOTRUN -> [SKIP][5] ([i915#4083])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@gem_mmap_gtt@basic:
- bat-dg2-9: NOTRUN -> [SKIP][6] ([i915#4077]) +2 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@gem_render_tiled_blits@basic:
- bat-dg2-9: NOTRUN -> [SKIP][7] ([i915#4079]) +1 other test skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@i915_module_load@reload:
- fi-apl-guc: [PASS][8] -> [DMESG-WARN][9] ([i915#180] / [i915#1982] / [i915#8585])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/fi-apl-guc/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/fi-apl-guc/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-apl-guc: [PASS][10] -> [DMESG-WARN][11] ([i915#180] / [i915#8585]) +2 other tests dmesg-warn
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/fi-apl-guc/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/fi-apl-guc/igt@[email protected]
* igt@i915_pm_rps@basic-api:
- bat-dg2-9: NOTRUN -> [SKIP][12] ([i915#6621])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@kms_addfb_basic@addfb25-4-tiled:
- fi-apl-guc: [PASS][13] -> [DMESG-WARN][14] ([i915#8585] / [i915#8703]) +40 other tests dmesg-warn
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/fi-apl-guc/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/fi-apl-guc/igt@[email protected]
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][15] ([i915#5190])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][16] ([i915#4215] / [i915#5190])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@kms_addfb_basic@framebuffer-vs-set-tiling:
- bat-dg2-9: NOTRUN -> [SKIP][17] ([i915#4212]) +6 other tests skip
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg2-9: NOTRUN -> [SKIP][18] ([i915#4212] / [i915#5608])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][19] ([i915#4103] / [i915#4213] / [i915#5608]) +1 other test skip
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@kms_flip@basic-flip-vs-dpms@c-dp1:
- fi-apl-guc: [PASS][20] -> [DMESG-WARN][21] ([i915#180] / [i915#8585] / [i915#8703]) +31 other tests dmesg-warn
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/fi-apl-guc/igt@kms_flip@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/fi-apl-guc/igt@kms_flip@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank@a-dp1:
- fi-apl-guc: [PASS][22] -> [DMESG-WARN][23] ([i915#180] / [i915#1982] / [i915#8585] / [i915#8703]) +1 other test dmesg-warn
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/fi-apl-guc/igt@kms_flip@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/fi-apl-guc/igt@kms_flip@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- bat-dg2-9: NOTRUN -> [SKIP][24] ([fdo#109285])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-dg2-9: NOTRUN -> [SKIP][25] ([i915#5274])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@kms_psr@sprite_plane_onoff:
- bat-dg2-9: NOTRUN -> [SKIP][26] ([i915#1072]) +3 other tests skip
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg2-9: NOTRUN -> [SKIP][27] ([i915#3555] / [i915#4098])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- bat-dg2-9: NOTRUN -> [SKIP][28] ([i915#3708])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@prime_vgem@basic-fence-mmap:
- bat-dg2-9: NOTRUN -> [SKIP][29] ([i915#3708] / [i915#4077]) +1 other test skip
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
* igt@prime_vgem@basic-write:
- bat-dg2-9: NOTRUN -> [SKIP][30] ([i915#3291] / [i915#3708]) +2 other tests skip
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-9/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@hangcheck:
- bat-dg2-11: [DMESG-FAIL][31] -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/bat-dg2-11/igt@i915_selftest@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-dg2-11/igt@i915_selftest@[email protected]
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- bat-rplp-1: [ABORT][33] ([i915#8668]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13859/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#8585]: https://gitlab.freedesktop.org/drm/intel/issues/8585
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#8703]: https://gitlab.freedesktop.org/drm/intel/issues/8703
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7581 -> IGTPW_10156
CI-20190529: 20190529
CI_DRM_13859: 9155ae0ae05f320d84eaf2c4e81413bf937a5f3c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10156: 10156
IGT_7581: 7581
Testlist changes
----------------
+++ 744 lines
--- 0 lines
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10156/index.html
Hi Vignesh,
Quoted 40 lines · Vignesh Raman
virtio-gpu kernel driver, which provides KMS, reports 16 for
count_crtcswhich exceedsIGT_MAX_PIPESset to 8. The functionigt_display_requireallocates memory forIGT_MAX_PIPESmembers ofigt_pipe_tstructures, but then writes into it based on thecount_crtcsreported by the kernel, resulting in memory corruption.#
malloc(): corrupted top size
# Received signal SIGABRT.
# Stack trace:# #0 [fatal_sig_handler+0x17b] # #1 [__sigaction+0x40] # #2 [pthread_key_delete+0x14c] # #3 [gsignal+0x12] # #4 [abort+0xd3] # #5 [__fsetlocking+0x290] # #6 [timer_settime+0x37a] # #7 [__default_morecore+0x1f1b] # #8 [__libc_calloc+0x161] # #9 [drmModeGetPlaneResources+0x44] # #10 [igt_display_require+0x194] # #11 [__igt_unique____real_main1356+0x93c] # #12 [main+0x3f] # #13 [__libc_init_first+0x8a] # #14 [__libc_start_main+0x85] # #15 [_start+0x21]Increase
IGT_MAX_PIPESto 16 to fix this memory corruption issue.igt_display_requireinitializes display and allocate resources as a prerequisite for the tests. Fail the test ifcount_crtcsexceedsIGT_MAX_PIPESwith debug information. Additionally, update the test documentation to cover up to 16 pipes, and blacklist tests from pipe-i to pipe-p on both the XE blocklist and the intel-ci blacklist.This fix is required for drm-ci to run igt tests on virtio-gpu.
Reviewed-by Daniel Stone <[email protected]>Acked-by Helen Koike <[email protected]>Suggested-by Daniel Stone <[email protected]>Suggested-by Bhanuprakash Modem <[email protected]>Signed-off-by Vignesh Raman <[email protected]>
Quoted 7 lines
--- lib/igt_kms.c | 6 +++++- lib/igt_kms.h | 20 +++++++++++++++++++- tests/intel-ci/blacklist.txt | 10 +++++++++- tests/intel-ci/xe.blocklist.txt | 6 +++--- tests/intel/kms_ccs.c | 24 ++++++++++++++++++++++++ tests/kms_bw.c | 2 +-
Probably, you need to split this patch into 3.
1- lib
2- tests
3- intel-ci
Quoted 16 lines
6 files changed, 61 insertions(+), 7 deletions(-)lib/igt_kms.c +1
-1@@ -906,7 +906,7 @@ static igt_plane_t *igt_get_assigned_primary(igt_output_t *output, igt_pipe_t *p*/ const char *kmstest_pipe_name (enum pipe pipe) { -static const char str[] ="A\0B\0C\0D\0E\0F\0G\0H" ; +static const char str[] ="A\0B\0C\0D\0E\0F\0G\0H\0I\0J\0K\0L\0M\0N\0O\0P" ;_Static_assert (sizeof (str) ==IGT_MAX_PIPES *2 ,"Missing pipe name" );
lib/igt_kms.c void igt_display_require(igt_display_t *display, int drm_fd) · line 2773
Quoted 4 lines
lib/igt_kms.c +1
-0@@ -2770,6 +2770,10 @@ void igt_display_require(igt_display_t *display, int drm_fd) }#endif + igt_assert_f(resources->count_crtcs <= IGT_MAX_PIPES,
--------^
Could be igt_require_f()?
IMHO, we need to skip the test instead of fail. Since it is a basic requirement to fill display struct.
Quoted 57 lines
lib/igt_kms.c +3
-0+"count_crtcs exceeds IGT_MAX_PIPES, resources->count_crtcs=%d, IGT_MAX_PIPES=%d\n" , + resources->count_crtcs, IGT_MAX_PIPES); + display->n_pipes =IGT_MAX_PIPES ; display->pipes =calloc (sizeof (igt_pipe_t), display->n_pipes);igt_assert_f (display->pipes,"Failed to allocate memory for %d pipes\n" , display->n_pipes);lib/igt_kms.h +19
-1@@ -57,6 +57,16 @@* @PIPE_D: Fourth crtc. * @PIPE_E: Fifth crtc. * @PIPE_F: Sixth crtc. +* @PIPE_G: Seventh crtc. +* @PIPE_H: Eighth crtc. +* @PIPE_I: Ninth crtc. +* @PIPE_J: Tenth crtc. +* @PIPE_K: Eleventh crtc. +* @PIPE_L: Twelfth crtc. +* @PIPE_M: Thirteenth crtc. +* @PIPE_N: Fourteenth crtc. +* @PIPE_O: Fifteenth crtc. +* @PIPE_P: Sixteenth crtc. * @IGT_MAX_PIPES: Max number of pipes allowed. */ enum pipe {@@ -70,7 +80,15 @@ enum pipe {PIPE_F ,PIPE_G ,PIPE_H , - IGT_MAX_PIPES +PIPE_I , +PIPE_J , +PIPE_K , +PIPE_L , +PIPE_M , +PIPE_N , +PIPE_O , +PIPE_P , +IGT_MAX_PIPES };const char *kmstest_pipe_name (enum pipe pipe);int kmstest_pipe_to_index (char pipe);tests/intel-ci/blacklist.txt +1
-1@@ -117,12 +117,20 @@ igt@gem_ctx_isolation@.*-s4 ############################################### igt@i915_suspend@shrink ############################################### -# pipe-e, pipe-f, pipe-g, pipe-h no current HW support +# pipe-e, pipe-f, pipe-g, pipe-h, pipe-i, pipe-j, pipe-k, pipe-l, pipe-m, pipe-n, pipe-o, pipe-p no current HW support ############################################### igt@.*@.*pipe-e($|-.*) igt@.*@.*pipe-f($|-.*)
tests/intel-ci/blacklist.txt igt@gem_ctx_isolation@.*-s4 · line 133
Quoted 10 lines
tests/intel-ci/blacklist.txt +8
-0igt@.*@.*pipe-g($|-.*) igt@.*@.*pipe-h($|-.*) +igt@.*@.*pipe-i($|-.*) +igt@.*@.*pipe-j($|-.*) +igt@.*@.*pipe-k($|-.*) +igt@.*@.*pipe-l($|-.*) +igt@.*@.*pipe-m($|-.*) +igt@.*@.*pipe-n($|-.*) +igt@.*@.*pipe-o($|-.*) +igt@.*@.*pipe-p($|-.*)
Shall we simplify the regex as below?
igt@.*@.*pipe-[e-pE-P]($|-.*)
Quoted 9 lines
tests/intel-ci/blacklist.txt +0
-0############################################### # Temporary workarounds for CI-impacting bugstests/intel-ci/xe.blocklist.txt +0
-0@@ -44,11 +44,11 @@ igt@syncobj_.* igt@template
tests/intel-ci/xe.blocklist.txt igt@syncobj_.* · line 51
Quoted 10 lines
tests/intel-ci/xe.blocklist.txt +3
-3igt@tools_test ################################################################## -# KMS: Pipe E, F, G and H are not available on Intel hardware, +# KMS: Pipe E, F, G, H, I, J, K, L, M, N, O and P are not available on Intel hardware, # hence can't use more than 4 displays. ################################################################## -igt@.*@.*pipe-(e|f|g|h).* -igt@kms_bw@.*-(5|6|7|8)-displays-.* +igt@.*@.*pipe-(e|f|g|h|i|j|k|l|m|n|o|p).* +igt@kms_bw@.*-(5|6|7|8|9|10|11|12|13|14|15|16)-displays-.*
igt@.*@.*pipe-[e-pE-P].*
igt@kms_bw@.*-([5-9]|1[0-6])-displays-.*
I used to validate my regex at https://regex101.com/
You can get my R-b after addressing above comments.
- Bhanu
Quoted 65 lines
tests/intel-ci/xe.blocklist.txt +0
-0################################################################## # KMS: Tests specific to i915 driver ##################################################################tests/intel/kms_ccs.c +24
-0@@ -53,6 +53,14 @@* @pipe-F: Pipe F * @pipe-G: Pipe G * @pipe-H: Pipe H +* @pipe-I: Pipe I +* @pipe-J: Pipe J +* @pipe-K: Pipe K +* @pipe-L: Pipe L +* @pipe-M: Pipe M +* @pipe-N: Pipe N +* @pipe-O: Pipe O +* @pipe-P: Pipe P * * arg[2]: * @@ -90,6 +98,14 @@* @pipe-F: Pipe F * @pipe-G: Pipe G * @pipe-H: Pipe H +* @pipe-I: Pipe I +* @pipe-J: Pipe J +* @pipe-K: Pipe K +* @pipe-L: Pipe L +* @pipe-M: Pipe M +* @pipe-N: Pipe N +* @pipe-O: Pipe O +* @pipe-P: Pipe P * * arg[2]: * @@ -131,6 +147,14 @@* @pipe-F: Pipe F * @pipe-G: Pipe G * @pipe-H: Pipe H +* @pipe-I: Pipe I +* @pipe-J: Pipe J +* @pipe-K: Pipe K +* @pipe-L: Pipe L +* @pipe-M: Pipe M +* @pipe-N: Pipe N +* @pipe-O: Pipe O +* @pipe-P: Pipe P * * arg[2]: * tests/kms_bw.c +1
-1@@ -37,7 +37,7 @@* Mega feature: General Display Features * Test category: functionality test * -* arg[1].values: 1, 2, 3, 4, 5, 6, 7, 8 +* arg[1].values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * * arg[2]: *
Hi Bhanu,
Quoted 8 lines · Bhanuprakash
Quoted 7 lines
---
lib/igt_kms.c | 6 +++++- lib/igt_kms.h | 20 +++++++++++++++++++- tests/intel-ci/blacklist.txt | 10 +++++++++-tests/intel-ci/xe.blocklist.txt| 6 +++--- tests/intel/kms_ccs.c | 24 ++++++++++++++++++++++++ tests/kms_bw.c | 2 +-
Quoted 5 lines
Probably, you need to split this patch into 3.
1- lib
2- tests
3- intel-ci
Sure, will split the changes into 3 commits.
Quoted 9 lines
lib/igt_kms.c void igt_display_require(igt_display_t · line 2773
Quoted 5 lines
lib/igt_kms.c +1
-0@@ -2770,6 +2770,10 @@ void igt_display_require(igt_display_t *display, int drm_fd) } #endif + igt_assert_f(resources->count_crtcs <= IGT_MAX_PIPES,--------^
Could beigt_require_f()?IMHO, we need to skip the test instead of fail. Since it is a basic requirement to fill display struct.
Okay, will skip the test. I was going through the failures mentioned in
https://patchwork.freedesktop.org/series/125599/
Are these known issues?
Quoted 25 lines
Quoted 14 lines
tests/intel-ci/blacklist.txt +0
-0@@ -117,12 +117,20 @@ igt@gem_ctx_isolation@.*-s4 ###############################################igt@i915_suspend@shrink
###############################################tests/intel-ci/blacklist.txt +1
-1-# pipe-e, pipe-f, pipe-g, pipe-h no current HW support +# pipe-e, pipe-f, pipe-g, pipe-h, pipe-i, pipe-j, pipe-k, pipe-l,pipe-m, pipe-n, pipe-o, pipe-p no current HW support
###############################################igt@.*@.*pipe-e($|-.*) igt@.*@.*pipe-f($|-.*) igt@.*@.*pipe-g($|-.*) igt@.*@.*pipe-h($|-.*)tests/intel-ci/blacklist.txt igt@gem_ctx_isolation@.*-s4 · line 133
Quoted 8 lines
tests/intel-ci/blacklist.txt +8
-0+igt@.*@.*pipe-i($|-.*) +igt@.*@.*pipe-j($|-.*) +igt@.*@.*pipe-k($|-.*) +igt@.*@.*pipe-l($|-.*) +igt@.*@.*pipe-m($|-.*) +igt@.*@.*pipe-n($|-.*) +igt@.*@.*pipe-o($|-.*) +igt@.*@.*pipe-p($|-.*)Shall we simplify the regex as below?
Quoted 1 line
igt@.*@.*pipe-[e-pE-P]($|-.*)
Yes, this looks good.
Quoted 24 lines
Quoted 16 lines
###############################################
# Temporary workarounds for CI-impacting bugstests/intel-ci/xe.blocklist.txt +0
-0@@ -44,11 +44,11 @@ igt@syncobj_.*igt@template
igt@tools_test
##################################################################tests/intel-ci/xe.blocklist.txt +1
-1-# KMS: Pipe E, F, G and H are not available on Intel hardware, +# KMS: Pipe E, F, G, H, I, J, K, L, M, N, O and P are not availableon Intel hardware,
# hence can't use more than 4 displays. ##################################################################tests/intel-ci/xe.blocklist.txt igt@syncobj_.* · line 51
Quoted 4 lines
tests/intel-ci/xe.blocklist.txt +2
-2-igt@.*@.*pipe-(e|f|g|h).* -igt@kms_bw@.*-(5|6|7|8)-displays-.* +igt@.*@.*pipe-(e|f|g|h|i|j|k|l|m|n|o|p).* +igt@kms_bw@.*-(5|6|7|8|9|10|11|12|13|14|15|16)-displays-.*igt@.*@.*pipe-[e-pE-P].*
igt@kms_bw@.*-([5-9]|1[0-6])-displays-.*
Quoted 3 lines
I used to validate my regex at https://regex101.com/
You can get my R-b after addressing above comments.
Thank you.
Regards,
Vignesh