All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Hold task_struct ref for smoking kthread
@ 2018-10-02 13:29 Chris Wilson
  2018-10-02 13:53 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2018-10-02 13:29 UTC (permalink / raw)
  To: intel-gfx

As the kthread may terminate itself, the parent must hold a task_struct
reference for it to call kthread_stop().

<4> [498.827675] stack segment: 0000 [#1] PREEMPT SMP PTI
<4> [498.827683] CPU: 0 PID: 3872 Comm: drv_selftest Tainted: G     U            4.19.0-rc6-CI-CI_DRM_4915+ #1
<4> [498.827686] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS JYGLKCPX.86A.0027.2018.0125.1347 01/25/2018
<4> [498.827695] RIP: 0010:kthread_stop+0x36/0x210
<4> [498.827698] Code: 05 df 3d f6 7e 89 c0 48 0f a3 05 95 f8 29 01 0f 82 56 01 00 00 f0 ff 43 20 f6 43 26 20 0f 84 7f 01 00 00 48 8b ab b0 05 00 00 <f0> 80 4d 00 02 48 89 df e8 5d ff ff ff 48 89 df e8 15 c7 00 00 48
<4> [498.827701] RSP: 0018:ffffc900003937d0 EFLAGS: 00010202
<4> [498.827704] RAX: 0000000000000001 RBX: ffff8802165ece40 RCX: 0000000000000001
<4> [498.827707] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffff82247460
<4> [498.827709] RBP: 6b6b6b6b6b6b6b6b R08: 00000000581395cb R09: 0000000000000001
<4> [498.827711] R10: 0000000000000000 R11: 0000000000000000 R12: ffffc90000393868
<4> [498.827713] R13: ffffc900003937f0 R14: ffff88026c068040 R15: 0000000000001057
<4> [498.827716] FS:  00007fc0c464b980(0000) GS:ffff880277e00000(0000) knlGS:0000000000000000
<4> [498.827718] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4> [498.827720] CR2: 000056178c2feca0 CR3: 000000026983c000 CR4: 0000000000340ef0
<4> [498.827723] Call Trace:
<4> [498.827824]  smoke_crescendo+0x14c/0x1d0 [i915]
<4> [498.827837]  ? _raw_spin_unlock_irqrestore+0x4c/0x60
<4> [498.827898]  ? __i915_gem_context_pin_hw_id+0x69/0x5f0 [i915]
<4> [498.827902]  ? ida_alloc_range+0x1f2/0x3d0
<4> [498.827907]  ? __mutex_unlock_slowpath+0x46/0x2b0
<4> [498.827914]  ? rcu_lockdep_current_cpu_online+0x8f/0xd0
<4> [498.827979]  live_preempt_smoke+0x2c2/0x470 [i915]
<4> [498.828047]  __i915_subtests+0x5e/0xf0 [i915]
<4> [498.828113]  __run_selftests+0x10b/0x190 [i915]
<4> [498.828175]  i915_live_selftests+0x2c/0x60 [i915]
<4> [498.828232]  i915_pci_probe+0x50/0xa0 [i915]
<4> [498.828238]  pci_device_probe+0xa1/0x130
<4> [498.828244]  really_probe+0x25d/0x3c0
<4> [498.828249]  driver_probe_device+0x10a/0x120
<4> [498.828253]  __driver_attach+0xdb/0x100
<4> [498.828256]  ? driver_probe_device+0x120/0x120
<4> [498.828259]  bus_for_each_dev+0x74/0xc0
<4> [498.828264]  bus_add_driver+0x15f/0x250
<4> [498.828268]  ? 0xffffffffa00c3000
<4> [498.828271]  driver_register+0x56/0xe0
<4> [498.828274]  ? 0xffffffffa00c3000
<4> [498.828278]  do_one_initcall+0x58/0x2e0
<4> [498.828281]  ? rcu_lockdep_current_cpu_online+0x8f/0xd0
<4> [498.828285]  ? do_init_module+0x1d/0x1ea
<4> [498.828289]  ? rcu_read_lock_sched_held+0x6f/0x80
<4> [498.828293]  ? kmem_cache_alloc_trace+0x264/0x290
<4> [498.828297]  do_init_module+0x56/0x1ea
<4> [498.828302]  load_module+0x26f5/0x29d0
<4> [498.828309]  ? vfs_read+0x122/0x140
<4> [498.828318]  ? __se_sys_finit_module+0xd3/0xf0
<4> [498.828321]  __se_sys_finit_module+0xd3/0xf0
<4> [498.828329]  do_syscall_64+0x55/0x190
<4> [498.828332]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [498.828335] RIP: 0033:0x7fc0c3f16839

Fixes: 992d2098ef0b ("drm/i915/selftests: Split preemption smoke test into threads")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/selftests/intel_lrc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/selftests/intel_lrc.c b/drivers/gpu/drm/i915/selftests/intel_lrc.c
index 9f241d1c72db..94fc0e5c8766 100644
--- a/drivers/gpu/drm/i915/selftests/intel_lrc.c
+++ b/drivers/gpu/drm/i915/selftests/intel_lrc.c
@@ -696,6 +696,7 @@ static int smoke_crescendo(struct preempt_smoke *smoke, unsigned int flags)
 			err = PTR_ERR(tsk[id]);
 			break;
 		}
+		get_task_struct(tsk[id]);
 	}
 
 	count = 0;
@@ -710,6 +711,8 @@ static int smoke_crescendo(struct preempt_smoke *smoke, unsigned int flags)
 			err = status;
 
 		count += arg[id].count;
+
+		put_task_struct(tsk[id]);
 	}
 
 	mutex_lock(&smoke->i915->drm.struct_mutex);
-- 
2.19.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Hold task_struct ref for smoking kthread
  2018-10-02 13:29 [PATCH] drm/i915/selftests: Hold task_struct ref for smoking kthread Chris Wilson
@ 2018-10-02 13:53 ` Patchwork
  2018-10-02 14:12 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-10-02 13:53 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Hold task_struct ref for smoking kthread
URL   : https://patchwork.freedesktop.org/series/50441/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
35b442e8bb4d drm/i915/selftests: Hold task_struct ref for smoking kthread
-:10: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#10: 
<4> [498.827683] CPU: 0 PID: 3872 Comm: drv_selftest Tainted: G     U            4.19.0-rc6-CI-CI_DRM_4915+ #1

total: 0 errors, 1 warnings, 0 checks, 15 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/selftests: Hold task_struct ref for smoking kthread
  2018-10-02 13:29 [PATCH] drm/i915/selftests: Hold task_struct ref for smoking kthread Chris Wilson
  2018-10-02 13:53 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-10-02 14:12 ` Patchwork
  2018-10-03  6:24 ` ✗ Fi.CI.IGT: failure " Patchwork
  2018-10-03  8:05 ` [PATCH] " Tvrtko Ursulin
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-10-02 14:12 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Hold task_struct ref for smoking kthread
URL   : https://patchwork.freedesktop.org/series/50441/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4915 -> Patchwork_10325 =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_10325 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10325, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/50441/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10325:

  === IGT changes ===

    ==== Warnings ====

    igt@drv_selftest@live_guc:
      fi-glk-j4005:       SKIP -> PASS

    
== Known issues ==

  Here are the changes found in Patchwork_10325 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     PASS -> FAIL (fdo#103191, fdo#107362)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_coherency:
      fi-gdg-551:         DMESG-FAIL (fdo#107164) -> PASS

    igt@drv_selftest@live_execlists:
      fi-glk-j4005:       INCOMPLETE (fdo#103359, k.org#198133) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-skl-guc:         FAIL (fdo#103191) -> PASS

    
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (46 -> 43) ==

  Missing    (3): fi-bsw-cyan fi-byt-squawks fi-icl-u2 


== Build changes ==

    * Linux: CI_DRM_4915 -> Patchwork_10325

  CI_DRM_4915: 26e7a7d954a9c28b97af8ca7813f430fd9117232 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4660: d0975646c50568e66e65b44b81d28232d059b94e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10325: 35b442e8bb4d3172fa95d11937d6fc2c1be612ef @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

35b442e8bb4d drm/i915/selftests: Hold task_struct ref for smoking kthread

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10325/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* ✗ Fi.CI.IGT: failure for drm/i915/selftests: Hold task_struct ref for smoking kthread
  2018-10-02 13:29 [PATCH] drm/i915/selftests: Hold task_struct ref for smoking kthread Chris Wilson
  2018-10-02 13:53 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-10-02 14:12 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-10-03  6:24 ` Patchwork
  2018-10-03  9:56   ` Martin Peres
  2018-10-03  8:05 ` [PATCH] " Tvrtko Ursulin
  3 siblings, 1 reply; 7+ messages in thread
From: Patchwork @ 2018-10-03  6:24 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Hold task_struct ref for smoking kthread
URL   : https://patchwork.freedesktop.org/series/50441/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4915_full -> Patchwork_10325_full =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10325_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10325_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10325_full:

  === IGT changes ===

    ==== Possible regressions ====

    igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
      shard-glk:          PASS -> FAIL

    igt@kms_color@pipe-a-ctm-max:
      shard-apl:          PASS -> FAIL

    igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled:
      shard-skl:          PASS -> FAIL

    igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
      shard-skl:          NOTRUN -> FAIL

    
    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-snb:          SKIP -> PASS

    
== Known issues ==

  Here are the changes found in Patchwork_10325_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-skl:          PASS -> INCOMPLETE (fdo#106886)

    igt@gem_exec_schedule@pi-ringfull-bsd:
      shard-skl:          NOTRUN -> FAIL (fdo#103158)

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
      shard-skl:          NOTRUN -> DMESG-WARN (fdo#107956)

    igt@kms_chv_cursor_fail@pipe-a-256x256-left-edge:
      shard-skl:          PASS -> FAIL (fdo#104671)

    igt@kms_cursor_crc@cursor-256x256-onscreen:
      shard-apl:          PASS -> FAIL (fdo#103232)

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-apl:          PASS -> FAIL (fdo#103191, fdo#103232)

    igt@kms_cursor_crc@cursor-64x64-sliding:
      shard-glk:          PASS -> FAIL (fdo#103232) +2

    igt@kms_draw_crc@draw-method-xrgb2101010-mmap-cpu-xtiled:
      shard-skl:          PASS -> FAIL (fdo#103184)

    igt@kms_flip@flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#105363, fdo#102887)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-apl:          PASS -> FAIL (fdo#103167) +2

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
      shard-glk:          PASS -> FAIL (fdo#103167) +3

    igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-mmap-gtt:
      shard-skl:          PASS -> FAIL (fdo#105682)

    igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-pwrite:
      shard-skl:          PASS -> FAIL (fdo#103167) +2

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-glk:          PASS -> FAIL (fdo#103166) +1

    igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
      shard-apl:          PASS -> FAIL (fdo#103166)

    igt@kms_setmode@basic:
      shard-snb:          NOTRUN -> FAIL (fdo#99912)

    
    ==== Possible fixes ====

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          INCOMPLETE (fdo#106023, fdo#103665) -> PASS

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
      shard-kbl:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
      shard-snb:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_ccs@pipe-b-missing-ccs-buffer:
      shard-kbl:          DMESG-WARN (fdo#103558, fdo#105602) -> PASS +14

    igt@kms_color@pipe-b-ctm-max:
      shard-apl:          FAIL -> PASS

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-glk:          FAIL (fdo#103232) -> PASS

    igt@kms_cursor_crc@cursor-64x64-onscreen:
      shard-apl:          FAIL (fdo#103232) -> PASS

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-apl:          FAIL (fdo#103191, fdo#103232) -> PASS

    igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
      shard-glk:          DMESG-WARN (fdo#106538, fdo#105763) -> PASS

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#105363) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
      shard-glk:          FAIL (fdo#103167) -> PASS +3

    igt@kms_plane@plane-position-covered-pipe-a-planes:
      shard-glk:          FAIL (fdo#103166) -> PASS

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS

    
  fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
  fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
  fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (6 -> 6) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4915 -> Patchwork_10325

  CI_DRM_4915: 26e7a7d954a9c28b97af8ca7813f430fd9117232 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4660: d0975646c50568e66e65b44b81d28232d059b94e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10325: 35b442e8bb4d3172fa95d11937d6fc2c1be612ef @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10325/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/i915/selftests: Hold task_struct ref for smoking kthread
  2018-10-02 13:29 [PATCH] drm/i915/selftests: Hold task_struct ref for smoking kthread Chris Wilson
                   ` (2 preceding siblings ...)
  2018-10-03  6:24 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-10-03  8:05 ` Tvrtko Ursulin
  2018-10-03  8:08   ` Chris Wilson
  3 siblings, 1 reply; 7+ messages in thread
From: Tvrtko Ursulin @ 2018-10-03  8:05 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 02/10/2018 14:29, Chris Wilson wrote:
> As the kthread may terminate itself, the parent must hold a task_struct
> reference for it to call kthread_stop().
> 
> <4> [498.827675] stack segment: 0000 [#1] PREEMPT SMP PTI
> <4> [498.827683] CPU: 0 PID: 3872 Comm: drv_selftest Tainted: G     U            4.19.0-rc6-CI-CI_DRM_4915+ #1
> <4> [498.827686] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS JYGLKCPX.86A.0027.2018.0125.1347 01/25/2018
> <4> [498.827695] RIP: 0010:kthread_stop+0x36/0x210
> <4> [498.827698] Code: 05 df 3d f6 7e 89 c0 48 0f a3 05 95 f8 29 01 0f 82 56 01 00 00 f0 ff 43 20 f6 43 26 20 0f 84 7f 01 00 00 48 8b ab b0 05 00 00 <f0> 80 4d 00 02 48 89 df e8 5d ff ff ff 48 89 df e8 15 c7 00 00 48
> <4> [498.827701] RSP: 0018:ffffc900003937d0 EFLAGS: 00010202
> <4> [498.827704] RAX: 0000000000000001 RBX: ffff8802165ece40 RCX: 0000000000000001
> <4> [498.827707] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffff82247460
> <4> [498.827709] RBP: 6b6b6b6b6b6b6b6b R08: 00000000581395cb R09: 0000000000000001
> <4> [498.827711] R10: 0000000000000000 R11: 0000000000000000 R12: ffffc90000393868
> <4> [498.827713] R13: ffffc900003937f0 R14: ffff88026c068040 R15: 0000000000001057
> <4> [498.827716] FS:  00007fc0c464b980(0000) GS:ffff880277e00000(0000) knlGS:0000000000000000
> <4> [498.827718] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> <4> [498.827720] CR2: 000056178c2feca0 CR3: 000000026983c000 CR4: 0000000000340ef0
> <4> [498.827723] Call Trace:
> <4> [498.827824]  smoke_crescendo+0x14c/0x1d0 [i915]
> <4> [498.827837]  ? _raw_spin_unlock_irqrestore+0x4c/0x60
> <4> [498.827898]  ? __i915_gem_context_pin_hw_id+0x69/0x5f0 [i915]
> <4> [498.827902]  ? ida_alloc_range+0x1f2/0x3d0
> <4> [498.827907]  ? __mutex_unlock_slowpath+0x46/0x2b0
> <4> [498.827914]  ? rcu_lockdep_current_cpu_online+0x8f/0xd0
> <4> [498.827979]  live_preempt_smoke+0x2c2/0x470 [i915]
> <4> [498.828047]  __i915_subtests+0x5e/0xf0 [i915]
> <4> [498.828113]  __run_selftests+0x10b/0x190 [i915]
> <4> [498.828175]  i915_live_selftests+0x2c/0x60 [i915]
> <4> [498.828232]  i915_pci_probe+0x50/0xa0 [i915]
> <4> [498.828238]  pci_device_probe+0xa1/0x130
> <4> [498.828244]  really_probe+0x25d/0x3c0
> <4> [498.828249]  driver_probe_device+0x10a/0x120
> <4> [498.828253]  __driver_attach+0xdb/0x100
> <4> [498.828256]  ? driver_probe_device+0x120/0x120
> <4> [498.828259]  bus_for_each_dev+0x74/0xc0
> <4> [498.828264]  bus_add_driver+0x15f/0x250
> <4> [498.828268]  ? 0xffffffffa00c3000
> <4> [498.828271]  driver_register+0x56/0xe0
> <4> [498.828274]  ? 0xffffffffa00c3000
> <4> [498.828278]  do_one_initcall+0x58/0x2e0
> <4> [498.828281]  ? rcu_lockdep_current_cpu_online+0x8f/0xd0
> <4> [498.828285]  ? do_init_module+0x1d/0x1ea
> <4> [498.828289]  ? rcu_read_lock_sched_held+0x6f/0x80
> <4> [498.828293]  ? kmem_cache_alloc_trace+0x264/0x290
> <4> [498.828297]  do_init_module+0x56/0x1ea
> <4> [498.828302]  load_module+0x26f5/0x29d0
> <4> [498.828309]  ? vfs_read+0x122/0x140
> <4> [498.828318]  ? __se_sys_finit_module+0xd3/0xf0
> <4> [498.828321]  __se_sys_finit_module+0xd3/0xf0
> <4> [498.828329]  do_syscall_64+0x55/0x190
> <4> [498.828332]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
> <4> [498.828335] RIP: 0033:0x7fc0c3f16839
> 
> Fixes: 992d2098ef0b ("drm/i915/selftests: Split preemption smoke test into threads")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/selftests/intel_lrc.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/intel_lrc.c b/drivers/gpu/drm/i915/selftests/intel_lrc.c
> index 9f241d1c72db..94fc0e5c8766 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_lrc.c
> @@ -696,6 +696,7 @@ static int smoke_crescendo(struct preempt_smoke *smoke, unsigned int flags)
>   			err = PTR_ERR(tsk[id]);
>   			break;
>   		}
> +		get_task_struct(tsk[id]);
>   	}
>   
>   	count = 0;
> @@ -710,6 +711,8 @@ static int smoke_crescendo(struct preempt_smoke *smoke, unsigned int flags)
>   			err = status;
>   
>   		count += arg[id].count;
> +
> +		put_task_struct(tsk[id]);
>   	}
>   
>   	mutex_lock(&smoke->i915->drm.struct_mutex);
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/i915/selftests: Hold task_struct ref for smoking kthread
  2018-10-03  8:05 ` [PATCH] " Tvrtko Ursulin
@ 2018-10-03  8:08   ` Chris Wilson
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2018-10-03  8:08 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx

Quoting Tvrtko Ursulin (2018-10-03 09:05:07)
> 
> On 02/10/2018 14:29, Chris Wilson wrote:
> > As the kthread may terminate itself, the parent must hold a task_struct
> > reference for it to call kthread_stop().
> > 
> > <4> [498.827675] stack segment: 0000 [#1] PREEMPT SMP PTI
> > <4> [498.827683] CPU: 0 PID: 3872 Comm: drv_selftest Tainted: G     U            4.19.0-rc6-CI-CI_DRM_4915+ #1
> > <4> [498.827686] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS JYGLKCPX.86A.0027.2018.0125.1347 01/25/2018
> > <4> [498.827695] RIP: 0010:kthread_stop+0x36/0x210
> > <4> [498.827698] Code: 05 df 3d f6 7e 89 c0 48 0f a3 05 95 f8 29 01 0f 82 56 01 00 00 f0 ff 43 20 f6 43 26 20 0f 84 7f 01 00 00 48 8b ab b0 05 00 00 <f0> 80 4d 00 02 48 89 df e8 5d ff ff ff 48 89 df e8 15 c7 00 00 48
> > <4> [498.827701] RSP: 0018:ffffc900003937d0 EFLAGS: 00010202
> > <4> [498.827704] RAX: 0000000000000001 RBX: ffff8802165ece40 RCX: 0000000000000001
> > <4> [498.827707] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffff82247460
> > <4> [498.827709] RBP: 6b6b6b6b6b6b6b6b R08: 00000000581395cb R09: 0000000000000001
> > <4> [498.827711] R10: 0000000000000000 R11: 0000000000000000 R12: ffffc90000393868
> > <4> [498.827713] R13: ffffc900003937f0 R14: ffff88026c068040 R15: 0000000000001057
> > <4> [498.827716] FS:  00007fc0c464b980(0000) GS:ffff880277e00000(0000) knlGS:0000000000000000
> > <4> [498.827718] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > <4> [498.827720] CR2: 000056178c2feca0 CR3: 000000026983c000 CR4: 0000000000340ef0
> > <4> [498.827723] Call Trace:
> > <4> [498.827824]  smoke_crescendo+0x14c/0x1d0 [i915]
> > <4> [498.827837]  ? _raw_spin_unlock_irqrestore+0x4c/0x60
> > <4> [498.827898]  ? __i915_gem_context_pin_hw_id+0x69/0x5f0 [i915]
> > <4> [498.827902]  ? ida_alloc_range+0x1f2/0x3d0
> > <4> [498.827907]  ? __mutex_unlock_slowpath+0x46/0x2b0
> > <4> [498.827914]  ? rcu_lockdep_current_cpu_online+0x8f/0xd0
> > <4> [498.827979]  live_preempt_smoke+0x2c2/0x470 [i915]
> > <4> [498.828047]  __i915_subtests+0x5e/0xf0 [i915]
> > <4> [498.828113]  __run_selftests+0x10b/0x190 [i915]
> > <4> [498.828175]  i915_live_selftests+0x2c/0x60 [i915]
> > <4> [498.828232]  i915_pci_probe+0x50/0xa0 [i915]
> > <4> [498.828238]  pci_device_probe+0xa1/0x130
> > <4> [498.828244]  really_probe+0x25d/0x3c0
> > <4> [498.828249]  driver_probe_device+0x10a/0x120
> > <4> [498.828253]  __driver_attach+0xdb/0x100
> > <4> [498.828256]  ? driver_probe_device+0x120/0x120
> > <4> [498.828259]  bus_for_each_dev+0x74/0xc0
> > <4> [498.828264]  bus_add_driver+0x15f/0x250
> > <4> [498.828268]  ? 0xffffffffa00c3000
> > <4> [498.828271]  driver_register+0x56/0xe0
> > <4> [498.828274]  ? 0xffffffffa00c3000
> > <4> [498.828278]  do_one_initcall+0x58/0x2e0
> > <4> [498.828281]  ? rcu_lockdep_current_cpu_online+0x8f/0xd0
> > <4> [498.828285]  ? do_init_module+0x1d/0x1ea
> > <4> [498.828289]  ? rcu_read_lock_sched_held+0x6f/0x80
> > <4> [498.828293]  ? kmem_cache_alloc_trace+0x264/0x290
> > <4> [498.828297]  do_init_module+0x56/0x1ea
> > <4> [498.828302]  load_module+0x26f5/0x29d0
> > <4> [498.828309]  ? vfs_read+0x122/0x140
> > <4> [498.828318]  ? __se_sys_finit_module+0xd3/0xf0
> > <4> [498.828321]  __se_sys_finit_module+0xd3/0xf0
> > <4> [498.828329]  do_syscall_64+0x55/0x190
> > <4> [498.828332]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
> > <4> [498.828335] RIP: 0033:0x7fc0c3f16839
> > 
> > Fixes: 992d2098ef0b ("drm/i915/selftests: Split preemption smoke test into threads")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > ---
> >   drivers/gpu/drm/i915/selftests/intel_lrc.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/selftests/intel_lrc.c b/drivers/gpu/drm/i915/selftests/intel_lrc.c
> > index 9f241d1c72db..94fc0e5c8766 100644
> > --- a/drivers/gpu/drm/i915/selftests/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/selftests/intel_lrc.c
> > @@ -696,6 +696,7 @@ static int smoke_crescendo(struct preempt_smoke *smoke, unsigned int flags)
> >                       err = PTR_ERR(tsk[id]);
> >                       break;
> >               }
> > +             get_task_struct(tsk[id]);
> >       }
> >   
> >       count = 0;
> > @@ -710,6 +711,8 @@ static int smoke_crescendo(struct preempt_smoke *smoke, unsigned int flags)
> >                       err = status;
> >   
> >               count += arg[id].count;
> > +
> > +             put_task_struct(tsk[id]);
> >       }
> >   
> >       mutex_lock(&smoke->i915->drm.struct_mutex);
> > 
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Ta, fixed even before Martin or Tomi spotted the bug.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ✗ Fi.CI.IGT: failure for drm/i915/selftests: Hold task_struct ref for smoking kthread
  2018-10-03  6:24 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-10-03  9:56   ` Martin Peres
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Peres @ 2018-10-03  9:56 UTC (permalink / raw)
  To: intel-gfx



On 03/10/2018 09:24, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/selftests: Hold task_struct ref for smoking kthread
> URL   : https://patchwork.freedesktop.org/series/50441/
> State : failure
> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_4915_full -> Patchwork_10325_full =
> 
> == Summary - FAILURE ==
> 
>   Serious unknown changes coming with Patchwork_10325_full absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_10325_full, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   
> 
> == Possible new issues ==
> 
>   Here are the unknown changes that may have been introduced in Patchwork_10325_full:
> 
>   === IGT changes ===
> 
>     ==== Possible regressions ====
> 
>     igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
>       shard-glk:          PASS -> FAIL
> 
>     igt@kms_color@pipe-a-ctm-max:
>       shard-apl:          PASS -> FAIL

Known issue: https://bugs.freedesktop.org/show_bug.cgi?id=108147

> 
>     igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled:
>       shard-skl:          PASS -> FAIL
> 
>     igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
>       shard-skl:          NOTRUN -> FAIL

Known issue: https://bugs.freedesktop.org/show_bug.cgi?id=108146

Martin

> 
>     
>     ==== Warnings ====
> 
>     igt@pm_rc6_residency@rc6-accuracy:
>       shard-snb:          SKIP -> PASS
> 
>     
> == Known issues ==
> 
>   Here are the changes found in Patchwork_10325_full that come from known issues:
> 
>   === IGT changes ===
> 
>     ==== Issues hit ====
> 
>     igt@drv_suspend@shrink:
>       shard-skl:          PASS -> INCOMPLETE (fdo#106886)
> 
>     igt@gem_exec_schedule@pi-ringfull-bsd:
>       shard-skl:          NOTRUN -> FAIL (fdo#103158)
> 
>     igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
>       shard-skl:          NOTRUN -> DMESG-WARN (fdo#107956)
> 
>     igt@kms_chv_cursor_fail@pipe-a-256x256-left-edge:
>       shard-skl:          PASS -> FAIL (fdo#104671)
> 
>     igt@kms_cursor_crc@cursor-256x256-onscreen:
>       shard-apl:          PASS -> FAIL (fdo#103232)
> 
>     igt@kms_cursor_crc@cursor-256x256-suspend:
>       shard-apl:          PASS -> FAIL (fdo#103191, fdo#103232)
> 
>     igt@kms_cursor_crc@cursor-64x64-sliding:
>       shard-glk:          PASS -> FAIL (fdo#103232) +2
> 
>     igt@kms_draw_crc@draw-method-xrgb2101010-mmap-cpu-xtiled:
>       shard-skl:          PASS -> FAIL (fdo#103184)
> 
>     igt@kms_flip@flip-vs-expired-vblank:
>       shard-glk:          PASS -> FAIL (fdo#105363, fdo#102887)
> 
>     igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
>       shard-apl:          PASS -> FAIL (fdo#103167) +2
> 
>     igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
>       shard-glk:          PASS -> FAIL (fdo#103167) +3
> 
>     igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-mmap-gtt:
>       shard-skl:          PASS -> FAIL (fdo#105682)
> 
>     igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-pwrite:
>       shard-skl:          PASS -> FAIL (fdo#103167) +2
> 
>     igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
>       shard-kbl:          PASS -> INCOMPLETE (fdo#103665)
> 
>     igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
>       shard-glk:          PASS -> FAIL (fdo#103166) +1
> 
>     igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
>       shard-apl:          PASS -> FAIL (fdo#103166)
> 
>     igt@kms_setmode@basic:
>       shard-snb:          NOTRUN -> FAIL (fdo#99912)
> 
>     
>     ==== Possible fixes ====
> 
>     igt@gem_ppgtt@blt-vs-render-ctxn:
>       shard-kbl:          INCOMPLETE (fdo#106023, fdo#103665) -> PASS
> 
>     igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
>       shard-kbl:          DMESG-WARN (fdo#107956) -> PASS
> 
>     igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
>       shard-snb:          DMESG-WARN (fdo#107956) -> PASS
> 
>     igt@kms_ccs@pipe-b-missing-ccs-buffer:
>       shard-kbl:          DMESG-WARN (fdo#103558, fdo#105602) -> PASS +14
> 
>     igt@kms_color@pipe-b-ctm-max:
>       shard-apl:          FAIL -> PASS
> 
>     igt@kms_cursor_crc@cursor-128x128-suspend:
>       shard-glk:          FAIL (fdo#103232) -> PASS
> 
>     igt@kms_cursor_crc@cursor-64x64-onscreen:
>       shard-apl:          FAIL (fdo#103232) -> PASS
> 
>     igt@kms_cursor_crc@cursor-64x64-suspend:
>       shard-apl:          FAIL (fdo#103191, fdo#103232) -> PASS
> 
>     igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
>       shard-glk:          DMESG-WARN (fdo#106538, fdo#105763) -> PASS
> 
>     igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
>       shard-glk:          FAIL (fdo#105363) -> PASS
> 
>     igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
>       shard-glk:          FAIL (fdo#103167) -> PASS +3
> 
>     igt@kms_plane@plane-position-covered-pipe-a-planes:
>       shard-glk:          FAIL (fdo#103166) -> PASS
> 
>     igt@kms_setmode@basic:
>       shard-apl:          FAIL (fdo#99912) -> PASS
> 
>     
>   fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
>   fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
>   fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
>   fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
>   fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
>   fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
>   fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
>   fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
>   fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
>   fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
>   fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
>   fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
>   fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
>   fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
>   fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
>   fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
>   fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
>   fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
>   fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
> 
> 
> == Participating hosts (6 -> 6) ==
> 
>   No changes in participating hosts
> 
> 
> == Build changes ==
> 
>     * Linux: CI_DRM_4915 -> Patchwork_10325
> 
>   CI_DRM_4915: 26e7a7d954a9c28b97af8ca7813f430fd9117232 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_4660: d0975646c50568e66e65b44b81d28232d059b94e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_10325: 35b442e8bb4d3172fa95d11937d6fc2c1be612ef @ git://anongit.freedesktop.org/gfx-ci/linux
>   piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10325/shards.html
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-10-03  9:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 13:29 [PATCH] drm/i915/selftests: Hold task_struct ref for smoking kthread Chris Wilson
2018-10-02 13:53 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-10-02 14:12 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-03  6:24 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-10-03  9:56   ` Martin Peres
2018-10-03  8:05 ` [PATCH] " Tvrtko Ursulin
2018-10-03  8:08   ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.