public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Store device pointer in contexts for late tracepoint usafe
Date: Mon, 29 Jun 2015 14:40:15 +0300	[thread overview]
Message-ID: <87mvziyc80.fsf@intel.com> (raw)
In-Reply-To: <20150507095725.GU22099@nuc-i3427.alporthouse.com>

On Thu, 07 May 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Wed, May 06, 2015 at 01:16:30PM +0200, Daniel Vetter wrote:
>> On Tue, May 05, 2015 at 09:17:29AM +0100, Chris Wilson wrote:
>> > [ 1572.417121] BUG: unable to handle kernel NULL pointer dereference at           (null)
>> > [ 1572.421010] IP: [<ffffffffa00b2514>] ftrace_raw_event_i915_context+0x5d/0x70 [i915]
>> > [ 1572.424970] PGD 1766a3067 PUD 1767a2067 PMD 0
>> > [ 1572.428892] Oops: 0000 [#1] SMP
>> > [ 1572.432787] Modules linked in: ipv6 dm_mod iTCO_wdt iTCO_vendor_support snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore serio_raw pcspkr lpc_ich i2c_i801 mfd_core battery ac acpi_cpufreq i915 button video drm_kms_helper drm
>> > [ 1572.441720] CPU: 2 PID: 18853 Comm: kworker/u8:0 Not tainted 4.0.0_kcloud_3f0360_20150429+ #588
>> > [ 1572.446298] Workqueue: i915 i915_gem_retire_work_handler [i915]
>> > [ 1572.450876] task: ffff880002f428f0 ti: ffff880035724000 task.ti: ffff880035724000
>> > [ 1572.455557] RIP: 0010:[<ffffffffa00b2514>]  [<ffffffffa00b2514>] ftrace_raw_event_i915_context+0x5d/0x70 [i915]
>> > [ 1572.460423] RSP: 0018:ffff880035727ce8  EFLAGS: 00010286
>> > [ 1572.465262] RAX: ffff880073f1643c RBX: ffff880002da9058 RCX: ffff880073e5db40
>> > [ 1572.470179] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880035727ce8
>> > [ 1572.475107] RBP: ffff88007bb11a00 R08: 0000000000000000 R09: 0000000000000000
>> > [ 1572.480034] R10: 0000000000362200 R11: 0000000000000008 R12: 0000000000000000
>> > [ 1572.484952] R13: ffff880035727d78 R14: ffff880002dc1c98 R15: ffff880002dc1dc8
>> > [ 1572.489886] FS:  0000000000000000(0000) GS:ffff88017fd00000(0000) knlGS:0000000000000000
>> > [ 1572.494883] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>> > [ 1572.499859] CR2: 0000000000000000 CR3: 000000017572a000 CR4: 00000000001006e0
>> > [ 1572.504842] Stack:
>> > [ 1572.509834]  ffff88017b0090c0 ffff880073f16438 ffff880002da9058 ffff880073f1643c
>> > [ 1572.514904]  0000000000000246 ffff880100000000 ffff88007bb11a00 ffff880002ddeb10
>> > [ 1572.519985]  ffff8801759f79c0 ffffffffa0092ff0 0000000000000000 ffff88007bb11a00
>> > [ 1572.525049] Call Trace:
>> > [ 1572.530093]  [<ffffffffa0092ff0>] ? i915_gem_context_free+0xa8/0xc1 [i915]
>> > [ 1572.535227]  [<ffffffffa009b969>] ? i915_gem_request_free+0x4e/0x50 [i915]
>> > [ 1572.540347]  [<ffffffffa00b5533>] ? intel_execlists_retire_requests+0x14c/0x159 [i915]
>> > [ 1572.545500]  [<ffffffffa009d9ea>] ? i915_gem_retire_requests+0x9d/0xeb [i915]
>> > [ 1572.550664]  [<ffffffffa009dd8c>] ? i915_gem_retire_work_handler+0x4c/0x61 [i915]
>> > [ 1572.555825]  [<ffffffff8104ca7f>] ? process_one_work+0x1b2/0x31d
>> > [ 1572.560951]  [<ffffffff8104d278>] ? worker_thread+0x24d/0x339
>> > [ 1572.566033]  [<ffffffff8104d02b>] ? cancel_delayed_work_sync+0xa/0xa
>> > [ 1572.571140]  [<ffffffff81050b25>] ? kthread+0xce/0xd6
>> > [ 1572.576191]  [<ffffffff81050a57>] ? kthread_create_on_node+0x162/0x162
>> > [ 1572.581228]  [<ffffffff8179b3c8>] ? ret_from_fork+0x58/0x90
>> > [ 1572.586259]  [<ffffffff81050a57>] ? kthread_create_on_node+0x162/0x162
>> > [ 1572.591318] Code: de 48 89 e7 e8 09 4d 00 e1 48 85 c0 74 27 48 89 68 10 48 8b 55 38 48 89 e7 48 89 50 18 48 8b 55 10 48 8b 12 48 8b 12 48 8b 52 38 <8b> 12 89 50 08 e8 95 4d 00 e1 48 83 c4 30 5b 5d 41 5c c3 41 55
>> > [ 1572.596981] RIP  [<ffffffffa00b2514>] ftrace_raw_event_i915_context+0x5d/0x70 [i915]
>> > [ 1572.602464]  RSP <ffff880035727ce8>
>> > [ 1572.607911] CR2: 0000000000000000
>> > 
>> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90112#c23
>> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> 
>> Could we do an igt for this, maybe using the sysfs trace interface?
>
> I wonder if it is as simple as:
>
> tracefs=/sys/kernel/tracing
>
> function set_tracing {
> 	for i in `find $tracefs/i915 -name enable`; do $i
> 		echo $1 > $i
> 	done
> 	echo $1 > $tracefs/enable
> }
>
> set_tracing 1
>
> ./gem_ctx_basic
> ./gem_foo_basic
> ./gem_bar_basic
> ./gem_baz_basic
>
> set_tracing 0

Is the patch still valid? Dropping from my fixes queue, please resubmit
if needed.

BR,
Jani.




> -Chris
>
> -- 
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-29 11:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05  8:17 [PATCH] drm/i915: Store device pointer in contexts for late tracepoint usafe Chris Wilson
2015-05-05 12:00 ` shuang.he
2015-05-06 11:16 ` Daniel Vetter
2015-05-07  9:57   ` Chris Wilson
2015-06-29 11:40     ` Jani Nikula [this message]
2015-06-29 11:41       ` Chris Wilson
2015-06-29 11:49         ` Jani Nikula
2015-07-09  9:41           ` Ceraolo Spurio, Daniele
2015-07-09 15:19             ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvziyc80.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox