Linux Kernel 4.7 Memory Allocation Bug (mm/slub.c)

Just a heads up if you’re seeing unpalatable behavior with your Fedora 23 or Fedora 24 rig running any of the 4.7.* kernels:  It looks like Kernel 4.7 may have introduced a memory management bug.  It looks like the bug may be happening as a result of commits to the slub.c code, an example of which can be found here.

I was reticent to blame the kernel since I’m making use of Tianocore firmware in running a fairly sophisticated virtualization platform, but after running known good versions of the firmware and a vast array of combinations of operations, it appears the issue is likely with the kernel.  The fact that two individuals have issues a bug report involving the exact same line of slub.c code which I am seeing referenced in my journal (mm/slub.c:3661) and the fact that this code was updated with Kernel 4.7 gives me some confidence in the diagnosis.

The issue as documented in the bug reports spreads it across two fairly distinct server implementations (NFS and Virtualization) with my issue falling into the latter category.  Both of these services, of course, are tightly integrated with the kernel and it appears that both reports show the crash occurring during kernel memory management operations (kfree and kmalloc syscalls).  With NFS, the sunrpc do_cache_clean process looks to be causing issues across the Interwebs.  With KVM/QEMU, the VMs making use of host-based USB devices likely cause crashes when they are shut down because the kernel is then remapping those devices to memory spaces for the KVM/QEMU host OS.

This is all pretty good diagnostic information, I imagine; a more knowledgeable kernel programmer will likely be able to determine the cause of the issue here far more readily and precisely than I, so I’m hopeful that the issue is addressed with kernel 4.8.

Kernel 4.6.* works without a problem, but, of course, one ought not to run old kernels if it can be avoided at all.  Unfortunately, the order to upgrade from the 4.6.7 kernel has already been given.

 

Advertisements
This entry was posted in Information Technology and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s