From: Chetan A. <ahu...@cs...> - 2000-12-21 22:42:48
|
Hi, I'm trying to get kernel nfsd(v3) running within UML to do some development. On trying to run nfsd, I get a hang with the message: "Starting NFS daemon: kernel BUG at memory.c:365!". The kernel version is 2.4.0-test12 with patches gotten from the tar file on the web site for the same kernel version. (downloaded on Dec 14th). The hosting kernel is 2.2.17. Ran it with debugger and got the following backtrace: #0 0x100e86f1 in __libc_nanosleep () #1 0x100e86b3 in __sleep (seconds=1000000) at ../sysdeps/unix/sysv/linux/sleep.c:82 #2 0x100db263 in stop () at user_util.c:145 #3 0x10010836 in zap_page_range (mm=0x10177bc0, address=0, size=0) at memory.c:365 #4 0x10013149 in exit_mmap (mm=0x10177bc0) at mmap.c:911 #5 0x10006749 in mmput (mm=0x10177bc0) at fork.c:248 #6 0x1000a9a6 in exit_mm (tsk=0x53354000) at exit.c:314 #7 0x1006b18c in nfsd (rqstp=0x533ae400) at nfssvc.c:152 #8 0x100dbab0 in new_thread_proc (t=0x53354000) at process_kern.c:129 So it's crashing in zap_page_range.... Quoting the relevant section: /* * This is a long-lived spinlock. That's fine. * There's no contention, because the page table * lock only protects against kswapd anyway, and * even if kswapd happened to be looking at this * process we _want_ it to get stuck. */ if (address >= end) BUG(); <<<<<----------Crashes here spin_lock(&mm->page_table_lock); do { ... etc.. And here's some context for the nfsd function which is causing the crash: static void nfsd(struct svc_rqst *rqstp) { struct svc_serv *serv = rqstp->rq_server; int err; struct nfsd_list me; /* Lock module and set up kernel thread */ MOD_INC_USE_COUNT; lock_kernel(); exit_mm(current); <<<------ Crashes here.. current->session = 1; current->pgrp = 1; sprintf(current->comm, "nfsd"); ... etc... By the way, nfsd is built into the kernel rather than being a module.... Another data point: The exact same kernel version happily runs nfsd directly on x86. What's going on? I'll be happy to provide any additional info that might be required.... Chetan |