Bug 73985 - [BYT and probably others] panic on module unload
Summary: [BYT and probably others] panic on module unload
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium minor
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-23 17:51 UTC by Jesse Barnes
Modified: 2017-07-24 22:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jesse Barnes 2014-01-23 17:51:28 UTC
[  160.975415] drm_kms_helper: drm: unregistered panic notifier
[  161.001979] [drm:gm45_get_vblank_counter], trying to get vblank count for disabled pipe B
[  161.002124] ------------[ cut here ]------------
[  161.002138] WARNING: CPU: 0 PID: 2114 at fs/sysfs/group.c:214 sysfs_remove_group+0xb9/0xc0()
[  161.002142] sysfs group c196f8c8 not found for kobject 'i2c-6'
[  161.002145] Modules linked in: coretemp kvm_intel kvm crc32_pclmul aesni_intel aes_i586 xts lrw gf128mul ablk_helper cryptd hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_magn_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf industrialio hid_sensor_iio_common snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event dm_multipath scsi_dh asix ppdev usbnet snd_rawmidi mii hid_sensor_hub microcode snd_seq rfcomm bnep snd_seq_device bluetooth snd_timer snd parport_pc binfmt_misc soundcore dw_dmac_pci dw_dmac_core mac_hid lp parport dm_mirror dm_region_hash dm_log hid_generic usbhid hid i915(O-) drm_kms_helper(O) igb dca ptp pps_core i2c_algo_bit drm(O) ahci libahci video
[  161.002233] CPU: 0 PID: 2114 Comm: rmmod Tainted: G        W  O 3.13.0-rc8+ #2
[  161.002236] Hardware name: NEXCOM VTC1010/Aptio CRB, BIOS 5.6.5 09/24/2013
[  161.002240]  00000000 00000000 dbe0fd0c c164c093 dbe0fd4c dbe0fd3c c10538de c185b368
[  161.002251]  dbe0fd68 00000842 c185531d 000000d6 c11d6759 c11d6759 00000000 c196f8c8
[  161.002261]  dfa1e0e4 dbe0fd54 c1053933 00000009 dbe0fd4c c185b368 dbe0fd68 dbe0fd7c
[  161.002272] Call Trace:
[  161.002281]  [<c164c093>] dump_stack+0x41/0x52
[  161.002289]  [<c10538de>] warn_slowpath_common+0x7e/0xa0
[  161.002295]  [<c11d6759>] ? sysfs_remove_group+0xb9/0xc0
[  161.002301]  [<c11d6759>] ? sysfs_remove_group+0xb9/0xc0
[  161.002307]  [<c1053933>] warn_slowpath_fmt+0x33/0x40
[  161.002313]  [<c11d6759>] sysfs_remove_group+0xb9/0xc0
[  161.002319]  [<c14122b7>] dpm_sysfs_remove+0x37/0x40
[  161.002326]  [<c1409544>] device_del+0x34/0x170
[  161.002332]  [<c14096a1>] device_unregister+0x21/0x60
[  161.002338]  [<c11d5b16>] ? sysfs_remove_link+0x16/0x30
[  161.002344]  [<c140dd62>] ? class_compat_remove_link+0x42/0x50
[  161.002351]  [<c14f972d>] i2c_del_adapter+0x1ad/0x2c0
[  161.002356]  [<c14f8090>] ? i2c_do_del_adapter+0xe0/0xe0
[  161.002364]  [<c115edbd>] ? kfree+0xcd/0x100
[  161.002409]  [<f84b595d>] intel_dp_encoder_destroy+0x1d/0x70 [i915]
[  161.002437]  [<f89ab43a>] drm_mode_config_cleanup+0x3a/0x210 [drm]
[  161.002476]  [<f84aa4ff>] intel_modeset_cleanup+0xbf/0xd0 [i915]
[  161.002504]  [<f84741f6>] i915_driver_unload+0x246/0x2f0 [i915]
[  161.002530]  [<f89a5443>] drm_dev_unregister+0x23/0x90 [drm]
[  161.002553]  [<f89a54ed>] drm_put_dev+0x3d/0x70 [drm]
[  161.002584]  [<f8470615>] i915_pci_remove+0x15/0x20 [i915]
[  161.002591]  [<c1338a6f>] pci_device_remove+0x2f/0xa0
[  161.002599]  [<c140c871>] __device_release_driver+0x61/0xc0
[  161.002606]  [<c140d12f>] driver_detach+0x8f/0xa0
[  161.002615]  [<c140c54f>] bus_remove_driver+0x4f/0xc0
[  161.002623]  [<c140d708>] driver_unregister+0x28/0x60
[  161.002629]  [<c10cee42>] ? stop_cpus+0x32/0x40
[  161.002636]  [<c10bd510>] ? module_refcount+0x90/0x90
[  161.002643]  [<c13378c5>] pci_unregister_driver+0x15/0x60
[  161.002669]  [<f89a739f>] drm_pci_exit+0x9f/0xb0 [drm]
[  161.002710]  [<f84e624a>] i915_exit+0x1b/0x1d [i915]
[  161.002716]  [<c10bf8a8>] SyS_delete_module+0x158/0x1f0
[  161.002724]  [<c1173d5d>] ? ____fput+0xd/0x10
[  161.002730]  [<c106f0fe>] ? task_work_run+0x7e/0xb0
[  161.002737]  [<c165a68d>] sysenter_do_call+0x12/0x28
[  161.002742] ---[ end trace 4481aff8e92a409c ]---
[  161.002792] [drm:intel_crtc_cursor_set], cursor off
[  161.002798] [drm:intel_crtc_cursor_set], cursor off
[  161.002860] ------------[ cut here ]------------
[  161.002869] Kernel BUG at f84861f8 [verbose debug info unavailable]
[  161.002875] invalid opcode: 0000 [#1] SMP 
[  161.002882] Modules linked in: coretemp kvm_intel kvm crc32_pclmul aesni_intel aes_i586 xts lrw gf128mul ablk_helper cryptd hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_magn_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf industrialio hid_sensor_iio_common snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event dm_multipath scsi_dh asix ppdev usbnet snd_rawmidi mii hid_sensor_hub microcode snd_seq rfcomm bnep snd_seq_device bluetooth snd_timer snd parport_pc binfmt_misc soundcore dw_dmac_pci dw_dmac_core mac_hid lp parport dm_mirror dm_region_hash dm_log hid_generic usbhid hid i915(O-) drm_kms_helper(O) igb dca ptp pps_core i2c_algo_bit drm(O) ahci libahci video
[  161.002991] CPU: 0 PID: 2114 Comm: rmmod Tainted: G        W  O 3.13.0-rc8+ #2
[  161.002997] Hardware name: NEXCOM VTC1010/Aptio CRB, BIOS 5.6.5 09/24/2013
[  161.003004] task: dbdd6800 ti: dbe0e000 task.ti: dbe0e000
[  161.003010] EIP: 0060:[<f84861f8>] EFLAGS: 00010246 CPU: 0
[  161.003044] EIP is at i915_gem_object_ggtt_unpin+0x88/0x90 [i915]
[  161.003050] EAX: dfce3840 EBX: 00000000 ECX: dfafd690 EDX: dfce3874
[  161.003056] ESI: c0086b40 EDI: df962e00 EBP: dbe0fe1c ESP: dbe0fe0c
[  161.003062]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[  161.003068] CR0: 8005003b CR2: b7718000 CR3: 1bec0000 CR4: 001007f0
[  161.003076] Stack:
[  161.003081]  00afc014 00000004 c0086b40 dfafc000 dbe0fe38 f8487e5a dfaa5400 c0086b40
[  161.003099]  dfafc000 dfaa5400 dfaa5414 dbe0fe58 f84741aa 00000000 f89c34b9 dfaa5414
[  161.003117]  dfaa5400 dfaa5400 f644b000 dbe0fe6c f89a5443 dfaa5400 f8505000 f644b000
[  161.003134] Call Trace:
[  161.003169]  [<f8487e5a>] i915_gem_context_fini+0xba/0x1c0 [i915]
[  161.003202]  [<f84741aa>] i915_driver_unload+0x1fa/0x2f0 [i915]
[  161.003232]  [<f89a5443>] drm_dev_unregister+0x23/0x90 [drm]
[  161.003259]  [<f89a54ed>] drm_put_dev+0x3d/0x70 [drm]
[  161.003294]  [<f8470615>] i915_pci_remove+0x15/0x20 [i915]
[  161.003306]  [<c1338a6f>] pci_device_remove+0x2f/0xa0
[  161.003317]  [<c140c871>] __device_release_driver+0x61/0xc0
[  161.003328]  [<c140d12f>] driver_detach+0x8f/0xa0
[  161.003341]  [<c140c54f>] bus_remove_driver+0x4f/0xc0
[  161.003353]  [<c140d708>] driver_unregister+0x28/0x60
[  161.003362]  [<c10cee42>] ? stop_cpus+0x32/0x40
[  161.003372]  [<c10bd510>] ? module_refcount+0x90/0x90
[  161.003383]  [<c13378c5>] pci_unregister_driver+0x15/0x60
[  161.003413]  [<f89a739f>] drm_pci_exit+0x9f/0xb0 [drm]
[  161.003458]  [<f84e624a>] i915_exit+0x1b/0x1d [i915]
[  161.003468]  [<c10bf8a8>] SyS_delete_module+0x158/0x1f0
[  161.003480]  [<c1173d5d>] ? ____fput+0xd/0x10
[  161.003488]  [<c106f0fe>] ? task_work_run+0x7e/0xb0
[  161.003499]  [<c165a68d>] sysenter_do_call+0x12/0x28
[  161.003505] Code: 0f b6 4d f3 8d 51 0f 83 e1 f0 83 e2 0f 09 d1 84 d2 88 48 54 75 07 80 a7 91 00 00 00 7f 83 c4 04 5b 5e 5f 5d c3 8d b6 00 00 00 00 <0f> 0b 8d b6 00 00 00 00 55 89 e5 57 56 53 83 ec 64 3e 8d 74 26
[  161.003586] EIP: [<f84861f8>] i915_gem_object_ggtt_unpin+0x88/0x90 [i915] SS:ESP 0068:dbe0fe0c
[  161.003626] ---[ end trace 4481aff8e92a409d ]---
Comment 1 Chris Wilson 2014-01-26 10:03:39 UTC
commit 9ba35767fb7766c543f932c4b633b32b386372c1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jan 23 19:40:02 2014 +0000

    drm/i915: Always pin the default context
    
    Through a twisty and circuituous path it is possible to currently trick
    the code into creating a default context and forgetting to pin it
    immediately into the GGTT. (This requires a system using contexts without
    an aliasing ppgtt, which is currently restricted to Baytrails machines
    manually specifying a module parameter to force enable contexts, or
    on Sandybridge and later that manually disable the aliasing ppgtt.) The
    consequence is that during module unload we attempt to unpin the default
    context twice and encounter a BUG remonstrating that we attempt to unpin
    an unbound object.
    
    [  161.002869] Kernel BUG at f84861f8 [verbose debug info unavailable]
    [  161.002875] invalid opcode: 0000 [#1] SMP
    [  161.002882] Modules linked in: coretemp kvm_intel kvm crc32_pclmul aesni_intel aes_i586 xts lrw gf128mul ablk_helper cryptd hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_magn_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf industrialio hid_sensor_iio_common snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event dm_multipath scsi_dh asix ppdev usbnet snd_rawmidi mii hid_sensor_hub microcode snd_seq rfcomm bnep snd_seq_device bluetooth snd_timer snd parport_pc binfmt_misc soundcore dw_dmac_pci dw_dmac_core mac_hid lp parport dm_mirror dm_region_hash dm_log hid_generic usbhid hid i915(O-) drm_kms_helper(O) igb dca ptp pps_core i2c_algo_bit drm(O) ahci libahci video
    [  161.002991] CPU: 0 PID: 2114 Comm: rmmod Tainted: G        W  O 3.13.0-rc8+ #2
    [  161.002997] Hardware name: NEXCOM VTC1010/Aptio CRB, BIOS 5.6.5 09/24/2013
    [  161.003004] task: dbdd6800 ti: dbe0e000 task.ti: dbe0e000
    [  161.003010] EIP: 0060:[<f84861f8>] EFLAGS: 00010246 CPU: 0
    [  161.003044] EIP is at i915_gem_object_ggtt_unpin+0x88/0x90 [i915]
    [  161.003050] EAX: dfce3840 EBX: 00000000 ECX: dfafd690 EDX: dfce3874
    [  161.003056] ESI: c0086b40 EDI: df962e00 EBP: dbe0fe1c ESP: dbe0fe0c
    [  161.003062]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    [  161.003068] CR0: 8005003b CR2: b7718000 CR3: 1bec0000 CR4: 001007f0
    [  161.003076] Stack:
    [  161.003081]  00afc014 00000004 c0086b40 dfafc000 dbe0fe38 f8487e5a dfaa5400 c0086b40
    [  161.003099]  dfafc000 dfaa5400 dfaa5414 dbe0fe58 f84741aa 00000000 f89c34b9 dfaa5414
    [  161.003117]  dfaa5400 dfaa5400 f644b000 dbe0fe6c f89a5443 dfaa5400 f8505000 f644b000
    [  161.003134] Call Trace:
    [  161.003169]  [<f8487e5a>] i915_gem_context_fini+0xba/0x1c0 [i915]
    [  161.003202]  [<f84741aa>] i915_driver_unload+0x1fa/0x2f0 [i915]
    [  161.003232]  [<f89a5443>] drm_dev_unregister+0x23/0x90 [drm]
    [  161.003259]  [<f89a54ed>] drm_put_dev+0x3d/0x70 [drm]
    [  161.003294]  [<f8470615>] i915_pci_remove+0x15/0x20 [i915]
    [  161.003306]  [<c1338a6f>] pci_device_remove+0x2f/0xa0
    [  161.003317]  [<c140c871>] __device_release_driver+0x61/0xc0
    [  161.003328]  [<c140d12f>] driver_detach+0x8f/0xa0
    [  161.003341]  [<c140c54f>] bus_remove_driver+0x4f/0xc0
    [  161.003353]  [<c140d708>] driver_unregister+0x28/0x60
    [  161.003362]  [<c10cee42>] ? stop_cpus+0x32/0x40
    [  161.003372]  [<c10bd510>] ? module_refcount+0x90/0x90
    [  161.003383]  [<c13378c5>] pci_unregister_driver+0x15/0x60
    [  161.003413]  [<f89a739f>] drm_pci_exit+0x9f/0xb0 [drm]
    [  161.003458]  [<f84e624a>] i915_exit+0x1b/0x1d [i915]
    [  161.003468]  [<c10bf8a8>] SyS_delete_module+0x158/0x1f0
    [  161.003480]  [<c1173d5d>] ? ____fput+0xd/0x10
    [  161.003488]  [<c106f0fe>] ? task_work_run+0x7e/0xb0
    [  161.003499]  [<c165a68d>] sysenter_do_call+0x12/0x28
    [  161.003505] Code: 0f b6 4d f3 8d 51 0f 83 e1 f0 83 e2 0f 09 d1 84 d2 88 48 54 75 07 80 a7 91 00 00 00 7f 83 c4 04 5b 5e 5f 5d c3 8d b6 00 00 00 00 <0f> 0b 8d b6 00 00 00 00 55 89 e5 57 56 53 83 ec 64 3e 8d 74 26
    [  161.003586] EIP: [<f84861f8>] i915_gem_object_ggtt_unpin+0x88/0x90 [i915] SS:ESP 0068:dbe0fe0c
    
    v2: Rename the local variable (is_default_ctx) to avoid confusion with
    the function is_default_ctx(). And correct Jesse's email address.
    
    Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73985
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
    Cc: Ben Widawsky <benjamin.widawsky@intel.com>
    Tested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>


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.