How to solve the "aborting due to worker thread panic" error message while compiling Firefox on a virtual machine

Short answer: allocate more memory to your virtual machine.

The error is produced because the build process ran out of memory when compiling Servo's style crate.

I tried with 4096Mb and it seems to be happily chugging along now. I guess your mileage may vary, yadda yadda... 💁🏻

This is nothing short of miraculous as it's a Virtual Machine running Linux in a Macbook retina (with 8 Gb of RAM), which is a moderately underpowered-for-compiling-things laptop. But hey, lightweight, right?