Re: Nasty problem with KMRCL and LWM
On Mar 16, 2005, at 1:45 PM, Bob Hutchison wrote:
> I've been doing some work with TBNL and have found something nasty
> with how TBNL interacts with LW for Mac OS/X 4.4.0
I wasn't aware of this problem but I was able to reproduce the behavior
(Mac OS X 10.3.8, LWM 4.4.0, PowerBook G4, 1GB RAM).
> The behaviour is not nice. For example, before I run a test (which
> I'll describe in a moment) the real memory used by LW is 74.3MB and
> virtual 142.27MB. After the test it is real 257.72MB and virtual
> 814.26MB. The output from (ROOM) is mostly unchanged. LW is also in a
> bad state. I can't close or open windows, button images are
> disappearing, and dialog boxes are invisible.
I'm not sure if any of this data is useful but... I ran the test
several times w/ LispWorks.app and each time I had to run "ab" several
times to get it to slow down and eventually lock up (sort of). In my
testing LispWorks had to hit ~400MB resident and >3GB virtual before it
locked up. Still curious I poked at the process w/ Shark, ThreadViewer,
and gdb - in each case the main NSApplication thread was in a tight
loop down in "pthread" territory (it was hard to capture a backtrace).
I also tried the same test in a non-gui image I had built - again the
same behavior, including eventually one rouge thread. Shark revealed
that the largest amount of time (~20% of cpu time) was spent in various
Mach vm_*() system calls.
Out of curiosity I (naively) explored LispWorks behavior under heavy
memory allocation. I fired up my console image (LispWorks.app dumped w/
:environment nil :multiprocessing t), loaded swank, eval'd the
following:
(defvar x nil)
(dotimes (i 300)
(push (make-array (* 1024 1024) :element-type 'unsigned-byte) x))
Around ~400MB resident, ~450MB virtual all listeners (both console and
slime) stopped responding. Looking at the process w/ ThreadViewer there
was again one thread off in a tight loop, but unlike the "big-trouble"
cases this time the rogue thread appears to be purely in lisp land. All
the while memory usage slowly creeps higher w/ the cpu ~75% active.
....more info for what it's worth.
-greg
__________________________________________________
Greg Wuller greg@wuller.com
_______________________________________________________