# [SOLVED] Oops : kernel 4.1+, VMware Workstation + Windows 7

## Yamakuzure

Hi everybody,

I have a strange kernel oops I do not understand. I couldn't find anything about it that looks relevant using various search engine, so I guess it is something with my config?

The setup:

For project management I have to start a Windows 7 VM (Pro, 64bit) to connect to my company's Domain, as they are nice enough to use "Inloox" for project management.

I am using app-emulation/vmware-workstation-11.1.2.2780323-r1 and as long as I boot using a 4.0.x kernel, everything works fine.

But when I boot using any 4.1x kernel, my whole system freezes a few seconds after I logged into my account. I can see the windows desktop and then the mouse pointer freezes.

My laptop does not react to anything, although NumLock and CapsLock still react, and I can REISUB my system.

I first thought it has something to do with my root system being on zfs, but the vmware drives are on an ext4 partition. And even the newest zfs version (there was a bug that got fixed) did not cure this.

In /var/log/messages I can find this prior the freeze:

```
Nov  9 10:05:19 sed-notebook kernel: NET: Registered protocol family 40

Nov  9 10:05:19 sed-notebook kernel: BUG: unable to handle kernel NULL pointer dereference at 000000000000009d

Nov  9 10:05:19 sed-notebook kernel: IP: [<ffffffffa1300297>] VMCISock_GetAFValue+0x697/0xd10 [vsock]

Nov  9 10:05:19 sed-notebook kernel: PGD 0 

Nov  9 10:05:19 sed-notebook kernel: Oops: 0000 [#1] SMP 

Nov  9 10:05:19 sed-notebook kernel: Modules linked in: nvidia_uvm(PO) nvidia(PO) e1000e ptp pps_core des_generic vmnet(O) vmblock(O) vsock(O) vmmon(O) vmci(O) bbs

witch(O) zram lz4_decompress lz4_compress hidp bnep rfcomm btusb btbcm btintel bluetooth lib80211_crypt_tkip lib80211_crypt_ccmp lib80211 snd_hda_codec_hdmi snd_hd

a_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_controller coretemp kvm_intel kvm wl(PO) dell_laptop dcdbas dell_wmi wmi iTCO_wdt cfg80211 rfkill i2c_i

801 sdhci_pci sdhci mmc_core iTCO_vendor_support snd_hda_codec thermal snd_hda_core processor zfs(PO) zunicode(PO) zavl(PO) zcommon(PO) znvpair(PO) spl(O) nfs lock

d grace sunrpc fscache usb_storage [last unloaded: nvidia]

Nov  9 10:05:19 sed-notebook kernel: CPU: 7 PID: 28353 Comm: vmware Tainted: P           O    4.1.12-gentoo #1

Nov  9 10:05:19 sed-notebook kernel: Hardware name: Dell Inc. Precision M4800/0FVDR2, BIOS A15 09/29/2015

Nov  9 10:05:19 sed-notebook kernel: task: ffff8806fd239920 ti: ffff880685d14000 task.ti: ffff880685d14000

Nov  9 10:05:19 sed-notebook kernel: RIP: 0010:[<ffffffffa1300297>]  [<ffffffffa1300297>] VMCISock_GetAFValue+0x697/0xd10 [vsock]

Nov  9 10:05:19 sed-notebook kernel: RSP: 0018:ffff880685d17d08  EFLAGS: 00010286

Nov  9 10:05:19 sed-notebook kernel: RAX: ffff880685d17d48 RBX: 00000000ffffffa1 RCX: 0000000000000000

Nov  9 10:05:19 sed-notebook kernel: RDX: 0000000000000055 RSI: ffff880685d17dc0 RDI: ffff8807e83f6080

Nov  9 10:05:19 sed-notebook kernel: RBP: ffff880685d17d88 R08: ffff880685d17dc0 R09: ffff880679336700

Nov  9 10:05:19 sed-notebook kernel: R10: ffff8807e83f6080 R11: 0000000000000293 R12: ffff8807e83f6080

Nov  9 10:05:19 sed-notebook kernel: R13: 00005581276f4670 R14: ffff880685d17f20 R15: 0000000000000055

Nov  9 10:05:19 sed-notebook kernel: FS:  00007f3141e1a740(0000) GS:ffff88082ddc0000(0000) knlGS:0000000000000000

Nov  9 10:05:19 sed-notebook kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033

Nov  9 10:05:19 sed-notebook kernel: CR2: 000000000000009d CR3: 00000006c23ce000 CR4: 00000000001406e0

Nov  9 10:05:19 sed-notebook kernel: Stack:

Nov  9 10:05:19 sed-notebook kernel:  ffffffff811b1a60 dead000000100100 dead000000200200 ffff880677ec64a8

Nov  9 10:05:19 sed-notebook kernel:  ffff8806860f5600 0000000000000000 ffff8806fd239920 ffffffff810af9f0

Nov  9 10:05:19 sed-notebook kernel:  ffff880685d17d48 ffff880685d17d48 dead000000200200 ffff880685d17dc0

Nov  9 10:05:19 sed-notebook kernel: Call Trace:

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff811b1a60>] ? poll_select_copy_remaining+0x130/0x130

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff810af9f0>] ? wake_atomic_t_function+0x60/0x60

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff8167e6a5>] sock_sendmsg+0x35/0x40

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff8167e726>] sock_write_iter+0x76/0xe0

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff8119dd59>] __vfs_write+0xa9/0xe0

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff8119e4ff>] vfs_write+0x9f/0x1c0

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff811a3395>] ? SyS_newfstat+0x25/0x30

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff8119f1b5>] SyS_write+0x45/0xc0

Nov  9 10:05:19 sed-notebook kernel:  [<ffffffff8175d65b>] system_call_fastpath+0x16/0x6e

Nov  9 10:05:19 sed-notebook kernel: Code: 00 00 4c 8b 7e 20 65 48 8b 04 25 80 a9 00 00 48 89 45 b0 48 8d 45 a8 48 83 c0 18 48 c7 45 b8 f0 f9 0a 81 48 89 45 c0 48 89 45 c8 <f6> 42 48 01 75 30 49 89 d4 31 f6 4c 89 ff 49 89 cd e8 53 22 38 

Nov  9 10:05:19 sed-notebook kernel: RIP  [<ffffffffa1300297>] VMCISock_GetAFValue+0x697/0xd10 [vsock]

Nov  9 10:05:19 sed-notebook kernel:  RSP <ffff880685d17d08>

Nov  9 10:05:19 sed-notebook kernel: CR2: 000000000000009d

Nov  9 10:05:19 sed-notebook kernel: ---[ end trace b540f4f61f8343b0 ]---

Nov  9 10:08:32 sed-notebook kernel: sysrq: SysRq : Keyboard mode set to system default

Nov  9 10:08:38 sed-notebook kernel: sysrq: SysRq : Terminate All Tasks
```

I am completely at sea here what might cause this.

The crashed "vsock" (with "VMCISock_GetAFValue") is a vmware module, but I could not find anything on the net regarding problems with vfs.

Does anybody have at least an idea where to look? Or better, knows how to resolve this?

Thanks in advance

Yama

----------

## Hu

The VFS part is just because I/O went through some of the VFS on the way to the VMware handler for it.  The VMware handler faulted.  This is a bug in the VMware code.  Someone with access to the source of vsock.ko and the expertise to understand it will need to draft a patch.  Until then, you should blacklist vsock.ko when running 4.1.x kernels.  Depending on what features it offers, blacklisting it may break functionality you want.

----------

## Yamakuzure

Unfortunately VMCISock_GetAFValue() doesn't show up anywhere on the net as far as search engines go...  :Sad: 

----------

## philipo

Hi, I have same problem. I installed fresh gentoo on new thinkpad laptop and using kernel 4.1.13 due some hw issues. Then installed vmware 11 and everything looked good but after finalizing guest win 8.1 installation it freezing. I remember that was some support for vmware in kernel... (don't know what exactly) I'll try recompile it tommorow.

----------

## Hu

For what it is worth, Windows 8.1 runs correctly under Qemu/KVM.  If all you care about is having a Windows guest, using a free hypervisor could be a solution.

----------

## yamboo-efi

Hi,

With that patch i solved the issue.

----------

## Yamakuzure

Thank you for the link, I'll try it out and report back.

----------

## Yamakuzure

 *yamboo-efi wrote:*   

> Hi,
> 
> With that patch i solved the issue.

 I don't know who you are, but thank you very much to sign on just to post this patch, it did the trick!

----------

## hank2000

Yamakuzure,

could you please drop a hint where and how you applied that patch, thanks a lot.

Cheers, Heinrich

----------

## Yamakuzure

 *hank2000 wrote:*   

> Yamakuzure,
> 
> could you please drop a hint where and how you applied that patch, thanks a lot.
> 
> Cheers, Heinrich

 The patch in question is the last one here:

```
 ~ $ ls -1 /etc/portage/patches/app-emulation/vmware-modules-304.2/*

/etc/portage/patches/app-emulation/vmware-modules-304.2/304-4.2-01-inode.patch

/etc/portage/patches/app-emulation/vmware-modules-304.2/304-4.2-02-vmnetInt.patch

/etc/portage/patches/app-emulation/vmware-modules-304.2/304-4.2-03-af_vsock.patch

/etc/portage/patches/app-emulation/vmware-modules-304.2/304-4.2-04-driver.patch

/etc/portage/patches/app-emulation/vmware-modules-304.2/304-4.2-05-af_vsock_2.patch
```

The others are the regular patches to get the modules to compile with kernel 4.2.

----------

## hank2000

Hey,

thank you all, works perfect!

No Oops any more.

Running:

app-emulation/vmware-modules-304.2 only with patch as described above.

app-emulation/vmware-player-7.1.2.2780323-r1 from Overlay: vmware (layman)

app-emulation/vmware-tools-9.9.3.2780323

Kernel: 4.1.12-gentoo

Guests: WIN-XP and Windows-7

And Drag'n'Drop works again as expected

----------

## hank2000

Updated to 4.1.15-gentoo-r1 today, no problems till now, works as expected.   :Smile: 

----------

