panic: vm_map_wire: lookup failed
John Hay
jhay at icomtek.csir.co.za
Thu Oct 9 02:59:47 PDT 2003
Hi,
The latest development source of ntpd started to use setrlimit() before
using mlockall(). This combination proves fatal on -current. The code
in ntpd/ntpd.c looks like this:
###########
#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined(MCL_FUTURE)
# ifdef HAVE_SETRLIMIT
/*
* Set the stack limit to something smaller, so that we don't lock a lot
* of unused stack memory.
*/
{
struct rlimit rl;
if (getrlimit(RLIMIT_STACK, &rl) != -1
&& (rl.rlim_cur = 20 * 4096) < rl.rlim_max)
{
if (setrlimit(RLIMIT_STACK, &rl) == -1)
{
msyslog(LOG_ERR,
"Cannot adjust stack limit for mlockall: %m");
}
}
}
# endif /* HAVE_SETRLIMIT */
/*
* lock the process into memory
*/
if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0)
msyslog(LOG_ERR, "mlockall(): %m");
#else /* not (HAVE_MLOCKALL && MCL_CURRENT && MCL_FUTURE) */
###########
The panic message is:
panic: vm_map_wire: lookup failed
and a backtrace looks like this:
##############
(kgdb) bt
#0 doadump () at /usr/src/sys/kern/kern_shutdown.c:240
#1 0xc047ff07 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:372
#2 0xc04801c8 in panic () at /usr/src/sys/kern/kern_shutdown.c:550
#3 0xc055a714 in vm_map_wire (map=0xc0e0c6e4, start=0, end=3216949248,
flags=3) at /usr/src/sys/vm/vm_map.c:1919
#4 0xc055d113 in mlockall (td=0x0, uap=0xc6361d14)
at /usr/src/sys/vm/vm_map.h:201
#5 0xc0591efb in syscall (frame=
{tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077936788, tf_esi = 2, tf_ebp = -1077936904, tf_isp = -969532044, tf_ebx = -1077936944, tf_edx = 0, tf_ecx = 9, tf_eax = 324, tf_trapno = 12, tf_err = 2, tf_eip = 673338079, tf_cs = 31, tf_eflags = 658, tf_esp = -1077937108, tf_ss = 47})
at /usr/src/sys/i386/i386/trap.c:1006
#6 0xc0584c5d in Xint0x80_syscall () at {standard input}:144
---Can't read userspace from dump, or kernel process---
(kgdb)
##############
John
--
John Hay -- John.Hay at icomtek.csir.co.za / jhay at FreeBSD.org
More information about the freebsd-current
mailing list