Subject: possible UVM deadlock
To: None <tech-kern@NetBSD.ORG>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: tech-kern
Date: 07/18/1998 19:54:34
I'm trying to track down a problem which causes my system
to halt when it runs low on memory - without success so far.
(It's a diskless 68040 with 8Mbyte RAM, so this is easily
reproduced:-(

What happens is that processes sleep in "anonget2"
(uvm_fault.c:uvmfault_anonget()) forever.
The pageout daemon is not active (sleeping in "daemon_slp")
when this happens, and there is a certain number of free
pages left (uvmexp.free > 0).

I've placed a printout in uvmfault_anonget() just before
UVM_UNLOCK_AND_WAIT() is called and found that
the process _always_ freezes if this code is hit. I can watch
the NFS traffic on the server and see that absolutely
nothing happens anymore, neither filesystem traffic nor
swap activity. (It still responds to "ping", and DDB can be
activated too.)

Some more details:
The page has the PG_BUSY, the PQ_ANON and the
PQ_INACTIVE flags set. (PG_WANTED is set by
uvmfault_anonget().)
pg->vm_anon->an_ref is 1.

Does somebody have a helpful idea?

best regards
Matthias