Bug 109495 - [CI][DRMTIP] igt@kms_* - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) << (((0+8)+8)+14)) | ((('d')) << (0+8)) | (((0xB2)) << 0) | ((((sizeof(struct drm_mode_create_dumb)))) << ((0+8)+8)))), (&create)) == 0
Summary: [CI][DRMTIP] igt@kms_* - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) ...
Status: NEW
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Stanislav Lisovskiy
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-29 12:26 UTC by Martin Peres
Modified: 2019-09-20 14:33 UTC (History)
1 user (show)

See Also:
i915 platform: CFL, ICL, KBL
i915 features: display/Other


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Peres 2019-01-29 12:26:02 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_197/fi-cfl-8109u/igt@kms_cursor_crc@cursor-64x21-random.html

Starting subtest: cursor-64x21-random
(kms_cursor_crc:1169) igt_kms-CRITICAL: Test assertion failure function kmstest_dumb_create, file ../lib/igt_kms.c:608:
(kms_cursor_crc:1169) igt_kms-CRITICAL: Failed assertion: igt_ioctl((fd), ((((2U|1U) << (((0+8)+8)+14)) | ((('d')) << (0+8)) | (((0xB2)) << 0) | ((((sizeof(struct drm_mode_create_dumb)))) << ((0+8)+8)))), (&create)) == 0
(kms_cursor_crc:1169) igt_kms-CRITICAL: Last errno: 22, Invalid argument
(kms_cursor_crc:1169) igt_kms-CRITICAL: error: -1 != 0
Comment 1 CI Bug Log 2019-01-29 12:26:37 UTC
The CI Bug Log issue associated to this bug has been updated.

### New filters associated

* KBL CFL: all tests - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ..., Last errno: 22, Invalid argument
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_190/fi-cfl-8109u/igt@kms_vblank@pipe-c-query-busy.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_190/fi-cfl-8109u/igt@kms_universal_plane@cursor-fb-leak-pipe-a.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_190/fi-cfl-8109u/igt@kms_plane@plane-panning-bottom-right-pipe-a-planes.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_196/fi-cfl-8109u/igt@kms_plane@plane-position-hole-dpms-pipe-c-planes.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_196/fi-cfl-8109u/igt@kms_color@pipe-b-gamma.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_193/fi-cfl-8109u/igt@kms_cursor_crc@cursor-64x21-sliding.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_197/fi-cfl-8109u/igt@kms_vblank@pipe-a-query-forked-busy-hang.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_197/fi-cfl-8109u/igt@kms_cursor_crc@cursor-64x21-offscreen.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_197/fi-cfl-8109u/igt@kms_cursor_crc@cursor-64x21-random.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_197/fi-cfl-8109u/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_197/fi-cfl-8109u/igt@kms_vblank@pipe-b-ts-continuation-modeset-hang.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_197/fi-kbl-7500u/igt@kms_lease@simple_lease.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_198/fi-cfl-8109u/igt@kms_color@pipe-a-ctm-max.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_198/fi-cfl-8109u/igt@kms_vblank@pipe-b-accuracy-idle.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_198/fi-kbl-7500u/igt@kms_lease@simple_lease.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_201/fi-cfl-8109u/igt@kms_plane_multiple@atomic-pipe-b-tiling-yf.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_201/fi-cfl-8109u/igt@kms_universal_plane@universal-plane-pipe-a-functional.html
Comment 2 CI Bug Log 2019-02-06 16:26:10 UTC
A CI Bug Log filter associated to this bug has been updated:

{- KBL CFL: all tests - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ..., Last errno: 22, Invalid argument -}
{+ SKL KBL CFL: all tests - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ..., Last errno: 22, Invalid argument +}

New failures caught by the filter:

* https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_203/fi-skl-6770hq/igt@kms_lease@simple_lease.html
* https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_208/fi-skl-6770hq/igt@kms_lease@simple_lease.html
* https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_209/fi-skl-6770hq/igt@kms_lease@simple_lease.html
Comment 3 CI Bug Log 2019-04-10 13:13:11 UTC
A CI Bug Log filter associated to this bug has been updated:

{- SKL KBL CFL: all tests - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ..., Last errno: 22, Invalid argument -}
{+ SKL KBL CFL: all tests - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ... +}

 No new failures caught with the new filter
Comment 4 Daniel Vetter 2019-04-25 08:07:14 UTC
Uh is this a regressions? create_dumb failing all over sounds bad ...
Comment 5 CI Bug Log 2019-08-29 06:36:17 UTC
A CI Bug Log filter associated to this bug has been updated:

{- SKL KBL CFL: all tests - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ... -}
{+ SKL KBL CFL ICL: all tests - fail - Failed assertion: igt_ioctl((fd), ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ... +}

New failures caught by the filter:

  * https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_352/fi-icl-u4/igt@kms_vblank@pipe-b-wait-busy.html
  * https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_352/fi-icl-u4/igt@kms_cursor_crc@pipe-c-cursor-256x256-random.html
Comment 6 Lakshmi 2019-08-29 06:37:04 UTC
(In reply to CI Bug Log from comment #5)
> A CI Bug Log filter associated to this bug has been updated:
> 
> {- SKL KBL CFL: all tests - fail - Failed assertion: igt_ioctl((fd),
> ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ...
> -}
> {+ SKL KBL CFL ICL: all tests - fail - Failed assertion: igt_ioctl((fd),
> ((((2U|1U) &lt;&lt; (((0+8)+8)+14)) | (((&#39;d&#39;)) &lt;&lt; (0+8)) | ...
> +}
> 
> New failures caught by the filter:
> 
>   *
> https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_352/fi-icl-u4/
> igt@kms_vblank@pipe-b-wait-busy.html
>   *
> https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_352/fi-icl-u4/
> igt@kms_cursor_crc@pipe-c-cursor-256x256-random.html

Also on ICL.
Comment 7 Stanislav Lisovskiy 2019-08-30 08:05:51 UTC
Sure it fails - it is called with size=0, width=0 and height = 0 as args :)

igt_fb-DEBUG: igt_create_fb_with_bo_size(width=0, height=0, format=XR24(0x34325258), modifier=0x0, size=0)
(kms_cursor_crc:1512) igt_kms-CRITICAL: Test assertion failure function kmstest_dumb_create, file ../lib/igt_kms.c:820:

...

(kms_cursor_crc:1512) igt_kms-CRITICAL: Last errno: 22, Invalid argument
(kms_cursor_crc:1512) igt_kms-CRITICAL: error: -1 != 0

And first check in drm_mode_create_dumb immediately fails:

if (!args->width || !args->height || !args->bpp)
<------><------>return -EINVAL;
Comment 8 Stanislav Lisovskiy 2019-08-30 08:07:31 UTC
So the issue 99% is in test, I will check it
Comment 9 Stanislav Lisovskiy 2019-09-06 13:16:05 UTC
(In reply to Stanislav Lisovskiy from comment #8)
> So the issue 99% is in test, I will check it

That was wrong. The issue seems might be severe and in both cases happens because 
set_fb_on_crtc function in test doesn't get a correct mode, then tries to create fb with all params set to 0, causing above mentioned assertion:

igt_fb-DEBUG: igt_create_fb_with_bo_size(width=0, height=0, format=XR24(0x34325258), modifier=0x0, size=0)
(kms_cursor_crc:1512) igt_kms-CRITICAL: Test assertion failure function kmstest_dumb_create, file ../lib/igt_kms.c:820:

In both cases this happens after probe fails for that connector:

<7>[   30.889091] [drm:intel_dp_detect [i915]] [CONNECTOR:95:DP-2]
<7>[   30.921069] [drm:drm_dp_dpcd_access] Too many retries, giving up. First error: -5
<7>[   30.921079] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:95:DP-2] status updated from connected to disconnected
<7>[   30.921169] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:95:DP-2] disconnected
<7>[   30.921598] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:100:HDMI-A-1]

Also this could be related to this bug I got today:

https://bugs.freedesktop.org/show_bug.cgi?id=111250
Comment 10 Stanislav Lisovskiy 2019-09-20 14:33:43 UTC
Update: 

With the help of Chamelium, I can now easily reproduce this anytime and currently the issue consists of two separate issues:

1) There seems to be some hardware bouncing involved for hpd pins, like very display goind to unplug and plug in a very short time. The kernel seems to not able filter those as those events are not exceeding the required threshold for irq storm detection in a fixed period of time, i.e those anyway get processed like connector going to disconnected and/or connected state quickly.

2) Sometimes connector goes to disconnected state in "unlucky" time, when igt does refresh the output, because currently it refreshes the outputs periodically in igt_output_pipe_select, during that time kernel manages to return some kind of garbage mode, containing all 0, which is then saved by igt and used during framebuffer creation => causing the asserting as drm_mode_create_dumb rejects creation of 0 size, 0 height and width buffer.

IMHO this should have fixes both in kernel(against small very short hpd pin bounces, not detectable by storm detection) and also in igt, as it should not refresh the outputs on the fly during test execution, but use cached version for
outputs, if output happens to be disconnected in the middle of a test, this will at least fail on commit, i.e in a controlled way.


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.