Kstat reports anon_cache buffers incorrectly in Solaris 10. (Doc ID 1596003.1)

Last updated on JULY 29, 2016

Applies to:

Solaris Operating System - Version 10 3/05 and later
Information in this document applies to any platform.

Symptoms

If the observed issue occurs, kstat -p reports incorrect value for anoncache:buff_inuse.

To see if your server is susceptible to this bug run the following command:

   % kstat -p unix:0:anon_cache:|grep buf

Then check the value next to anon_cache:buf_inuse.  If it is unexpectedly
high, your system is encountering this bug.

Here are examples from x86 and SPARC systems.

amogg0007% uname -a
SunOS amogg0007 5.10 Generic_148889-01 i86pc i386 i86pc

amogg0007% kstat -p unix:0:anon_cache:|grep buf
unix:0:anon_cache:buf_avail     32227571
unix:0:anon_cache:buf_constructed       11101415
unix:0:anon_cache:buf_inuse     18446744073698700449
unix:0:anon_cache:buf_max       21376404
unix:0:anon_cache:buf_size      48
unix:0:anon_cache:buf_total     21376404


amogg0016% uname -a
SunOS amogg0016 5.10 Generic_148888-01 sun4v sparc sun4v

amogg0016% kstat -p unix:0:anon_cache:|grep buf
unix:0:anon_cache:buf_avail     119085943
unix:0:anon_cache:buf_constructed       2654911
unix:0:anon_cache:buf_inuse     18446744073594388332
unix:0:anon_cache:buf_max       56708288
unix:0:anon_cache:buf_size      48
unix:0:anon_cache:buf_total     3922659

To observe this condition in a kernel corefile using SCAT, use the following command:

  CAT(vmcore.0/10X)> kstat -n anon_cache

Note, in some cases, very low values presented by S10 sparc can be misleading and the bug condition does exist.

A sample output from a coredump experienceing this issue is give below:

CAT(vmcore.0/10X)> kstat -n anon_cache
 kid: 433 @ 0xffffffff9b2dabb0, data[26] @ 0xfffffffffbc97160
 mod: unix  name: anon_cache  class: kmem_cache  type: KSTAT_TYPE_NAMED
 inst: 0  flags: 1  size: 1248
       KSTAT_FLAG_VIRTUAL -  ks_data to point to the data exported
 creation time: 0x1f1aea6f7d (5 days 57 minutes 2.801620695 seconds earlier)
 last snapshot: 0x18c217bc335a2 (5.982267570 seconds earlier)
 update: genunix:kmem_cache_kstat_update
 snapshot: unix:default_kstat_snapshot
 buf_size:             48
 align:                16
 chunk_size:           48
 slab_size:            4096
 alloc:                149688964
 alloc_fail:           0
 free:                 150690586
 depot_alloc:          553856
 depot_free:           558254
 depot_contention:     185
 slab_alloc:           1427130
 slab_free:            1158752
 buf_constructed:      106850
 buf_avail:            825526
 buf_inuse:            18446744073709194726   <----- HERE!
 buf_total:            468636
 buf_max:              495684

In some cases, very low values presented by S10 sparc can be misleading, but the bug condition does exist.

CAT(vmcore.1/10V)> kstat -n anon_cache
kid: 372 @ 0x300082d2330, data[26] @ 0x1939728
mod: unix  name: anon_cache  class: kmem_cache  type: KSTAT_TYPE_NAMED
inst: 0  flags: 1  size: 1248
      KSTAT_FLAG_VIRTUAL -  ks_data to point to the data exported
creation time: 0x35d0297caa0203 (37 days 2 hours 58 minutes 25.394079218 seconds earlier)
last snapshot: 0x3c9ba48a824394 (14 days 23 hours 42 minutes 6.160122977 seconds earlier)
update: genunix:kmem_cache_kstat_update
snapshot: unix:default_kstat_snapshot
buf_size:             184
align:                8
chunk_size:           184
slab_size:            8192
alloc:                17833
alloc_fail:           0
free:                 18060
depot_alloc:          1313
depot_free:           1398
depot_contention:     0
slab_alloc:           14758
slab_free:            7413
buf_constructed:      74
buf_avail:            77
buf_inuse:            7271    ===> low value
buf_total:            7348
buf_max:              7348

 


Solaris 11 systems are not susceptible to this bug.   Note the more
reasonable values for  anon_cache:buf_inuse shown below from x86 and SPARC systems.

mogg0010% uname -a
SunOS amogg0010 5.11 11.1 i86pc i386 i86pc

amogg0010%  kstat -p unix:0:anon_cache:|grep buf
unix:0:anon_cache:buf_avail     10588760
unix:0:anon_cache:buf_constructed       10588760
unix:0:anon_cache:buf_inuse     5570759
unix:0:anon_cache:buf_max       16159519
unix:0:anon_cache:buf_size      48
unix:0:anon_cache:buf_total     16159519


amogg0019% uname -a
SunOS amogg0019 5.11 11.1 sun4v sparc sun4v

amogg0019%  kstat -p unix:0:anon_cache:|grep buf
unix:0:anon_cache:buf_avail     26585909
unix:0:anon_cache:buf_constructed       26585909
unix:0:anon_cache:buf_inuse     1692523
unix:0:anon_cache:buf_max       52127543
unix:0:anon_cache:buf_size      48
unix:0:anon_cache:buf_total     28278432



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms