Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Problems with nfsserver module

A couple of months ago I reported [1] a problem with the nfsserver module not properly installing its syscall hooks.

Today, I thought I'd try to dig into this a little bit deeper. So, on one of my other machines, I ran the following test:

1. create a /etc/exports file
2. manually loaded the nfsserver module (nfs client module was
   already loaded)
3. start nfsd

So far, so good.  I waited a couple of minutes and nothing bad happens.

4. Attempt to modunload the nfsserver module.  It correctly fails
   with EBUSY
5. kill(1) the nfsd process
6. Again, modunload the nfsserver module.  This time it succeeds.

Again, we're good up to here.

However, after a couple of minutes of idle time, the machine crashed! I have manually transcribed the console output, but I think this is right:

fatal pagefault in supervisor mode
trap type 6 code 0 rip ffffffff801fc780 cs8 rflags 10283 cr2 8 ilevel 2 rsp 
curlwp 0xfffffe811fb38860 pid 0.5 lowest kstack 0xfffffe8001009000
kernel: pagefault trap. code = 0
Stopped in pid 0.5 (system) at netbsd:mutex_vector_enter+0x91: movq 

A backtrace shows

mutex_vector_enter() at netbsd:mutex_vectr_enter+0x91
nfs_timer() at nfs:nfs_timer+0x146
callout_softclock() at netbsd:callout_softclock+0x243
softint_dispatch() at netbsd:softint_dispatch+0x7b

So it would appear that the nfsserver module did not cancel a timer before allowing itself to be unloaded?

Do we have anyone familiar with the nfs code that might be able to find this timer and properly cancel it?


| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at |
| Kernel Developer |                          | pgoyette at  |

Home | Main Index | Thread Index | Old Index