I was using SQLC on Ubuntu virtual machine from one provider and it was working perfectly fine, but then I switched to another provider and all of a sudden it now panics with panic: unable to mmap memory: cannot allocate memory
.
I discovered that this panic only occurs when SQLC binary installed using go install
, but it doesn’t if I reinstall SQLC using snap
.
Code and SQLC configs don’t change between both machines, their specs are identical with 2 cores and 4 RAM, so it can’t be that machine running out of memory.
What can cause the panic?
You can see full trace on pastebin: pastebin