Subject: Re: UVM deadlock?
To: None <current-users@NetBSD.ORG>
From: Kazushi (Jam) Marukawa <jam@pobox.com>
List: current-users
Date: 05/15/1998 01:19:34
   On May 10, 19:34, Kazushi (Jam) Marukawa wrote:
   > Subject: UVM deadlock?
   > Dear all,
   > 
   > I have a problem that the system is halted when I'm using
   > UVM.  I tried to trace by using DDB like following.  I made
   > some traces.  They look like some deadlock situation.  Are
   > there any information or advices about this problem?

I added a definition of UVMHIST in a configuration file and
made following uvmhist_dump when the system was halted.  I'm
not sure what I'm tracking becuase I don't figure out what
my problem is.  When I'm using the system, it is halted.
The system looks like to start a kind of inifinity loop in
the UVM.  There are no panic.

Is there any advices or suggestions to track and figure out
this problem?

db> call _uvm_dump
Current UVM status:
  pagesize=4096 (0x1000), pagemask=0xfff, pageshift=12
  31748 VM pages: 18785 active, 9398 inactive, -137506 wired, 85 free
  freemin=64, free-target=85, inactive-target=9394, wired-max=10582
  faults=2442681, traps=3466006, intrs=4644705, ctxswitch=5963426
  softint=1117445, syscalls=18351114, swapins=167, swapouts=214
  fault counts:
    noram=0, noanon=0, pgwait=0, pgrele=0
    ok relocks(total)=27448(27448), anget(retrys)=572853(48), amapcopy=323532
    neighbor anon/obj pg=17440/1229631, gets(lock/unlock)=557291/27400
    cases: anon=353923, anoncow=218930, obj=463189, prcopy=94102, przero=1310540
  daemon and swap counts:
    woke=2020941, revs=1721, scans=5953350, swout=1713
    busy=3904, freed=15112, reactivate=0, deactivate=34406
    pageouts=578, pending=578, nswget=48
    nswapdev=1, nanon=182303, nfreeanon=145948
  kernel pointers:
    objs(kern/kmem/mb)=0xf029c60c/0xf029c6d8/0xf029c6f0
0x38
db> call _uvmcnt_dump
# map lookup hint hits = 5778669
# map lookup calls = 19315375
# uvm_map() missed forward = 12500
# uvm_map() back merges = 796362
# uvm_map() successful calls = 1065100
0x27
db> call _uvmhist_dump(_uvm_histories)
uvm_fault(0xf02b71a0, 0x40e80000, 0, 1) -> 5
kernel: page fault trap, code=0
Faulted in DDB; continuing...
db> x _uvm_histories
_uvm_histories: f02bb6d0
db> call _uvmhist_dump(0xf02bb6d0)
895142844.484074 uvm_pageout#0:   <<WOKE UP>>
895142844.484080 uvm_pageout#0:   free/ftarg=85/85, inact/itarg=9398/9394
895142844.484149 uvm_pageout#0:   <<WOKE UP>>
895142844.484155 uvm_pageout#0:   free/ftarg=85/85, inact/itarg=9398/9394
895142844.484225 uvm_pageout#0:   <<WOKE UP>>
895142844.484231 uvm_pageout#0:   free/ftarg=85/85, inact/itarg=9398/9394
895142844.484300 uvm_pageout#0:   <<WOKE UP>>
895142844.484306 uvm_pageout#0:   free/ftarg=85/85, inact/itarg=9398/9394
895142844.484376 uvm_pageout#0:   <<WOKE UP>>
895142844.484382 uvm_pageout#0:   free/ftarg=85/85, inact/itarg=9398/9394
895142844.484451 uvm_pageout#0:   <<WOKE UP>>
895142844.484457 uvm_pageout#0:   free/ftarg=85/85, inact/itarg=9398/9394
<<Removed following stuff>>


In addition, uvmhist_dump looks like following normally.

db> x _uvm_histories
_uvm_histories: f02bb6d0
db> call _uvmhist_dump(0xf02bb6d0)
895209032.342139 uao_get#712: <- done (done=1)
895209032.342217 uao_get#713: called!
895209032.342222 uao_get#713: aobj=0xf029c60c offset=131657728, flags=64
895209032.342285 uao_get#713: <- done (done=1)
895209032.344584 uao_set_swslot#888: called!
895209032.344593 uao_set_swslot#888: aobj 0xf029c60c pageidx 32084 slot 0
895209032.344752 uao_set_swslot#889: called!
895209032.344757 uao_set_swslot#889: aobj 0xf029c60c pageidx 32082 slot 0
895209032.344789 uao_set_swslot#890: called!
895209032.344793 uao_set_swslot#890: aobj 0xf029c60c pageidx 32083 slot 0
895209032.347078 uao_get#714: called!
895209032.347086 uao_get#714: aobj=0xf029c60c offset=131407872, flags=64
895209032.347146 uao_get#714: <- done (done=1)
895209032.347231 uao_get#715: called!
895209032.347235 uao_get#715: aobj=0xf029c60c offset=131411968, flags=64
<<Removed following stuff>>

-- Kazushi
To keep your friends treat them kindly; to kill them, treat them often.