Subject: Re: more NetBSD-1.5_ALPHA2 on alpha woes: (1) panic: uvm_anon_add (2) cannot login
To: None <port-alpha@netbsd.org>
From: Tim Shepard <shep@lcs.mit.edu>
List: port-alpha
Date: 09/12/2000 15:26:26
Following up on my earlier post about being unable to login... I'm running
NetBSD-1.5_ALPHA2 on an Alpha DS20E which has 2560 MB (2.5 GB) of memory.
/usr/bin/login is getting a SIGSEGV in a setrlimit system call:
[...snip...]
346 login.real RET read 290/0x122
346 login.real CALL close(0x3)
346 login.real RET close 0
346 login.real CALL chown(0x160eac6a8,0,0x4)
346 login.real NAMI "/dev/console"
346 login.real RET chown 0
346 login.real CALL open(0x160224d4d,0,0x1b6)
346 login.real NAMI "/etc/ttyaction"
346 login.real RET open -1 errno 2 No such file or directory
346 login.real CALL __lstat13(0x16022505d,0x1fffff510)
346 login.real NAMI "/etc/login.conf"
346 login.real RET __lstat13 -1 errno 2 No such file or directory
346 login.real CALL getrlimit(0,0x1fffff5a0)
346 login.real RET getrlimit 0
346 login.real CALL setrlimit(0,0x1fffff5b0)
346 login.real RET setrlimit 0
346 login.real CALL getrlimit(0x1,0x1fffff5a0)
346 login.real RET getrlimit 0
346 login.real CALL setrlimit(0x1,0x1fffff5b0)
346 login.real RET setrlimit 0
346 login.real CALL getrlimit(0x2,0x1fffff5a0)
346 login.real RET getrlimit 0
346 login.real CALL setrlimit(0x2,0x1fffff5b0)
346 login.real RET setrlimit 0
346 login.real CALL getrlimit(0x3,0x1fffff5a0)
346 login.real RET getrlimit 0
346 login.real CALL setrlimit(0x3,0x1fffff5b0)
346 login.real RET setrlimit 0
346 login.real CALL getrlimit(0x5,0x1fffff5a0)
346 login.real RET getrlimit 0
346 login.real CALL setrlimit(0x5,0x1fffff5b0)
346 login.real RET setrlimit -1 errno 22 Invalid argument
346 login.real PSIG SIGSEGV SIG_DFL
the fifth setrlimit is the fifth one from this array in
src/lib/libutil/login_cap.c:
} r_list[] = {
{ RLIMIT_CPU, CTIME, "cputime", },
{ RLIMIT_FSIZE, CSIZE, "filesize", },
{ RLIMIT_DATA, CSIZE, "datasize", },
{ RLIMIT_STACK, CSIZE, "stacksize", },
{ RLIMIT_RSS, CSIZE, "memoryuse", },
{ RLIMIT_MEMLOCK, CSIZE, "memorylocked", },
{ RLIMIT_NPROC, CNUMB, "maxproc", },
{ RLIMIT_NOFILE, CNUMB, "openfiles", },
{ RLIMIT_CORE, CSIZE, "coredumpsize", },
{ -1, 0, 0 }
};
ulimit -a at the single-user shell shows this:
# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 131072
stack(kbytes) 2048
coredump(blocks) unlimited
memory(kbytes) 2424352
locked memory(kbytes) -589984
process(processes) 80
nofiles(descriptors) 64
I put root in class foo and created a /etc/login.conf file with this
one line in it:
foo:memoryuse=512m:memorylocked=64m:
and now I'm able to login as root after going multi-user.
I set the memorylocked because the default value was printing out as
negative above. I'm not sure if it was also needed. I've not
experimented with how big of a limit I can get away with for these
rlimits.
I first guessed that the fields in struct rusage were ints and
overflowing 2^31, but I just peeked in <sys/resource.h> and see "long"
everywhere I think it should be. So I'm not sure why I'm losing like
this.
Am I the first to try NetBSD (or NetBSD-1.5_ALPHA2) with this much
memory? I would think so given how many things I've tripped over in
this install. IIRC, a DS20E could have as much as 8 GB stuffed into it.
-Tim Shepard
shep@lcs.mit.edu