Kernel panic running as a VMware Guest ("BUG: unable to handle kernel NULL pointer dereference at 0000000000000004")

Solution Verified - Updated -

Issue

  • A RHEL 7.3 Virtual Machine hosted on VMware, configured with 6 or more vCPUs, performs a kernel panic
  • Backtrace may be an Oops or general protection fault or null pointer dereference similar to:
[   41.651323] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
[   41.654952] IP: [<ffffffff8158934d>] __flow_cache_shrink+0xad/0x170
[   41.657710] PGD 226fb0067 PUD 224207067 PMD 0 
[   41.660488] Oops: 0002 [#1] SMP
...
[   41.723411] CPU: 3 PID: 3444 Comm: processname Not tainted 3.10.0-514.el7.x86_64 #1
[   41.728173] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/14/2014
[   41.734588] task: ffff8800b8878fb0 ti: ffff88021f314000 task.ti: ffff88021f314000
[   41.740372] RIP: 0010:[<ffffffff8158934d>]  [<ffffffff8158934d>] __flow_cache_shrink+0xad/0x170
[   41.745795] RSP: 0018:ffff88021f317c10  EFLAGS: 00010246
[   41.749489] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000000a
[   41.753207] RDX: 0000000000000004 RSI: ffff88023fcdcfc0 RDI: ffffffff81a9de68
[   41.757286] RBP: ffff88021f317c68 R08: ffff880231f51240 R09: 0000000000000006
[   41.761327] R10: ffff88021f317c1e R11: 00000000769dff76 R12: 0000000000000001
[   41.765176] R13: 0000000000000000 R14: 0000000000000000 R15: ffffffff81a9de68
[   41.768839] FS:  00007f342e8ff700(0000) GS:ffff88023fcc0000(0000) knlGS:0000000000000000
[   41.773028] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   41.776074] CR2: 0000000000000004 CR3: 0000000222e34000 CR4: 00000000000407e0
[   41.779812] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   41.783931] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   41.787291] Stack:
[   41.790289]  ffff88023fcdcfc0 0000880224228b28 0000039e00000000 ffff88021f317c28
[   41.794601]  ffff88021f317c28 0000000054aa644a 0000000000000009 0000000000000001
[   41.798477]  0000000000000002 0000000000000002 ffffffff81a9cd80 ffff88021f317cd8
[   41.803183] Call Trace:
[   41.806017]  [<ffffffff815896ec>] flow_cache_lookup+0x2dc/0x420
[   41.810285]  [<ffffffff8160e860>] ? xfrm_expand_policies+0x130/0x130
[   41.814286]  [<ffffffff8160f22f>] xfrm_lookup+0x29f/0x3f0
[   41.817796]  [<ffffffff815adccd>] ? __ip_route_output_key_hash+0x1fd/0x930
[   41.822848]  [<ffffffff8160f72b>] xfrm_lookup_route+0x1b/0x70
[   41.827166]  [<ffffffff815ae764>] ip_route_output_flow+0x54/0x60
[   41.831703]  [<ffffffff815d441c>] tcp_v4_connect+0x1ac/0x4e0
[   41.835636]  [<ffffffff8118055b>] ? unlock_page+0x2b/0x30
[   41.839032]  [<ffffffff815eb3f5>] __inet_stream_connect+0xb5/0x330
[   41.842785]  [<ffffffff811de15c>] ? kmem_cache_alloc_trace+0x3c/0x200
[   41.846627]  [<ffffffff8111f9f6>] ? __audit_sockaddr+0x66/0x80
[   41.850816]  [<ffffffff815eb6a8>] inet_stream_connect+0x38/0x50
[   41.855154]  [<ffffffff81554fe7>] SYSC_connect+0xe7/0x120
[   41.859742]  [<ffffffff81555dee>] SyS_connect+0xe/0x10
[   41.863985]  [<ffffffff816964c9>] system_call_fastpath+0x16/0x1b
[   41.869171] Code: f0 4d 8b 30 41 39 dd 4c 89 f0 7e 14 41 8b 97 80 00 00 00 41 39 50 1c 4c 89 f0 0f 84 96 00 00 00 49 8b 50 08 41 83 c4 01 48 85 c0 <48> 89 02 74 04 48 89 50 08 48 b8 00 01 00 00 00 00 ad de 48 8d 
[   41.884953] RIP  [<ffffffff8158934d>] __flow_cache_shrink+0xad/0x170
[   41.889424]  RSP <ffff88021f317c10>
[   41.892794] CR2: 0000000000000004

Environment

  • Red Hat Enterprise Linux 7.3
  • kernel version lower than 3.10.0-514.21.1.el7
  • VMware ESXi 5.x and 6.x
  • Xen virtualisation

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content