9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] aux/acidleak pool pathology
@ 2009-05-21 16:06 erik quanstrom
  2009-05-21 16:35 ` Russ Cox
  0 siblings, 1 reply; 10+ messages in thread
From: erik quanstrom @ 2009-05-21 16:06 UTC (permalink / raw)
  To: 9fans

without getting to deep in the details of the pool
library, the reallocation loop aux/acidleak sends
realloc off the deep end.

here's an example; i've added an abort so i can see
how big acidleak is getting

	rb2; ps -a | grep xyz
	xyz           15104    0:29   0:02    45132K Pread    fs [upas/fs -np]
	rb2; leak 15104
	aux/acidleak: realloc 12280320 fails
	acidleak 25325: suicide: sys: trap: fault read addr=0x0 pc=0x00004a14
	rb2; ps -a | grep leak
	xyz           25325    0:02   0:03  2022876K Broken   aux/acidleak
	xyz           25328    0:00   0:00      156K Pread    grep leak

obviously the Brdline loop in main is reallocating data and block
so they don't fit in their previous buckets and pool sbrk's more
memory.  it would seem that pool is missing the fact that
at some point the old, now-empty blocks are big enough
when merged.  however  libc/port/pool.c:/^poolreallocl
appears to have the proper logic.

- erik



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-05-22 17:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-21 16:06 [9fans] aux/acidleak pool pathology erik quanstrom
2009-05-21 16:35 ` Russ Cox
2009-05-21 16:54   ` erik quanstrom
2009-05-21 16:57     ` erik quanstrom
2009-05-21 17:19     ` Russ Cox
2009-05-21 18:04       ` erik quanstrom
2009-05-21 18:49         ` Russ Cox
2009-05-22  2:13           ` erik quanstrom
2009-05-22 16:52             ` Joel C. Salomon
2009-05-22 17:13               ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).