Bug 100229 - Kernel 4.9.12 oops on Minnowboard Turbot using OpenCL
Summary: Kernel 4.9.12 oops on Minnowboard Turbot using OpenCL
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-16 11:42 UTC by Ismo Puustinen
Modified: 2017-03-28 11:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ismo Puustinen 2017-03-16 11:42:55 UTC
Our distribution updated the kernel from 4.9.6 to 4.9.12 on Minnowboard Turbot, and kernel started oopsing during OpenCL tests. This only happens when running Minnowboard on recent firmware versions (on firmware version 94 there is the oops, but when using old version, such as 90, everything works). Bug appears to be 100% deterministic. It happens when doing any OpenCL operations, such as using OpenCV in OpenCL mode or running ViennaCL benchmarks or even asking for device info. We are using Beignet to implement the OpenCL API.

The following oops was captured when setting OpenCV in OpenCL mode:

root@intel-corei7-64:~# python3
Python 3.5.2 (default, Mar 14 2017, 07:39:30) 
[GCC 6.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.ocl.setUseOpenCL(True)
[   89.782300] BUG: unable to handle kernel paging request at 0000000fffffffe8
[   89.790366] IP: [<ffffffff8158bcec>] i915_vma_unbind+0xac/0x310
[   89.797096] PGD 720ff067 [   89.799868] PUD 0 
[   89.802153] 
[   89.803842] Oops: 0002 [#1] PREEMPT SMP
[   89.808190] Modules linked in: xt_connmark iptable_nat nf_nat_ipv4 nf_nat iptable_mangle snd_hda_codec_hdmi intel_rapl intel_soc_dts_iosf intel_powerclamp coretemp efivars snd_hda_intel mei_txe mei snd_hda_codec snd_hda_core snd_intel_sst_acpi snd_soc_rt5645 snd_intel_sst_core snd_soc_rt5640 snd_soc_sst_mfld_platform snd_soc_rl6231 snd_soc_sst_match snd_soc_core dw_dmac spi_pxa2xx_platform i2c_designware_platform i2c_designware_core snd_compress ac97_bus snd_pcm snd_timer pwm_lpss_platform pwm_lpss nf_conntrack_ipv6 nf_conntrack_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp xt_conntrack nf_conntrack uio iptable_filter ip_tables iwlwifi ip6table_filter cfg80211 ip6_tables x_tables
[   89.876894] CPU: 1 PID: 569 Comm: python3 Not tainted 4.9.12-yocto-standard #1
[   89.885081] Hardware name: ADI Minnowboard Turbot D0 PLATFORM/MinnowBoard Turbot, BIOS MNW2MAX1.X64.0094.R01.1612052239 12/05/2016
[   89.898390] task: ffff8800723a0b00 task.stack: ffffc9000144c000
[   89.905099] RIP: 0010:[<ffffffff8158bcec>]  [<ffffffff8158bcec>] i915_vma_unbind+0xac/0x310
[   89.914582] RSP: 0018:ffffc9000144fa98  EFLAGS: 00010282
[   89.920602] RAX: ffff880075652368 RBX: 0000000000000000 RCX: ffff880075453b90
[   89.928690] RDX: ffff880075453b98 RSI: 0000000fffffffe0 RDI: ffff880075678020
[   89.936778] RBP: ffffc9000144fad8 R08: 0000000000000000 R09: ffff8800754535f8
[   89.944866] R10: ffffc9000144fbd0 R11: ffff880075453a20 R12: ffff880076d46800
[   89.952953] R13: 0000000000000000 R14: 0000000000000a84 R15: ffff880075453a00
[   89.961042] FS:  00007fb0a92c0700(0000) GS:ffff880078080000(0000) knlGS:0000000000000000
[   89.970212] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   89.976724] CR2: 0000000fffffffe8 CR3: 000000007204d000 CR4: 00000000001006e0
[   89.984811] Stack:
[   89.987088]  ffff88007541f110 ffffffff813fe14f ffffc9000144faf8 ffff880075443a00
[   89.995518]  ffff880076d46800 ffff88007566e100 0000000000000a84 ffff880076d46800
[   90.003947]  ffffc9000144faf8 ffffffff8156d962 0000000000010000 000000007fff0000
[   90.012375] Call Trace:
[   90.015152]  [<ffffffff813fe14f>] ? radix_tree_node_alloc+0x4f/0x90
[   90.022262]  [<ffffffff8156d962>] i915_gem_evict_for_vma+0x52/0xb0
[   90.029271]  [<ffffffff8158bb11>] __i915_vma_do_pin+0x3e1/0x450
[   90.035986]  [<ffffffff8156dce4>] i915_gem_execbuffer_reserve_vma.isra.29+0x144/0x1b0
[   90.044867]  [<ffffffff8156e0d0>] i915_gem_execbuffer_reserve.isra.30+0x380/0x3a0
[   90.053354]  [<ffffffff8156f6b8>] i915_gem_do_execbuffer.isra.36+0x618/0x17c0
[   90.061447]  [<ffffffff8162e8c0>] ? dma_fence_context_alloc+0x20/0x20
[   90.068750]  [<ffffffff813fe853>] ? radix_tree_lookup_slot+0x13/0x30
[   90.075956]  [<ffffffff8114a416>] ? find_get_entry+0xc6/0xf0
[   90.086488]  [<ffffffff81570be5>] i915_gem_execbuffer2+0xa5/0x220
[   90.097462]  [<ffffffff8151dcda>] drm_ioctl+0x1ea/0x460
[   90.107402]  [<ffffffff81570b40>] ? i915_gem_execbuffer+0x2e0/0x2e0
[   90.118537]  [<ffffffff8117b092>] ? handle_mm_fault+0x4b2/0xe20
[   90.129268]  [<ffffffff8119c2eb>] ? kmem_cache_alloc+0x19b/0x1b0
[   90.140083]  [<ffffffff8119c2eb>] ? kmem_cache_alloc+0x19b/0x1b0
[   90.150867]  [<ffffffff811c09f4>] do_vfs_ioctl+0x94/0x5c0
[   90.160977]  [<ffffffff8104a6e7>] ? __do_page_fault+0x277/0x4e0
[   90.171679]  [<ffffffff811c0f99>] SyS_ioctl+0x79/0x90
[   90.181325]  [<ffffffff81997460>] entry_SYSCALL_64_fastpath+0x13/0x94
[   90.192479] Code: 3f ff ff ff 4c 89 ff e8 b3 8a f9 ff 49 8b 47 70 49 8d 8f 90 01 00 00 49 8b 97 98 01 00 00 49 8b b7 90 01 00 00 48 05 58 03 00 00 <48> 89 56 08 48 89 32 48 8b 50 08 48 89 48 08 49 89 87 90 01 00 
[   90.222327] RIP  [<ffffffff8158bcec>] i915_vma_unbind+0xac/0x310
[   90.233220]  RSP <ffffc9000144fa98>
[   90.241180] CR2: 0000000fffffffe8
[   90.249074] ---[ end trace ec084e4d41b9bb6c ]---
Comment 1 Chris Wilson 2017-03-16 11:46:07 UTC
See commit 172ae5b4c8c104af56804bf2406014849ed6fa37
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Dec 5 14:29:37 2016 +0000

    drm/i915: Fix i915_gem_evict_for_vma (soft-pinning)
Comment 2 yann 2017-03-16 12:36:35 UTC
Ismo Puustinen, the sha1 Chris is pointing should fix the issue. Please re-test with latest kernel and mark as REOPENED if you can reproduce (and attach fresh kernel log) and RESOLVED/* if you cannot reproduce.
Comment 3 Ismo Puustinen 2017-03-28 11:19:23 UTC
Works with latest drm, thanks!


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.