Bug 81027 - [All]igt/gem_ctx_exec/reset-pin-leak fails and cause "WARNING: CPU: 2 PID: 4442 at drivers/gpu/drm/i915/i915_gem.c:4068 i915_gem_object_pin+0x9d/0x660 [i915]()"
Summary: [All]igt/gem_ctx_exec/reset-pin-leak fails and cause "WARNING: CPU: 2 PID: 44...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: high critical
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-08 03:33 UTC by Guo Jinxian
Modified: 2017-07-03 12:28 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (113.28 KB, text/plain)
2014-07-08 03:33 UTC, Guo Jinxian
no flags Details
dmesg on byt-m (123.25 KB, text/plain)
2015-01-20 08:10 UTC, Ding Heng
no flags Details

Description Guo Jinxian 2014-07-08 03:33:13 UTC
Created attachment 102405 [details]
dmesg

==System Environment==
--------------------------
Regression: No. 
It's new case

Non-working platforms: All

==kernel==
--------------------------
origin/drm-intel-nightly: 2a9005c8ae4d3418dd79f2471695f85c83024dd0(fails)
    drm-intel-nightly: 2014y-07m-07d-23h-45m-32s integration manifest
origin/drm-intel-next-queued: f7d2323c181ed5a2596494b860a99d567fd3e6cd(fails)
    drm/i915: correct BLC vs PWM enable/disable ordering  
origin/drm-intel-fixes: af7d042e95d95ea02060802117010bf7d649340a(fails)
    drm/i915: Update the DSI ULPS entry/exit sequence

==Bug detailed description==
-----------------------------
igt/gem_ctx_exec/reset-pin-leak fails and cause "WARNING: CPU: 2 PID: 4442 at drivers/gpu/drm/i915/i915_gem.c:4068 i915_gem_object_pin+0x9d/0x660 [i915]()"

Output:
[root@x-sgb3 tests]# ./gem_ctx_exec --run-subtest reset-pin-leak
IGT-Version: 1.7-g838f321 (x86_64) (Linux: 3.15.0-rc8_drm-intel-next-queued_57127e_20140707+ x86_64)
Test assertion failure function __real_main174, file gem_ctx_exec.c:224:
Last errno: 16, Device or resource busy
Failed assertion: exec(fd, handle, I915_EXEC_RENDER, ctx_id) == 0
Subtest reset-pin-leak: FAIL
Warning on condition flags != 0 in fucntion check_stop_rings, file drmtest.c:97
i915_ring_stop flags on exit 0x400000ff, can't quiescent gpu cleanly

Dmesg shows:
[  422.170991] WARNING: CPU: 2 PID: 4442 at drivers/gpu/drm/i915/i915_gem.c:4068 i915_gem_object_pin+0x9d/0x660 [i915]()
[  422.173059] Modules linked in: dm_mod snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic iTCO_wdt iTCO_vendor_support firewire_ohci ppdev pcspkr serio_raw i2c_i801 lpc_ich snd_hda_intel firewire_core mfd_core crc_itu_t snd_hda_controller snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore parport_pc parport tpm_tis tpm acpi_cpufreq i915 video button drm_kms_helper drm
[  422.177525] CPU: 2 PID: 4442 Comm: gem_ctx_exec Not tainted 3.15.0-rc8_drm-intel-next-queued_57127e_20140707+ #292
[  422.179739] Hardware name:                  /DQ67SW, BIOS SWQ6710H.86A.0060.2011.1220.1805 12/20/2011
[  422.181953]  0000000000000000 0000000000000009 ffffffff81772baa 0000000000000000
[  422.184180]  ffffffff81036e54 0000000000000086 ffffffffa0082921 ffff88022fcbfc40
[  422.186404]  ffff88022f54b500 0000000000000004 ffff88022fbe7868 0000000000010000
[  422.188612] Call Trace:
[  422.190791]  [<ffffffff81772baa>] ? dump_stack+0x41/0x51
[  422.192973]  [<ffffffff81036e54>] ? warn_slowpath_common+0x78/0x90
[  422.195160]  [<ffffffffa0082921>] ? i915_gem_object_pin+0x9d/0x660 [i915]
[  422.197335]  [<ffffffffa0082921>] ? i915_gem_object_pin+0x9d/0x660 [i915]
[  422.199483]  [<ffffffffa0095853>] ? intel_ring_begin+0x2f/0x156 [i915]
[  422.201622]  [<ffffffffa00d9313>] ? i915_gem_execbuffer_reserve_vma.isra.11+0x8e/0x118 [i915]
[  422.203775]  [<ffffffffa0078dde>] ? i915_switch_context+0x164/0x496 [i915]
[  422.205913]  [<ffffffffa007ad53>] ? i915_gem_do_execbuffer.isra.13+0xd1f/0x11ff [i915]
[  422.208036]  [<ffffffff81113e28>] ? dput+0x19/0x13c
[  422.210152]  [<ffffffffa007b6f6>] ? i915_gem_execbuffer2+0x173/0x209 [i915]
[  422.212274]  [<ffffffffa0002f72>] ? drm_ioctl+0x25c/0x3ad [drm]
[  422.214388]  [<ffffffffa007b583>] ? i915_gem_execbuffer+0x350/0x350 [i915]
[  422.216488]  [<ffffffff81324532>] ? scnprintf+0x39/0x3e
[  422.218563]  [<ffffffff811109b7>] ? do_vfs_ioctl+0x3ec/0x435
[  422.220628]  [<ffffffff8111e73a>] ? simple_attr_release+0xd/0x11
[  422.222688]  [<ffffffff8104da8d>] ? task_work_run+0x78/0x87
[  422.224742]  [<ffffffff81110a49>] ? SyS_ioctl+0x49/0x78
[  422.226791]  [<ffffffff8109ac0d>] ? __audit_syscall_exit+0x209/0x225
[  422.228849]  [<ffffffff8177ea22>] ? system_call_fastpath+0x16/0x1b


==Reproduce steps==
---------------------------- 
1. ./gem_ctx_exec --run-subtest reset-pin-leak
Comment 1 Guo Jinxian 2014-09-12 02:38:20 UTC
The failure still able to reproduce on latest -nightly(72faa6a63351879b381bd9e4013f38bc94f11999) on BYT

root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./gem_caching --run-subtest read-writes
IGT-Version: 1.8-g107151c (x86_64) (Linux: 3.17.0-rc4_drm-intel-nightly_72faa6_20140911+ x86_64)
checking partial writes after partial reads
Test assertion failure function intel_batchbuffer_flush_on_ring, file intel_batchbuffer.c:180:
Failed assertion: (drm_intel_gem_bo_context_exec(batch->bo, ctx, used, ring)) == 0
Last errno: 22, Invalid argument
Subtest read-writes: FAIL (0.248s)
root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# dmesg -r|egrep "<[1-4]>"|grep drm
<4>[  435.635723] WARNING: CPU: 0 PID: 4368 at drivers/gpu/drm/i915/i915_gem.c:3503 i915_gem_object_pin+0x3d4/0x65d [i915]()
<4>[  435.635726] Modules linked in: dm_mod snd_hda_codec_hdmi iTCO_wdt iTCO_vendor_support snd_hda_codec_conexant snd_hda_codec_generic pcspkr snd_hda_intel snd_hda_controller i2c_i801 snd_hda_codec snd_hwdep r8169 snd_pcm lpc_ich mfd_core snd_timer snd soundcore iosf_mbi battery wmi ac acpi_cpufreq uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev i915 button video drm_kms_helper drm cfbfillrect cfbimgblt cfbcopyarea
<4>[  435.635765] CPU: 0 PID: 4368 Comm: gem_caching Not tainted 3.17.0-rc4_drm-intel-nightly_72faa6_20140911+ #2340
<4>[  435.636000]  [<ffffffffa001063c>] ? drm_ioctl+0x279/0x3bc [drm]
Comment 2 Guo Jinxian 2014-09-12 07:23:07 UTC
The dmesg warning is able to reproduce while running tests below:

igt/gem_userptr_blits/coherency-sync
igt/gem_userptr_blits/coherency-unsync
igt/gem_userptr_blits/forked-access
igt/gem_userptr_blits/forked-sync-interruptible
igt/gem_userptr_blits/forked-sync-mempressure-interruptible
igt/gem_userptr_blits/forked-sync-mempressure-normal
igt/gem_userptr_blits/forked-sync-multifd-interruptible
igt/gem_userptr_blits/forked-sync-multifd-mempressure-interruptible
igt/gem_userptr_blits/forked-sync-multifd-mempressure-normal
igt/gem_userptr_blits/forked-sync-multifd-normal
igt/gem_userptr_blits/forked-sync-normal
igt/gem_userptr_blits/forked-sync-swapping-interruptible
igt/gem_userptr_blits/forked-sync-swapping-mempressure-interruptible
igt/gem_userptr_blits/forked-sync-swapping-mempressure-normal
igt/gem_userptr_blits/forked-sync-swapping-multifd-interruptible
igt/gem_userptr_blits/forked-sync-swapping-multifd-mempressure-interruptible
igt/gem_userptr_blits/forked-sync-swapping-multifd-mempressure-normal
igt/gem_userptr_blits/forked-sync-swapping-multifd-normal
igt/gem_userptr_blits/forked-sync-swapping-normal
igt/gem_userptr_blits/forked-unsync-interruptible
igt/gem_userptr_blits/forked-unsync-mempressure-interruptible
igt/gem_userptr_blits/forked-unsync-mempressure-normal
igt/gem_userptr_blits/forked-unsync-multifd-interruptible
igt/gem_userptr_blits/forked-unsync-multifd-mempressure-interruptible
igt/gem_userptr_blits/forked-unsync-multifd-mempressure-normal
igt/gem_userptr_blits/forked-unsync-multifd-normal
igt/gem_userptr_blits/forked-unsync-normal
igt/gem_userptr_blits/forked-unsync-swapping-interruptible
igt/gem_userptr_blits/forked-unsync-swapping-mempressure-interruptible
igt/gem_userptr_blits/forked-unsync-swapping-mempressure-normal
igt/gem_userptr_blits/forked-unsync-swapping-multifd-interruptible
igt/gem_userptr_blits/forked-unsync-swapping-multifd-mempressure-interruptible
igt/gem_userptr_blits/forked-unsync-swapping-multifd-mempressure-normal
igt/gem_userptr_blits/forked-unsync-swapping-multifd-normal
igt/gem_userptr_blits/forked-unsync-swapping-normal
igt/gem_userptr_blits/major-normal-sync
igt/gem_userptr_blits/major-sync-interruptible
igt/gem_userptr_blits/major-unsync-interruptible
igt/gem_userptr_blits/major-unsync-normal
igt/gem_userptr_blits/minor-normal-sync
igt/gem_userptr_blits/minor-sync-interruptible
igt/gem_userptr_blits/minor-unsync-interruptible
igt/gem_userptr_blits/minor-unsync-normal
igt/gem_userptr_blits/process-exit-busy
igt/gem_userptr_blits/process-exit-gtt
igt/gem_userptr_blits/process-exit-gtt-busy
igt/gem_userptr_blits/sync-unmap
igt/gem_userptr_blits/sync-unmap-after-close
igt/gem_userptr_blits/sync-unmap-cycles
igt/gem_userptr_blits/unsync-unmap
igt/gem_userptr_blits/unsync-unmap-after-close
igt/gem_userptr_blits/unsync-unmap-cycles



root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./gem_userptr_blits --run-subtest coherency-sync
IGT-Version: 1.8-g107151c (x86_64) (Linux: 3.17.0-rc4_drm-intel-nightly_907d7b_20140912+ x86_64)
Aperture size is 2048 MiB
Total RAM is 3837 MiB
Testing unsynchronized mappings...
Testing synchronized mappings...
Using 2x1365 1MiB buffers
Verifying initialisation...
Cyclic blits cpu->gpu, forward...
Test assertion failure function copy, file gem_userptr_blits.c:205:
Failed assertion: ret == error
Last errno: 22, Invalid argument
Subtest coherency-sync: FAIL (6.122s)
root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# echo $?
99
root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# dmesg -r|egrep "<[1-4]>"|grep drm
<4>[  292.015925] WARNING: CPU: 0 PID: 4488 at drivers/gpu/drm/i915/i915_gem.c:3463 i915_gem_object_pin+0x3d4/0x65d [i915]()
<4>[  292.015928] Modules linked in: dm_mod snd_hda_codec_hdmi iTCO_wdt iTCO_vendor_support snd_hda_codec_conexant snd_hda_codec_generic pcspkr lpc_ich i2c_i801 mfd_core snd_hda_intel r8169 snd_hda_controller snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore iosf_mbi battery wmi ac acpi_cpufreq uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev i915 button video drm_kms_helper drm cfbfillrect cfbimgblt cfbcopyarea
<4>[  292.015968] CPU: 0 PID: 4488 Comm: gem_userptr_bli Not tainted 3.17.0-rc4_drm-intel-nightly_907d7b_20140912+ #2372
<4>[  292.016204]  [<ffffffffa001063c>] ? drm_ioctl+0x279/0x3bc [drm]
Comment 3 lu hua 2014-10-10 06:44:19 UTC
(In reply to Guo Jinxian from comment #2)
> The dmesg warning is able to reproduce while running tests below:
> 

Increasing priority, It impacts so many sub cases on BYT.
Comment 4 Rodrigo Vivi 2015-01-20 00:28:53 UTC
Is it still happening on BYT?

It seems to work find on my BDW here.
Comment 5 Ding Heng 2015-01-20 08:09:58 UTC
pass test on BYT with latest nightly commit. BYTM reported an different error in dmesg:

dmesg -r|egrep "<[1-4]>"|grep drm
<3>[10012.887265] [drm:__vlv_force_wake_get [i915]] *ERROR* Timed out: waiting for Render to ack.
<3>[10084.946310] [drm:__vlv_force_wake_get [i915]] *ERROR* Timed out: waiting for Render to ack.
<3>[10102.965082] [drm:__vlv_force_wake_get [i915]] *ERROR* Timed out: waiting for Render to ack.
<3>[10108.966156] [drm:__vlv_force_wake_get [i915]] *ERROR* Timed out: waiting for Render to ack.

should I reported a different bug?
Comment 6 Ding Heng 2015-01-20 08:10:24 UTC
Created attachment 112519 [details]
dmesg on byt-m
Comment 7 lu hua 2015-04-02 05:14:09 UTC
Test on BYT/BDW with the latest -nightly kernel. It works well.
Comment 8 lu hua 2015-04-02 05:14:45 UTC
Verified.Fixed.
Comment 9 Jari Tahvanainen 2017-07-03 12:28:50 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.