Bug 90050 - [SKL] shrinker vs hangcheck -> WARN_ON(-EIO) + BUG_ON(write_domain != GPU)
Summary: [SKL] shrinker vs hangcheck -> WARN_ON(-EIO) + BUG_ON(write_domain != GPU)
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL: http://patchwork.freedesktop.org/patc...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-16 07:47 UTC by lu hua
Modified: 2017-07-03 13:58 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (124.52 KB, text/plain)
2015-04-16 07:47 UTC, lu hua
no flags Details
test log (7.97 KB, text/plain)
2015-04-16 07:47 UTC, lu hua
no flags Details

Description lu hua 2015-04-16 07:47:24 UTC
Created attachment 115111 [details]
dmesg

==System Environment==
--------------------------
Regression: not sure

Non-working platforms: SKL

==kernel==
--------------------------
drm-intel-nightly/5ea91de4ff45adb60031853d64314c3405378fbd
commit 5ea91de4ff45adb60031853d64314c3405378fbd
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Apr 14 20:00:06 2015 +0200

    drm-intel-nightly: 2015y-04m-14d-17h-59m-22s UTC integration manifest

==Bug detailed description==
-----------------------------
Run ./gem_reloc_vs_gpu --run-subtest forked-interruptible-thrash-inactive-hang 20 cycles on SKL, it happens on the 16th cycle.

output error: 
Failed assertion: gtt_relocs
Last errno: 5, Input/output error

dmesg:
[ 4656.471553] ------------[ cut here ]------------
[ 4656.471606] WARNING: CPU: 0 PID: 8632 at drivers/gpu/drm/i915/i915_gem.c:1999 i915_gem_object_put_pages_gtt+0x47/0x14d [i915]()
[ 4656.471610] [drm:i915_reset_and_wakeup] resetting chip
[ 4656.471618] WARN_ON(ret != -EIO)
[ 4656.471622] Modules linked in: dm_mod snd_hda_codec_realtek ppdev snd_hda_codec_generic pcspkr snd_hda_intel snd_hda_controller snd_hda_codec snd_hda_core i2c_i801 snd_hwdep snd_pcm snd_timer snd soundcore joydev wmi battery parport_pc parport ac acpi_cpufreq i915 button video drm_kms_helper drm
[ 4656.471688] CPU: 0 PID: 8632 Comm: gem_reloc_vs_gp Not tainted 4.0.0_drm-intel-nightly_5ea91d_20150415+ #1272
[ 4656.471694] Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.86C.B067.R00.1412310711 12/31/2014
[ 4656.471699]  0000000000000000 0000000000000009 ffffffff81795847 ffff880086623d38
[ 4656.471707]  ffffffff8103bd5a 00000000000004f4 ffffffffa009e288 0000000000000001
[ 4656.471715]  ffff880088384700 0000000000000000 ffffffffa010ce40 ffff880086623e18
[ 4656.471723] Call Trace:
[ 4656.471737]  [<ffffffff81795847>] ? dump_stack+0x40/0x50
[ 4656.471749]  [<ffffffff8103bd5a>] ? warn_slowpath_common+0x98/0xb0
[ 4656.471792]  [<ffffffffa009e288>] ? i915_gem_object_put_pages_gtt+0x47/0x14d [i915]
[ 4656.471804]  [<ffffffff8103bdb7>] ? warn_slowpath_fmt+0x45/0x4a
[ 4656.471842]  [<ffffffffa009dfbb>] ? i915_gem_object_set_to_cpu_domain+0x27/0x133 [i915]
[ 4656.471917]  [<ffffffffa009e288>] ? i915_gem_object_put_pages_gtt+0x47/0x14d [i915]
[ 4656.471966]  [<ffffffffa009fb2e>] ? i915_gem_object_put_pages+0x77/0xcf [i915]
[ 4656.472029]  [<ffffffffa00a2b60>] ? i915_gem_shrink+0x177/0x1dc [i915]
[ 4656.472065]  [<ffffffffa008fea3>] ? i915_drop_caches_set+0x87/0xb7 [i915]
[ 4656.472085]  [<ffffffff8112c632>] ? simple_attr_write+0x81/0xae
[ 4656.472098]  [<ffffffff8110f29d>] ? vfs_write+0xb0/0x186
[ 4656.472106]  [<ffffffff8110fc0c>] ? SyS_write+0x41/0x84
[ 4656.472115]  [<ffffffff8179b0f2>] ? system_call_fastpath+0x12/0x17
[ 4656.472121] ---[ end trace fd9a6691bb0a99a2 ]---
[ 4656.472206] ------------[ cut here ]------------
[ 4656.528352] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:2247!


==Reproduce steps==
---------------------------- 
1. run ./gem_reloc_vs_gpu --run-subtest forked-interruptible-thrash-inactive-hang 20 cycles.
Comment 1 lu hua 2015-04-16 07:47:53 UTC
Created attachment 115112 [details]
test log
Comment 2 Chris Wilson 2015-04-16 07:56:57 UTC
Would actually be fixed by http://patchwork.freedesktop.org/patch/46607/
Comment 3 lu hua 2015-04-17 07:06:21 UTC
(In reply to Chris Wilson from comment #2)
> Would actually be fixed by http://patchwork.freedesktop.org/patch/46607/

Which is the best for this patch? 
Apply it on the latest drm-intel-nightly kernel:
patching file drivers/gpu/drm/i915/i915_drv.c
patching file drivers/gpu/drm/i915/i915_drv.h
Hunk #1 succeeded at 1295 (offset -13 lines).
Hunk #2 succeeded at 2049 (offset -20 lines).
Hunk #3 FAILED at 2765.
Hunk #4 succeeded at 2800 (offset -14 lines).
1 out of 4 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_drv.h.rej
patching file drivers/gpu/drm/i915/i915_gem.c
Hunk #1 succeeded at 97 (offset -3 lines).
Hunk #2 succeeded at 118 (offset -3 lines).
Hunk #3 succeeded at 1132 (offset 1 line).
Hunk #4 succeeded at 1203 (offset 1 line).
Hunk #5 succeeded at 1217 (offset 1 line).
Hunk #6 succeeded at 1264 (offset -1 lines).
Hunk #7 FAILED at 1408.
Hunk #8 FAILED at 1493.
Hunk #9 FAILED at 1502.
Hunk #10 FAILED at 1538.
Hunk #11 succeeded at 2356 (offset -127 lines).
Hunk #12 succeeded at 2541 (offset -96 lines).
Hunk #13 FAILED at 3002.
Hunk #14 FAILED at 3040.
Hunk #15 FAILED at 3053.
Hunk #16 FAILED at 3091.
Hunk #17 succeeded at 4107 (offset -194 lines).
Hunk #18 succeeded at 4126 (offset -194 lines).
Hunk #19 succeeded at 4133 (offset -194 lines).
8 out of 19 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_gem.c.rej
patching file drivers/gpu/drm/i915/i915_irq.c
Hunk #1 succeeded at 2353 (offset 54 lines).
Hunk #2 succeeded at 2369 (offset 54 lines).
Hunk #3 succeeded at 2386 (offset 54 lines).
Hunk #4 succeeded at 2414 (offset 54 lines).
patching file drivers/gpu/drm/i915/intel_display.c
Hunk #1 succeeded at 3265 (offset 69 lines).
Hunk #2 succeeded at 10220 (offset 532 lines).
Hunk #3 FAILED at 10107.
1 out of 3 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/intel_display.c.rej
patching file drivers/gpu/drm/i915/intel_lrc.c
Hunk #1 succeeded at 774 (offset 98 lines).
patching file drivers/gpu/drm/i915/intel_ringbuffer.c
Hunk #1 succeeded at 2183 (offset -6 lines).
Comment 4 lu hua 2015-05-21 08:12:22 UTC
I am not sure which commit is the best for this patch. Fail to apply it on the latest drm-intel-nightly branch.

patching file drivers/gpu/drm/i915/i915_drv.c
Hunk #1 succeeded at 858 (offset 31 lines).
Hunk #2 succeeded at 869 (offset 31 lines).
Hunk #3 succeeded at 898 (offset 31 lines).
Hunk #4 succeeded at 917 (offset 31 lines).
Hunk #5 succeeded at 935 (offset 31 lines).
patching file drivers/gpu/drm/i915/i915_drv.h
Hunk #1 succeeded at 1311 (offset 3 lines).
Hunk #2 succeeded at 2075 (offset 6 lines).
Hunk #3 FAILED at 2765.
Hunk #4 succeeded at 2839 (offset 25 lines).
1 out of 4 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_drv.h.rej
patching file drivers/gpu/drm/i915/i915_gem.c
Hunk #1 succeeded at 94 (offset -6 lines).
Hunk #2 succeeded at 115 (offset -6 lines).
Hunk #3 succeeded at 1129 (offset -2 lines).
Hunk #4 succeeded at 1200 (offset -2 lines).
Hunk #5 succeeded at 1214 (offset -2 lines).
Hunk #6 succeeded at 1261 (offset -4 lines).
Hunk #7 FAILED at 1408.
Hunk #8 FAILED at 1493.
Hunk #9 FAILED at 1502.
Hunk #10 FAILED at 1538.
Hunk #11 succeeded at 2383 (offset -100 lines).
Hunk #12 succeeded at 2569 (offset -68 lines).
Hunk #13 FAILED at 3002.
Hunk #14 FAILED at 3040.
Hunk #15 FAILED at 3053.
Hunk #16 FAILED at 3091.
Hunk #17 succeeded at 4116 (offset -185 lines).
Hunk #18 succeeded at 4135 (offset -185 lines).
Hunk #19 succeeded at 4142 (offset -185 lines).
8 out of 19 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_gem.c.rej
patching file drivers/gpu/drm/i915/i915_irq.c
Hunk #1 succeeded at 2353 (offset 54 lines).
Hunk #2 succeeded at 2369 (offset 54 lines).
Hunk #3 succeeded at 2386 (offset 54 lines).
Hunk #4 succeeded at 2414 (offset 54 lines).
patching file drivers/gpu/drm/i915/intel_display.c
Hunk #1 succeeded at 3307 (offset 111 lines).
Hunk #2 succeeded at 10350 (offset 662 lines).
Hunk #3 FAILED at 10107.
1 out of 3 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/intel_display.c.rej
patching file drivers/gpu/drm/i915/intel_lrc.c
Hunk #1 succeeded at 800 (offset 124 lines).
patching file drivers/gpu/drm/i915/intel_ringbuffer.c
Hunk #1 succeeded at 2201 (offset 12 lines).
Comment 5 Ander Conselvan de Oliveira 2015-05-29 08:03:08 UTC
I cherry-picked that patch on top of recent -nightly. Please test.

https://github.com/anderco/linux/tree/fdo/90050
Comment 6 lu hua 2015-06-05 08:40:46 UTC
Test on the latest drm-intel-nightly kernel 5 cycles, I don't meet this issue.
I will give it more try(one cycle takes about 4 minutes).
Comment 7 lu hua 2015-06-09 02:52:20 UTC
run 20 cycles, I don't see this issue.
Comment 8 lu hua 2015-06-09 02:52:35 UTC
Verified.Fixed.
Comment 9 Jari Tahvanainen 2017-07-03 13:58:57 UTC
Closing old verified+fixed.


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.