Bug 112225

Summary: [CI][BAT] igt@i915_selftest@live_blt - dmesg-fail - igt_copy_blt failed with error 9
Product: DRI Reporter: Lakshmi <lakshminarayana.vudum>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: RESOLVED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs
Version: DRI git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: HSW i915 features: GEM/Other

Description Lakshmi 2019-11-07 12:04:22 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7279/fi-hsw-peppy/igt@i915_selftest@live_blt.html
(i915_selftest:4012) igt_kmod-WARNING: i915/i915_gem_object_blt_live_selftests: igt_copy_blt failed with error 9
(i915_selftest:4012) igt_kmod-WARNING: ------------[ cut here ]------------
(i915_selftest:4012) igt_kmod-WARNING: blt returned 9, conflicting with selftest's magic values!
(i915_selftest:4012) igt_kmod-WARNING: WARNING: CPU: 1 PID: 4012 at drivers/gpu/drm/i915/selftests/i915_selftest.c:152 __run_selftests+0x164/0x170 [i915]
(i915_selftest:4012) igt_kmod-WARNING: Modules linked in: i915(+) amdgpu gpu_sched ttm vgem x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec_hdmi ghash_clmulni_intel cdc_ether usbnet r8152 mii snd_hda_codec_realtek snd_hda_codec_generic mei_me lpc_ich mei snd_intel_nhlt snd_hda_codec snd_hwdep snd_hda_core snd_pcm prime_numbers btusb btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded: i915]
(i915_selftest:4012) igt_kmod-WARNING: CPU: 1 PID: 4012 Comm: i915_selftest Tainted: G     UD W         5.4.0-rc6-CI-CI_DRM_7279+ #1
(i915_selftest:4012) igt_kmod-WARNING: Hardware name: GOOGLE Peppy/Peppy, BIOS MrChromebox 02/04/2018
(i915_selftest:4012) igt_kmod-WARNING: RIP: 0010:__run_selftests+0x164/0x170 [i915]
(i915_selftest:4012) igt_kmod-WARNING: Code: ff ff 5d 41 5c 41 5d c3 5b 31 c0 5d 41 5c 41 5d c3 7f 05 83 f8 e7 75 d6 48 8b 73 08 89 c2 48 c7 c7 d0 c5 bd a0 e8 6c 49 56 e0 <0f> 0b b8 ff ff ff ff eb bb 0f 1f 00 8b 15 22 f0 13 00 85 d2 75 03
(i915_selftest:4012) igt_kmod-WARNING: RSP: 0018:ffffc90000303ae8 EFLAGS: 00010286
(i915_selftest:4012) igt_kmod-WARNING: RAX: 0000000000000000 RBX: ffffffffa0c78538 RCX: 0000000000000001
(i915_selftest:4012) igt_kmod-WARNING: RDX: 0000000080000001 RSI: 0000000000000000 RDI: 00000000ffffffff
(i915_selftest:4012) igt_kmod-WARNING: RBP: ffff8880668a0000 R08: 0000000000000000 R09: 0000000000000001
(i915_selftest:4012) igt_kmod-WARNING: R10: 0000000000000000 R11: ffffc90000303988 R12: ffffffffa0c785f8
(i915_selftest:4012) igt_kmod-WARNING: R13: ffffffffa0bdc5a0 R14: ffffffffa0c741e0 R15: ffffc90000303e88
(i915_selftest:4012) igt_kmod-WARNING: FS:  00007f4696444e40(0000) GS:ffff888100100000(0000) knlGS:0000000000000000
(i915_selftest:4012) igt_kmod-WARNING: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
(i915_selftest:4012) igt_kmod-WARNING: CR2: 00005573c3164790 CR3: 00000000672e6001 CR4: 00000000000606e0
(i915_selftest:4012) igt_kmod-WARNING: Call Trace:
(i915_selftest:4012) igt_kmod-WARNING:  i915_live_selftests+0x2c/0x60 [i915]
(i915_selftest:4012) igt_kmod-WARNING:  i915_pci_probe+0x93/0x1b0 [i915]
(i915_selftest:4012) igt_kmod-WARNING:  ? _raw_spin_unlock_irqrestore+0x39/0x60
(i915_selftest:4012) igt_kmod-WARNING:  pci_device_probe+0x9e/0x120
(i915_selftest:4012) igt_kmod-WARNING:  really_probe+0xea/0x420
(i915_selftest:4012) igt_kmod-WARNING:  driver_probe_device+0x10b/0x120
(i915_selftest:4012) igt_kmod-WARNING:  device_driver_attach+0x4a/0x50
(i915_selftest:4012) igt_kmod-WARNING:  __driver_attach+0x97/0x130
(i915_selftest:4012) igt_kmod-WARNING:  ? device_driver_attach+0x50/0x50
(i915_selftest:4012) igt_kmod-WARNING:  bus_for_each_dev+0x74/0xc0
(i915_selftest:4012) igt_kmod-WARNING:  bus_add_driver+0x142/0x220
(i915_selftest:4012) igt_kmod-WARNING:  ? 0xffffffffa0253000
(i915_selftest:4012) igt_kmod-WARNING:  driver_register+0x56/0xf0
(i915_selftest:4012) igt_kmod-WARNING:  ? 0xffffffffa0253000
(i915_selftest:4012) igt_kmod-WARNING:  do_one_initcall+0x58/0x2ff
(i915_selftest:4012) igt_kmod-WARNING:  ? rcu_read_lock_sched_held+0x4d/0x80
(i915_selftest:4012) igt_kmod-WARNING:  ? kmem_cache_alloc_trace+0x290/0x2c0
(i915_selftest:4012) igt_kmod-WARNING:  do_init_module+0x56/0x1f8
(i915_selftest:4012) igt_kmod-WARNING:  load_module+0x243e/0x29f0
(i915_selftest:4012) igt_kmod-WARNING:  ? __do_sys_finit_module+0xe9/0x110
(i915_selftest:4012) igt_kmod-WARNING:  __do_sys_finit_module+0xe9/0x110
(i915_selftest:4012) igt_kmod-WARNING:  do_syscall_64+0x4f/0x210
(i915_selftest:4012) igt_kmod-WARNING:  entry_SYSCALL_64_after_hwframe+0x49/0xbe
(i915_selftest:4012) igt_kmod-WARNING: RIP: 0033:0x7f4695afa839
(i915_selftest:4012) igt_kmod-WARNING: Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48
(i915_selftest:4012) igt_kmod-WARNING: RSP: 002b:00007ffe79c72848 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
(i915_selftest:4012) igt_kmod-WARNING: RAX: ffffffffffffffda RBX: 00005573f0605b10 RCX: 00007f4695afa839
(i915_selftest:4012) igt_kmod-WARNING: RDX: 0000000000000000 RSI: 00005573f0607840 RDI: 0000000000000006
(i915_selftest:4012) igt_kmod-WARNING: RBP: 00005573f0607840 R08: 696420312d3d7374 R09: 00005573f0607200
(i915_selftest:4012) igt_kmod-WARNING: R10: 736574666c65735f R11: 0000000000000246 R12: 0000000000000000
(i915_selftest:4012) igt_kmod-WARNING: R13: 00005573f05f8600 R14: 0000000000000020 R15: 0000000000000042
(i915_selftest:4012) igt_kmod-WARNING: irq event stamp: 332108
(i915_selftest:4012) igt_kmod-WARNING: hardirqs last  enabled at (332107): [<ffffffff819e51b4>] _raw_spin_unlock_irq+0x24/0x50
(i915_selftest:4012) igt_kmod-WARNING: hardirqs last disabled at (332108): [<ffffffff819dd994>] __schedule+0xc4/0x7f0
(i915_selftest:4012) igt_kmod-WARNING: softirqs last  enabled at (331900): [<ffffffff81c00385>] __do_softirq+0x385/0x47f
(i915_selftest:4012) igt_kmod-WARNING: softirqs last disabled at (331891): [<ffffffff810b7faa>] irq_exit+0xba/0xc0
(i915_selftest:4012) igt_kmod-WARNING: ---[ end trace 6de4e07e79a4cad8 ]---
Comment 1 CI Bug Log 2019-11-07 12:06:20 UTC
The CI Bug Log issue associated to this bug has been updated.

### New filters associated

* HSW:  igt@i915_selftest@live_blt - dmesg-fail - igt_copy_blt failed with error 9
  - https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7279/fi-hsw-peppy/igt@i915_selftest@live_blt.html
Comment 2 Chris Wilson 2019-11-07 12:47:30 UTC
All we have of interest is

<4>[  502.237878] RIP: 0010:__free_pages+0x0/0x20
<4>[  502.237884] Code: e8 a5 f0 ff ff f7 c5 00 02 00 00 74 0a e8 58 be f7 ff 55 9d 5b 5d c3 55 9d 5b 5d e9 4a c0 f7 ff 66 2e 0f 1f 84 00 00 00 00 00 <f0> ff 4f 34 75 0b 85 f6 74 05 e9 c1 dd ff ff eb 8f f3 c3 0f 1f 00
<4>[  502.237888] RSP: 0018:ffffc9000034be00 EFLAGS: 00010246
<4>[  502.237892] RAX: 0000000000000002 RBX: ffff888057ceccc0 RCX: 0000000000000001
<4>[  502.237895] RDX: ffff888057ceccc0 RSI: 0000000000000000 RDI: 0000000000000000
<4>[  502.237898] RBP: 0000000000000dfd R08: ffffea00000880c8 R09: 0000000000000000
<4>[  502.237901] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88805bb83cd0
<4>[  502.237904] R13: ffff888057ceccc0 R14: ffff88805c18d180 R15: 0000100000000000
<4>[  502.237908] FS:  0000000000000000(0000) GS:ffff888100100000(0000) knlGS:0000000000000000
<4>[  502.237911] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4>[  502.237914] CR2: 0000000000000034 CR3: 0000000066af4001 CR4: 00000000000606e0
<3>[  502.237919] BUG: sleeping function called from invalid context at ./include/linux/percpu-rwsem.h:38
<3>[  502.237922] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 4028, name: igt/blt-1
<4>[  502.237925] INFO: lockdep is turned off.
<4>[  502.237928] irq event stamp: 296790
<4>[  502.237932] hardirqs last  enabled at (296789): [<ffffffff8121fab8>] free_unref_page+0x48/0x60
<4>[  502.237937] hardirqs last disabled at (296790): [<ffffffff81001c0a>] trace_hardirqs_off_thunk+0x1a/0x20
<4>[  502.237943] softirqs last  enabled at (294316): [<ffffffff81c00385>] __do_softirq+0x385/0x47f
<4>[  502.237948] softirqs last disabled at (294301): [<ffffffff810b7faa>] irq_exit+0xba/0xc0
<4>[  502.237953] CPU: 1 PID: 4028 Comm: igt/blt-1 Tainted: G     UD           5.4.0-rc6-CI-CI_DRM_7279+ #1
<4>[  502.237956] Hardware name: GOOGLE Peppy/Peppy, BIOS MrChromebox 02/04/2018
<4>[  502.237959] Call Trace:
<4>[  502.237967]  dump_stack+0x67/0x9b
<4>[  502.237973]  ___might_sleep+0x178/0x260
<4>[  502.237979]  exit_signals+0x2b/0x350
<4>[  502.237983]  do_exit+0xa3/0xd70
<4>[  502.238116]  ? i915_gem_object_copy_blt+0x2a0/0x2a0 [i915]
<4>[  502.238124]  ? kthread+0x119/0x130
<4>[  502.238131]  rewind_stack_do_exit+0x17/0x20
<3>[  502.270759] vaddr[0]=3e8c1322, expected=ee6fa1a1

which smells of a locking bug. But we lack the start of the oops.

If it is the locking bug, we expect it to strike any machine in live_blt, so optimistically we might get a better trace.
Comment 3 CI Bug Log 2019-11-29 09:49:19 UTC
The CI Bug Log issue associated to this bug has been updated.

### New filters associated

* HSW: igt@i915_selftest@live_blt - dmesg-fail - igt_copy_blt_ctx0 failed with error 9
  - https://intel-gfx-ci.01.org/tree/drm-tip/TrybotIGT_67/fi-hsw-peppy/igt@i915_selftest@live_blt.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7439/fi-hsw-peppy/igt@i915_selftest@live_blt.html
Comment 4 Chris Wilson 2019-11-29 14:42:11 UTC
commit 69305732796f50c9e74cd850faef668f38a483b3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Nov 28 23:29:46 2019 +0000

    drm/i915/selftests: Use sgt_iter for huge_pages_free
    
    Use the normal sgt_iter to walk the pages scatterlist on free so that we
    handle the error path correctly.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112225
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Matthew Auld <matthew.auld@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20191128232946.546831-1-chris@chris-wilson.co.uk

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.