Hi all,
In commit Eg1WuG7hzCoCPdcz, robert@ changed the ulimit for the daemon
class in /etc/login.conf for amd64 from 'infinity' to 4096M (see [0]
and [1]).
This change broke my vmd setup, and I had to dig around to understand
what happened. Sharing here in hopes of preventing others from
wasting their time like I did.
I have a VM that is configured with 4GB of RAM:
[weerd@pom] $ grep -B2 4G /etc/vm.conf
vm "builder" {
owner weerd
memory 4G
After upgrading to a newer snapshot (and sysmerge'ing login.conf), vmd
crashes when this VM gets started:
pom vmd[98555]: builder: could not allocate guest memory - exiting: Cannot
allocate memory
pom vmd[71874]: vmm: read vcp id
pom vmd[10670]: priv exiting, pid 10670
pom vmd[73889]: control exiting, pid 73889
(resource limits doing exactly what they're supposed to do here!)
It took me longer than I care to admit to realize that this would be
caused by the newly reduced datasize limit imposed by Robert's change.
I fixed this by adding a dedicated login.conf stanza for vmd:
[weerd@pom] $ tail -n7 /etc/login.conf
######################################################################
# Local changes
#
# vmd runs VMs with 4GB, so it needs an increased datasize limit:
vmd:\
:datasize=5120M:\
:tc=daemon:
Alternatively, I could've stuck that bit in /etc/login.conf.d/vmd
which would've had the same effect. But with that change everything
is working just fine again. When you run into a similar issue, make
sure not to just revert back to "infinite" - find a suitable limit for
whatever piece of software you have and adjust accordingly.
Cheers,
Paul
[0]: https://marc.info/?l=openbsd-cvs&m=164542553811748&w=2
[1]:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/etc/etc.amd64/login.conf.diff?r1=1.21&r2=1.22
--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
http://www.weirdnet.nl/