[Intel-gfx] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:1262!

2015-01-04 Thread Marcin Ślusarz
On Sun, Jan 04, 2015 at 08:45:58PM +, Chris Wilson wrote:
> On Sun, Jan 04, 2015 at 03:33:05PM +0100, Marcin Ślusarz wrote:
> > [432102.923209] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:1262!
> > [432102.923237] invalid opcode:  [#1] PREEMPT SMP 
> > [432102.923262] Modules linked in: uas usb_storage dm_crypt ctr ccm arc4 
> > iwldvm mac80211 iwlwifi cfg80211 rfcomm bnep uvcvideo rtsx_usb 
> > videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev 
> > snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_codec_generic dell_laptop 
> > dell_wmi sparse_keymap snd_hda_intel snd_hda_controller snd_hda_codec 
> > dcdbas btusb snd_hwdep snd_pcm bluetooth snd_seq_midi snd_seq_midi_event 
> > x86_pkg_temp_thermal snd_rawmidi snd_seq coretemp ghash_clmulni_intel 
> > cryptd snd_timer snd_seq_device microcode snd soundcore serio_raw lpc_ich 
> > mac_hid parport_pc ppdev lp parport binfmt_misc hid_generic usbhid hid 
> > nouveau i915 psmouse mxm_wmi ttm i2c_algo_bit ahci libahci drm_kms_helper 
> > drm wmi video
> > [432102.923617] CPU: 2 PID: 45 Comm: kswapd0 Tainted: GW  
> > 3.17.0 #50
> > [432102.923650] Hardware name: Dell Inc.  Inspiron 7720/04M3YM, 
> > BIOS A07 08/16/2012
> > [432102.923685] task: 88013766a130 ti: 8801376c8000 task.ti: 
> > 8801376c8000
> > [432102.923719] RIP: 0010:[]  [] 
> > i915_wait_seqno+0x7c/0xa0 [i915]
> > [432102.923781] RSP: 0018:8801376cbaf8  EFLAGS: 00010246
> > [432102.923804] RAX: 0001 RBX: 88003287 RCX: 
> > 0018
> > [432102.923835] RDX: 88008d033908 RSI: 005c4f93 RDI: 
> > 880032872680
> > [432102.923870] RBP: 8801376cbb18 R08:  R09: 
> > 
> > [432102.923901] R10:  R11: ea402c80 R12: 
> > 880032872680
> > [432102.923932] R13: 88008d032c00 R14: 0001 R15: 
> > 88003287
> > [432102.923966] FS:  () GS:88013f28() 
> > knlGS:
> > [432102.924002] CS:  0010 DS:  ES:  CR0: 80050033
> > [432102.924030] CR2: 7f3d465dc000 CR3: 000102ada000 CR4: 
> > 001407e0
> > [432102.924073] Stack:
> > [432102.924087]  88008d032c00 88008d032cf0 88008d032c00 
> > 88003287
> > [432102.924133]  8801376cbb30 a0123627 88008d032c00 
> > 8801376cbb48
> > [432102.924169]  a0123664 880104b4b000 8801376cbb78 
> > a0126e48
> > [432102.924205] Call Trace:
> > [432102.924238]  [] 
> > i915_gem_object_wait_rendering+0x37/0x60 [i915]
> > [432102.924287]  [] 
> > i915_gem_object_finish_gpu.part.53+0x14/0x30 [i915]
> > [432102.924339]  [] i915_vma_unbind+0x118/0x240 [i915]
> > [432102.924380]  [] __i915_gem_shrink+0x1ec/0x2c0 [i915]
> > [432102.924422]  [] i915_gem_shrinker_scan+0x68/0xa0 
> > [i915]
> > [432102.924465]  [] shrink_slab_node+0x138/0x2f0
> > [432102.924494]  [] ? shrink_slab+0x3f/0x160
> > [432102.924521]  [] shrink_slab+0x8b/0x160
> > [432102.924548]  [] balance_pgdat+0x388/0x5a0
> > [432102.924575]  [] kswapd+0x180/0x470
> > [432102.924601]  [] ? prepare_to_wait_event+0x110/0x110
> > [432102.924635]  [] ? balance_pgdat+0x5a0/0x5a0
> > [432102.924670]  [] kthread+0xfc/0x120
> > [432102.924693]  [] ? kthread_create_on_node+0x230/0x230
> > [432102.924730]  [] ret_from_fork+0x7c/0xb0
> > [432102.924755]  [] ? kthread_create_on_node+0x230/0x230
> > [432102.924786] Code: 0f 1f 80 00 00 00 00 8b 93 a0 9d 00 00 41 0f b6 ce 44 
> > 89 ee 4c 89 e7 45 31 c9 45 31 c0 e8 ed ea ff ff 5b 41 5c 41 5d 41 5e 5d c3 
> > <0f> 0b 45 84 f6 74 13 8b 83 a0 9d 00 00 c1 f8 1f 83 e0 06 83 e8 
> > [432102.924965] RIP  [] i915_wait_seqno+0x7c/0xa0 [i915]
> > [432102.925104]  RSP 
> > [432102.935737] ---[ end trace 95ef281295f96d84 ]---
> > 
> > It's BUG_ON(!mutex_is_locked(>struct_mutex)) in i915_wait_seqno.
> > Warnings are from WARN_ON(!mutex_is_locked(>struct_mutex)) in
> > intel_fb_obj_invalidate.
> > 
> > dev->struct_mutex is locked from i915_gem_shrinker_scan, so something 
> > unlocks
> > it when we reach intel_fb_obj_invalidate/i915_wait_seqno.
> 
> What does 'grep DEBUG_MUTEXES .config' say?

CONFIG_DEBUG_MUTEXES=y

full config: http://people.freedesktop.org/~mslusarz/config.txt

Marcin


[Intel-gfx] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:1262!

2015-01-04 Thread Chris Wilson
On Sun, Jan 04, 2015 at 09:51:08PM +0100, Marcin Ślusarz wrote:
> On Sun, Jan 04, 2015 at 08:45:58PM +, Chris Wilson wrote:
> > On Sun, Jan 04, 2015 at 03:33:05PM +0100, Marcin Ślusarz wrote:
> > > [432102.923209] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:1262!
> > > [432102.923237] invalid opcode:  [#1] PREEMPT SMP 
> > > [432102.923262] Modules linked in: uas usb_storage dm_crypt ctr ccm arc4 
> > > iwldvm mac80211 iwlwifi cfg80211 rfcomm bnep uvcvideo rtsx_usb 
> > > videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev 
> > > snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_codec_generic dell_laptop 
> > > dell_wmi sparse_keymap snd_hda_intel snd_hda_controller snd_hda_codec 
> > > dcdbas btusb snd_hwdep snd_pcm bluetooth snd_seq_midi snd_seq_midi_event 
> > > x86_pkg_temp_thermal snd_rawmidi snd_seq coretemp ghash_clmulni_intel 
> > > cryptd snd_timer snd_seq_device microcode snd soundcore serio_raw lpc_ich 
> > > mac_hid parport_pc ppdev lp parport binfmt_misc hid_generic usbhid hid 
> > > nouveau i915 psmouse mxm_wmi ttm i2c_algo_bit ahci libahci drm_kms_helper 
> > > drm wmi video
> > > [432102.923617] CPU: 2 PID: 45 Comm: kswapd0 Tainted: GW  
> > > 3.17.0 #50
> > > [432102.923650] Hardware name: Dell Inc.  Inspiron 7720/04M3YM, 
> > > BIOS A07 08/16/2012
> > > [432102.923685] task: 88013766a130 ti: 8801376c8000 task.ti: 
> > > 8801376c8000
> > > [432102.923719] RIP: 0010:[]  [] 
> > > i915_wait_seqno+0x7c/0xa0 [i915]
> > > [432102.923781] RSP: 0018:8801376cbaf8  EFLAGS: 00010246
> > > [432102.923804] RAX: 0001 RBX: 88003287 RCX: 
> > > 0018
> > > [432102.923835] RDX: 88008d033908 RSI: 005c4f93 RDI: 
> > > 880032872680
> > > [432102.923870] RBP: 8801376cbb18 R08:  R09: 
> > > 
> > > [432102.923901] R10:  R11: ea402c80 R12: 
> > > 880032872680
> > > [432102.923932] R13: 88008d032c00 R14: 0001 R15: 
> > > 88003287
> > > [432102.923966] FS:  () GS:88013f28() 
> > > knlGS:
> > > [432102.924002] CS:  0010 DS:  ES:  CR0: 80050033
> > > [432102.924030] CR2: 7f3d465dc000 CR3: 000102ada000 CR4: 
> > > 001407e0
> > > [432102.924073] Stack:
> > > [432102.924087]  88008d032c00 88008d032cf0 88008d032c00 
> > > 88003287
> > > [432102.924133]  8801376cbb30 a0123627 88008d032c00 
> > > 8801376cbb48
> > > [432102.924169]  a0123664 880104b4b000 8801376cbb78 
> > > a0126e48
> > > [432102.924205] Call Trace:
> > > [432102.924238]  [] 
> > > i915_gem_object_wait_rendering+0x37/0x60 [i915]
> > > [432102.924287]  [] 
> > > i915_gem_object_finish_gpu.part.53+0x14/0x30 [i915]
> > > [432102.924339]  [] i915_vma_unbind+0x118/0x240 [i915]
> > > [432102.924380]  [] __i915_gem_shrink+0x1ec/0x2c0 [i915]
> > > [432102.924422]  [] i915_gem_shrinker_scan+0x68/0xa0 
> > > [i915]
> > > [432102.924465]  [] shrink_slab_node+0x138/0x2f0
> > > [432102.924494]  [] ? shrink_slab+0x3f/0x160
> > > [432102.924521]  [] shrink_slab+0x8b/0x160
> > > [432102.924548]  [] balance_pgdat+0x388/0x5a0
> > > [432102.924575]  [] kswapd+0x180/0x470
> > > [432102.924601]  [] ? prepare_to_wait_event+0x110/0x110
> > > [432102.924635]  [] ? balance_pgdat+0x5a0/0x5a0
> > > [432102.924670]  [] kthread+0xfc/0x120
> > > [432102.924693]  [] ? kthread_create_on_node+0x230/0x230
> > > [432102.924730]  [] ret_from_fork+0x7c/0xb0
> > > [432102.924755]  [] ? kthread_create_on_node+0x230/0x230
> > > [432102.924786] Code: 0f 1f 80 00 00 00 00 8b 93 a0 9d 00 00 41 0f b6 ce 
> > > 44 89 ee 4c 89 e7 45 31 c9 45 31 c0 e8 ed ea ff ff 5b 41 5c 41 5d 41 5e 
> > > 5d c3 <0f> 0b 45 84 f6 74 13 8b 83 a0 9d 00 00 c1 f8 1f 83 e0 06 83 e8 
> > > [432102.924965] RIP  [] i915_wait_seqno+0x7c/0xa0 [i915]
> > > [432102.925104]  RSP 
> > > [432102.935737] ---[ end trace 95ef281295f96d84 ]---
> > > 
> > > It's BUG_ON(!mutex_is_locked(>struct_mutex)) in i915_wait_seqno.
> > > Warnings are from WARN_ON(!mutex_is_locked(>struct_mutex)) in
> > > intel_fb_obj_invalidate.
> > > 
> > > dev->struct_mutex is locked from i915_gem_shrinker_scan, so something 
> > > unlocks
> > > it when we reach intel_fb_obj_invalidate/i915_wait_seqno.
> > 
> > What does 'grep DEBUG_MUTEXES .config' say?
> 
> CONFIG_DEBUG_MUTEXES=y

Please try:

http://lists.freedesktop.org/archives/intel-gfx/2015-January/058019.html
http://patchwork.freedesktop.org/patch/39708/

If possible, please try both patches (the one in the changelog and the
actual) separately. Thanks,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


[Intel-gfx] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:1262!

2015-01-04 Thread Chris Wilson
On Sun, Jan 04, 2015 at 03:33:05PM +0100, Marcin Ślusarz wrote:
> [432102.923209] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:1262!
> [432102.923237] invalid opcode:  [#1] PREEMPT SMP 
> [432102.923262] Modules linked in: uas usb_storage dm_crypt ctr ccm arc4 
> iwldvm mac80211 iwlwifi cfg80211 rfcomm bnep uvcvideo rtsx_usb 
> videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev 
> snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_codec_generic dell_laptop 
> dell_wmi sparse_keymap snd_hda_intel snd_hda_controller snd_hda_codec dcdbas 
> btusb snd_hwdep snd_pcm bluetooth snd_seq_midi snd_seq_midi_event 
> x86_pkg_temp_thermal snd_rawmidi snd_seq coretemp ghash_clmulni_intel cryptd 
> snd_timer snd_seq_device microcode snd soundcore serio_raw lpc_ich mac_hid 
> parport_pc ppdev lp parport binfmt_misc hid_generic usbhid hid nouveau i915 
> psmouse mxm_wmi ttm i2c_algo_bit ahci libahci drm_kms_helper drm wmi video
> [432102.923617] CPU: 2 PID: 45 Comm: kswapd0 Tainted: GW  3.17.0 
> #50
> [432102.923650] Hardware name: Dell Inc.  Inspiron 7720/04M3YM, BIOS 
> A07 08/16/2012
> [432102.923685] task: 88013766a130 ti: 8801376c8000 task.ti: 
> 8801376c8000
> [432102.923719] RIP: 0010:[]  [] 
> i915_wait_seqno+0x7c/0xa0 [i915]
> [432102.923781] RSP: 0018:8801376cbaf8  EFLAGS: 00010246
> [432102.923804] RAX: 0001 RBX: 88003287 RCX: 
> 0018
> [432102.923835] RDX: 88008d033908 RSI: 005c4f93 RDI: 
> 880032872680
> [432102.923870] RBP: 8801376cbb18 R08:  R09: 
> 
> [432102.923901] R10:  R11: ea402c80 R12: 
> 880032872680
> [432102.923932] R13: 88008d032c00 R14: 0001 R15: 
> 88003287
> [432102.923966] FS:  () GS:88013f28() 
> knlGS:
> [432102.924002] CS:  0010 DS:  ES:  CR0: 80050033
> [432102.924030] CR2: 7f3d465dc000 CR3: 000102ada000 CR4: 
> 001407e0
> [432102.924073] Stack:
> [432102.924087]  88008d032c00 88008d032cf0 88008d032c00 
> 88003287
> [432102.924133]  8801376cbb30 a0123627 88008d032c00 
> 8801376cbb48
> [432102.924169]  a0123664 880104b4b000 8801376cbb78 
> a0126e48
> [432102.924205] Call Trace:
> [432102.924238]  [] 
> i915_gem_object_wait_rendering+0x37/0x60 [i915]
> [432102.924287]  [] 
> i915_gem_object_finish_gpu.part.53+0x14/0x30 [i915]
> [432102.924339]  [] i915_vma_unbind+0x118/0x240 [i915]
> [432102.924380]  [] __i915_gem_shrink+0x1ec/0x2c0 [i915]
> [432102.924422]  [] i915_gem_shrinker_scan+0x68/0xa0 [i915]
> [432102.924465]  [] shrink_slab_node+0x138/0x2f0
> [432102.924494]  [] ? shrink_slab+0x3f/0x160
> [432102.924521]  [] shrink_slab+0x8b/0x160
> [432102.924548]  [] balance_pgdat+0x388/0x5a0
> [432102.924575]  [] kswapd+0x180/0x470
> [432102.924601]  [] ? prepare_to_wait_event+0x110/0x110
> [432102.924635]  [] ? balance_pgdat+0x5a0/0x5a0
> [432102.924670]  [] kthread+0xfc/0x120
> [432102.924693]  [] ? kthread_create_on_node+0x230/0x230
> [432102.924730]  [] ret_from_fork+0x7c/0xb0
> [432102.924755]  [] ? kthread_create_on_node+0x230/0x230
> [432102.924786] Code: 0f 1f 80 00 00 00 00 8b 93 a0 9d 00 00 41 0f b6 ce 44 
> 89 ee 4c 89 e7 45 31 c9 45 31 c0 e8 ed ea ff ff 5b 41 5c 41 5d 41 5e 5d c3 
> <0f> 0b 45 84 f6 74 13 8b 83 a0 9d 00 00 c1 f8 1f 83 e0 06 83 e8 
> [432102.924965] RIP  [] i915_wait_seqno+0x7c/0xa0 [i915]
> [432102.925104]  RSP 
> [432102.935737] ---[ end trace 95ef281295f96d84 ]---
> 
> It's BUG_ON(!mutex_is_locked(>struct_mutex)) in i915_wait_seqno.
> Warnings are from WARN_ON(!mutex_is_locked(>struct_mutex)) in
> intel_fb_obj_invalidate.
> 
> dev->struct_mutex is locked from i915_gem_shrinker_scan, so something unlocks
> it when we reach intel_fb_obj_invalidate/i915_wait_seqno.

What does 'grep DEBUG_MUTEXES .config' say?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre