Having posted this to the wrong place.. :-0 Let me redirect it to the right one :-) Randall Stewart wrote: > Hi all: > > I am looking at a memory problem.. i.e. maybe a leak somewhere.. > > I wrote a script in kgdb to get malloc and zone info. > Now I am not all that familiar with these structures > but I think there may be an issue.. either that > or I just don't understand what I am reading :-) > > The big standout to me is: > > zone:0xc145f1e0 pages: 14092 keg_free: 0 size:16384 alloc: > 12446364 frees: 12446297 fail: 0 biu:57720832 > -------------------------------------------- > > From my limited understanding.. pages aka keg->uk_pages > tells me I have a huge number of pages in the zone > coming out to about 57Meg of memory.. wow! > > > Now this zone is really: > ----------------------------------------------- > $3 = (struct uma_zone *) 0xc145f1e0 > (kgdb) print *$3 > $4 = { > uz_name = 0xc090c41b "mbuf_jumbo_16k", > uz_lock = 0xc1461188, > uz_keg = 0xc1461180, > uz_link = { > le_next = 0x0, > le_prev = 0xc14611ac > }, > uz_full_bucket = { > lh_first = 0xc6a64c48 > }, > uz_free_bucket = { > lh_first = 0xc6a3b624 > }, > uz_ctor = 0xc06888ec <mb_ctor_clust>, > uz_dtor = 0xc06889c4 <mb_dtor_clust>, > uz_init = 0, > uz_fini = 0, > uz_allocs = 0xbdea9c, > uz_frees = 0xbdea59, > uz_fails = 0x0, > uz_fills = 0x0, > uz_count = 0x80, > uz_cpu = {{ > uc_freebucket = 0xc6a3f20c, > uc_allocbucket = 0xc6a35000, > uc_allocs = 0x291, > uc_frees = 0x295 > }} > } > ------------------------------------ > > Now looking at the allocs/frees.. and subtracting we > only have (according to the zone) 67 that are not free.. > > The keg looks as follows: > ---------------------------------------- > $5 = { > uk_link = { > le_next = 0xc1461100, > le_prev = 0xc1461200 > }, > uk_lock = { > mtx_object = { > lo_name = 0xc090c41b "mbuf_jumbo_16k", > lo_type = 0xc09099e2 "UMA zone", > lo_flags = 0x1430000, > lo_witness_data = { > lod_list = { > stqe_next = 0xc0a06be0 > }, > lod_witness = 0xc0a06be0 > } > }, > mtx_lock = 0x4, > mtx_recurse = 0x0 > }, > uk_hash = { > uh_slab_hash = 0xc6a4b000, > uh_hashsize = 0x1000, > uh_hashmask = 0xfff > }, > uk_zones = { > lh_first = 0xc145f1e0 > }, > uk_part_slab = { > lh_first = 0x0 > }, > uk_free_slab = { > lh_first = 0x0 > }, > uk_full_slab = { > lh_first = 0xc692b5b0 > }, > uk_recurse = 0x0, > uk_align = 0x3, > uk_pages = 0x370c, > uk_free = 0x0, > uk_size = 0x4000, > uk_rsize = 0x4000, > uk_maxpages = 0x0, > uk_init = 0xc0829b90 <trash_init>, > uk_fini = 0xc0829ba8 <trash_fini>, > uk_allocf = 0xc0826f40 <page_alloc>, > uk_freef = 0xc08270ac <page_free>, > uk_obj = 0x0, > uk_kva = 0x0, > uk_slabzone = 0xc14731e0, > uk_pgoff = 0x0, > uk_ppera = 0x4, > uk_ipers = 0x1, > uk_flags = 0x508 > } > ---------------------------------- > > So where is all the memory hiding? > > And if its free (as the zone implies) why is it > not getting released back to the system... (the machine > crashed with a "no memory" condition.. > > ??? > > Help from someone with a clue would be much > appreciated :-) > > Thanks > > R -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 <or> 803-317-4952 (cell)Received on Mon Jan 15 2007 - 13:58:36 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC