To follow-up, I removed the ulimit commands from all shell start-up
scripts and created a login class with resource allocations sufficient
for the go runtime.
dmagus@lucidrine:/home/dmagus:27$ go run hello.go
throw: runtime: cannot reserve arena virtual address space
dmagus@lucidrine:/home/dmagus:28$ userinfo dmagus | grep class
class staff
This class in login.conf looks like:
staff:\
:ignorenologin:\
:datasize=768M:\
:maxproc=512:\
:openfiles=768:\
:stacksize-cur=8M:\
:localcipher=blowfish,8:\
:requirehome@:\
:tc=default:
resonator@lucidrine:/home/resonator:13$ go run hello.go
Hello, 世界
resonator@lucidrine:/home/resonator:14$ userinfo resonator | grep class
class psyborg
This class in login.conf looks like:
psyborg:\
:ignorenologin:\
:datasize=1024M:\
:maxproc=768:\
:openfiles=4096:\
:stacksize-cur=16M:\
:localcipher=blowfish,8:\
:requirehome@:\
:tc=default:
btw - go is now in the ports tree. In my case, a *psyborg* class user
can build the port with 'sudo make' but a *staff* class user gets the
familiar resource limit error - "throw: runtime: cannot reserve arena
virtual address space".
On 02/17/2013 08:21 PM, circuit6engineering wrote:
On 02/17/2013 07:28 PM, Philip Guenther wrote:
Okay, so the openfiles settings was completely overridden (for class
staff) by the openfiles-max and openfiles-cur settings...but the -cur
value was 1024 too. So, you _should_ be seeing a value of 1024.
Indeed, if I copy your exact 'staff' and 'default' classes into my
system's login.conf and then login on another virtual terminal, I get
1024.
I will concur that (in this login.conf) the *default* user class
openfiles setting would be overridden by the *staff* user class
settings. (e.g., if the default class openfiles were reduced to 512 in
login.conf, a staff class user should still have an openfiles soft limit
of 1024).
So, the next questions are things like "do you have ulimit lines in
any (whether system or per-user) of your shell startup files?" "How
_exactly_ are you logging in: console virtual terminal, xdm, ssh,
other?"
Awesome sanity check! That is exactly the problem. I snagged a .kshrc
file from another system on which I tinkering with [go][1]. Some ulimit
settings (described in this [wiki][2]) were hastily placed in that
kshrc. They slipped past my attention when I cannibalized the file for
my new box. I fixed the kshrc and everything works as expected. Thanks
for your help!
[1]: http://golang.org/
[2]: http://code.google.com/p/go-wiki/wiki/OpenBSD