Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

click's avatar
Level 35

OSX kernel panic on local homestead vagrant machine

Hi there,

Randomly I am experiencing kernel panics on my macbook when I run 'heavy' tasks on my local dev machine. The local dev environment is running with vagrant (latest 2.1.1), virtualbox (latest 5.2.12) and homestead (ubuntu 16.04, 1 cpu, 2gb memory). It happened with and without the 'nfs' setting.

Yesterday it happened so I updated to the latest vagrant and virtualbox versions but today it happened again.

Most of the time it is during the process of running PHPUnit which runs the tests on a mysql database. But it also happened once during the process of running an artisan command that did a lot of database migrations.

Also after each crash my mysql is corrupt. So after each crash I simply run vagrant destroy and vagrant up and we are ready to go. But it costing me time everytime.

I can't figure out what the cause is. And I can't reproduce it because it ain't happening all the time.

I am starting to think my macbook is the problem. My last resort is to do a fresh install of my macbook and see if that helps.

Anybody experienced the same problems?

0 likes
4 replies
lostdreamer_nl's avatar

What are the specs of your Macbook (# cores + memory) ?

Maybe you're burning through your host OS's memory?

1 like
click's avatar
Level 35

That shouldn't be the problem I think: 16gb, 3.1Ghz i7

lostdreamer_nl's avatar

aah, no, that shouldnt be a problem then... I've had it a few times that a mac that gave the VM half its physical memory would start having problems when the IDE would be scanning the filesystem or CPU intensive tasks.

My knowledge of Macs is limited, so I'm sorry to say I'm out of ideas.

But maybe if you can post the panic report, we can find out by debugging ;)

extra: I don't know if you have it, but I see a few users on google with the same problem (a few years ago) that reported no more crashes after removing "tunnelblick" (vpn software), which at least means that any network related software might interfere with the loopback interface that VMware uses for connecting the host and guest OS'es

1 like
click's avatar
Level 35

@lostdreamer_nl thanks for your time. I am not using tunnelblick.

This is a part of the panic report

*** Panic Report ***
panic(cpu 2 caller 0xffffff80072bc1ed): "a freed zone element has been modified in zone kalloc.16: expected 0x3a35300f1ecb6996 but found 0xffffff81f34c2100, bits changed 0xc5cacf8eed874896, at offset 0 of 16 in element 0xffffff803ddee680, cookies 0x3f00111dad4156ca 0x5352112b38a3f51"@/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4570.51.2/osfmk/kern/zalloc.c:1122

There are more people experiencing the same problem I see. But they all have different problems and or no solution at the end of a topic. Here for example somebody having the same problem with virtualbox and watching youtube on it's host. https://www.virtualbox.org/ticket/17048?cversion=0&cnum_hist=1

It could be some faulty piece of software or hardware is the most advice what I see. I think I will reinstall my OS this weekend and see if that helps.

Please or to participate in this conversation.