[i915] Kernel crashed in vma_create when running Xorg

Bug #1901563 reported by Bjørn Rustad
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Linux
Unknown
Unknown
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I've just upgraded to 20.10. After logging in and using PyCharm for a while, the system froze, and I had to do a REISUB. It turned out to be a kernel panic and seems related to Xorg and the i915 driver.

This has now happened multiple times, and not all crashes have happened while using PyCharm.

I've tried using the ppa:canonical-kernel-team/ppa to install a new kernel (5.8.0-26-generic) but that did not help.

[ 1620.425014] general protection fault, probably for non-canonical address 0xe296718293aa0a0a: 0000 [#1] SMP PTI
[ 1620.425017] CPU: 2 PID: 1749 Comm: Xorg Tainted: G W 5.8.0-26-generic #27-Ubuntu
[ 1620.425018] Hardware name: Dell Inc. XPS 13 9370/0F6P3V, BIOS 1.2.1 02/21/2018
[ 1620.425023] RIP: 0010:kmem_cache_alloc+0x7e/0x230
[ 1620.425025] Code: 95 01 00 00 4d 8b 07 65 49 8b 50 08 65 4c 03 05 a0 59 33 4d 4d 8b 20 4d 85 e4 0f 84 81 01 00 00 41 8b 47 20 49 8b 3f 4c 01 e0 <48> 8b 18 48 89 c1 49 33 9f 70 01 00 00 4c 89 e0 48 0f c9 48 31 cb
[ 1620.425026] RSP: 0018:ffffb1f6c19e79b0 EFLAGS: 00010286
[ 1620.425028] RAX: e296718293aa0a0a RBX: 0000000000000000 RCX: 0000000000000002
[ 1620.425029] RDX: 0000000000007d5e RSI: 0000000000000dc0 RDI: 0000441461604a80
[ 1620.425031] RBP: ffffb1f6c19e79e0 R08: ffffd1f6bfc84a80 R09: 0000000000000000
[ 1620.425032] R10: 0000000000000000 R11: ffff8de1eca2f6c2 R12: e296718293aa08b2
[ 1620.425033] R13: 0000000000000dc0 R14: ffff8de2488364c0 R15: ffff8de2488364c0
[ 1620.425034] FS: 00007fe9c3b52a40(0000) GS:ffff8de25e680000(0000) knlGS:0000000000000000
[ 1620.425035] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1620.425037] CR2: 00007f6c1433c000 CR3: 0000000488622001 CR4: 00000000003606e0
[ 1620.425038] Call Trace:
[ 1620.425087] ? vma_create+0x30/0x460 [i915]
[ 1620.425122] vma_create+0x30/0x460 [i915]
[ 1620.425124] ? mutex_lock+0x13/0x40
[ 1620.425157] i915_vma_instance+0xd2/0xe0 [i915]
[ 1620.425187] eb_lookup_vma+0xd7/0x1c0 [i915]
[ 1620.425217] eb_lookup_vmas+0x79/0x200 [i915]
[ 1620.425247] eb_relocate+0x18/0x1b0 [i915]
[ 1620.425275] i915_gem_do_execbuffer+0x265/0x8d0 [i915]
[ 1620.425278] ? enqueue_task_fair+0x159/0x590
[ 1620.425282] ? __radix_tree_replace+0x4a/0xe0
[ 1620.425285] ? _cond_resched+0x1a/0x50
[ 1620.425287] ? kmem_cache_alloc_trace+0x168/0x240
[ 1620.425290] ? __kmalloc_node+0x201/0x300
[ 1620.425320] i915_gem_execbuffer2_ioctl+0x237/0x4a0 [i915]
[ 1620.425348] ? intel_engines_add_sysfs+0x150/0x150 [i915]
[ 1620.425350] ? radix_tree_lookup+0xd/0x10
[ 1620.425379] ? i915_gem_execbuffer_ioctl+0x2e0/0x2e0 [i915]
[ 1620.425395] drm_ioctl_kernel+0xae/0xf0 [drm]
[ 1620.425406] drm_ioctl+0x238/0x3d0 [drm]
[ 1620.425434] ? i915_gem_execbuffer_ioctl+0x2e0/0x2e0 [i915]
[ 1620.425437] ? fput+0x13/0x15
[ 1620.425440] ? __sys_recvmsg+0x94/0xb0
[ 1620.425442] ksys_ioctl+0x8e/0xc0
[ 1620.425444] __x64_sys_ioctl+0x1a/0x20
[ 1620.425447] do_syscall_64+0x49/0xc0
[ 1620.425449] entry_SYSCALL_64_after_hwframe+0x44/0xa9

ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: xorg 1:7.7+19ubuntu15
ProcVersionSignature: Ubuntu 5.8.0-26.27-generic 5.8.14
Uname: Linux 5.8.0-26-generic x86_64
.tmp.unity_support_test.0:

ApportVersion: 2.20.11-0ubuntu50
Architecture: amd64
CasperMD5CheckResult: skip
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: None
CurrentDesktop: GNOME-Flashback:GNOME
Date: Mon Oct 26 16:33:28 2020
DistUpgraded: 2020-10-23 13:15:10,351 DEBUG Running PostInstallScript: './xorg_fix_proprietary.py'
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-xenial-amd64-20160624-2
DistroCodename: groovy
DistroVariant: ubuntu
EcryptfsInUse: Yes
ExtraDebuggingInterest: Yes
GpuHangFrequency: Several times a day
GpuHangReproducibility: Seems to happen randomly
GpuHangStarted: Immediately after installing this version of Ubuntu
GraphicsCard:
 Intel Corporation UHD Graphics 620 [8086:5917] (rev 07) (prog-if 00 [VGA controller])
   Subsystem: Dell UHD Graphics 620 [1028:07e6]
InstallationDate: Installed on 2018-05-04 (906 days ago)
InstallationMedia: Ubuntu 16.04 "Xenial" - Build amd64 LIVE Binary 20160624-10:47
MachineType: Dell Inc. XPS 13 9370
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.8.0-26-generic root=UUID=4e0782c5-5436-4e47-9813-0946aea670c3 ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
Title: Xorg freeze
UpgradeStatus: Upgraded to groovy on 2020-10-23 (3 days ago)
dmi.bios.date: 02/21/2018
dmi.bios.release: 1.2
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.2.1
dmi.board.name: 0F6P3V
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.2.1:bd02/21/2018:br1.2:svnDellInc.:pnXPS139370:pvr:rvnDellInc.:rn0F6P3V:rvrA00:cvnDellInc.:ct9:cvr:
dmi.product.family: XPS
dmi.product.name: XPS 13 9370
dmi.product.sku: 07E6
dmi.sys.vendor: Dell Inc.
version.compiz: compiz 1:0.9.14.1+20.10.20200813-0ubuntu1
version.libdrm2: libdrm2 2.4.102-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 20.2.1-1
version.libgl1-mesa-glx: libgl1-mesa-glx 20.2.1-1
version.xserver-xorg-core: xserver-xorg-core 2:1.20.9-2ubuntu1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.10.6-2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20200714-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1
xserver.bootTime: Mon Oct 26 16:16:27 2020
xserver.configfile: default
xserver.errors:

xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
 product id 5252
 vendor SHP
xserver.version: 2:1.20.9-2ubuntu1

Revision history for this message
Bjørn Rustad (therealburk) wrote :
description: updated
affects: ubuntu → xorg (Ubuntu)
Revision history for this message
Bjørn Rustad (therealburk) wrote :

This seems very relevant, with similar symptoms, logs and even mentions of PyCharm: https://gitlab.freedesktop.org/drm/intel/-/issues/1201 although no solution.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Your kernel log mentions:

[ 618.131916] i915 0000:00:02.0: [drm] *ERROR* Atomic update failure on pipe B (start=36634 end=36635) time 217 us, min 1431, max 1439, scanline start 1421, end 1440

which I think can only happen in Xorg sessions.

Try selecting 'Ubuntu on Wayland' from the login screen before you enter your password.

affects: xorg (Ubuntu) → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Bjørn Rustad (therealburk) wrote : Re: Kernel panic - Xorg tainted - i915

Thanks Daniel. I'll try that. I was using Gnome Flashback, but I can probably get used to this look as well.

Revision history for this message
Amarandi (amarandi) wrote :

Hello guys, after a hard work of finding this topic I can confirm this bug, too.

Notebook: Dell XPS 15 9560
Kernel: 5.8.0-26-generic
Distributor: Ubuntu 20.10

I am using IntelliJ IDEA which is similar to PyCharm. I also can only REISUB my whole system which is really annoying.

Please tell me if I can help with providing any other informations.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Try selecting 'Ubuntu on Wayland' from the login screen before you enter your password.

summary: - Kernel panic - Xorg tainted - i915
+ [i915] Kernel crashed in vma_create when running Xorg
Revision history for this message
Amarandi (amarandi) wrote :

Thanks for that tipp Daniel. I am using the i3wm window manager and my complete development routine belongs to that, so for me it isnt an option to use Wayland or switch to Sway.

I have downgraded my kernel to 5.4.74-050474-generic and hope everything is working until a solution was found.

Revision history for this message
Bernd Schubert (aakef) wrote :

Happens for me as well, using xfce4 (so wayland is not a simple option) and I don't use anything like pycharm.

Revision history for this message
Bernd Schubert (aakef) wrote :

The traces in https://gitlab.freedesktop.org/drm/intel/-/issues/1201 look entirely different, so I'm not sure if this is related. Here we have

[ 1620.425038] Call Trace:
[ 1620.425087] ? vma_create+0x30/0x460 [i915]
[ 1620.425122] vma_create+0x30/0x460 [i915]
[ 1620.425124] ? mutex_lock+0x13/0x40
[ 1620.425157] i915_vma_instance+0xd2/0xe0 [i915]
[ 1620.425187] eb_lookup_vma+0xd7/0x1c0 [i915]
[ 1620.425217] eb_lookup_vmas+0x79/0x200 [i915]

Issue 1201 from freedesktop.org has

Mar 06 22:36:00 ai-karellen-lap kernel: i915_gem_gtt_insert+0x174/0x250 [i915]
Mar 06 22:36:00 ai-karellen-lap kernel: i915_vma_pin+0x62f/0x6f0 [i915]
Mar 06 22:36:00 ai-karellen-lap kernel: i915_gem_object_pin+0x12d/0x1a0 [i915]
Mar 06 22:36:00 ai-karellen-lap kernel: i915_gem_object_pin_to_display_plane+0xa9/0xf0 [i915]
Mar 06 22:36:00 ai-karellen-lap kernel: intel_pin_and_fence_fb_obj+0x9d/0x1c0 [i915]
Mar 06 22:36:00 ai-karellen-lap kernel: intel_plane_pin_fb+0x44/0xd0 [i915]
Mar 06 22:36:00 ai-karellen-lap kernel: intel_prepare_plane_fb+0xe0/0x310 [i915]

Revision history for this message
Bernd Schubert (aakef) wrote :
Revision history for this message
Bjørn Rustad (therealburk) wrote :

Thanks for opening the issue Bernd. I haven't inspected kernel stack traces before, so in my eyes they looked similar :-)

The issue has not occurred since I switched to Wayland.

Revision history for this message
Bernd Schubert (aakef) wrote :

I'm actually going to close the upstream issue - I'm still not clear on the root cause - it is a slab/kmem cache issue, but I don't which subsystem is responsible for it. It might get visible on opening various kernel debug options, but it requires to recompile and also slows down the system dramatically, unfortunately I don't have the time for that :( Especially as the issue went away after installing the linux-5.9.3 kernel. I guess switching to wayland just avoid the trigger, but the 5.8 kernel seems to have a bad bug.

Revision history for this message
Bjørn Rustad (therealburk) wrote :

I'd be willing to try re-compiling with some extra options, for the learning experience, but I'd need some pointers on what to do/what options to enable. I've compiled the kernel before but that was a while ago, and I have no clue what options would be useful.

Revision history for this message
Niklas (niklas975) wrote :

Also affects my Lenovo Thinkpad T480s Notebook

Revision history for this message
John Magdy Lotfy (zorono) wrote :

it also happens with my HP Probook 4540s
My Laptop gets frozen fully!! even the mouse and keyboard and those Gnome parts like clock....

Changed in linux (Ubuntu):
status: Confirmed → Opinion
status: Opinion → Confirmed
Revision history for this message
Carlo Federico Vescovo (cfv) wrote :

I am experiencing the same issue. I am using a very old machine: it's an Acer T180 with a NVIDIA GT710 graphics card (driver nvidia-460) and an AMD Athlon 5600+.
The process causing the crash is /usr/lib/gdm3/gdm-x-session.
I will try to switch to Nouveau and Wayland and report back.

Revision history for this message
Carlo Federico Vescovo (cfv) wrote :

I have successfully switched to Nouveau and Wayland. I have not had any problem so far (it's been 30 minutes since I switched - maybe it's too soon to tell). I will test my current setup and report back in a week.

Revision history for this message
Carlo Federico Vescovo (cfv) wrote :

I have not had any problem with Nouveau and Wayland so far.

To post a comment you must log in.