pharo-open-documentation / pharo-wiki

Wiki related to the Pharo programming language and environment.
https://twitter.com/PharoOpen
Creative Commons Attribution 4.0 International
244 stars 76 forks source link

Advanced Image Level debugging #26

Open Ducasse opened 5 years ago

Ducasse commented 5 years ago

Hi Dario,

if you look at the end of the PharoDebug.log you will see:

Most recent primitives doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: ....... ...... doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand: doesNotUnderstand:

So you have a recursive doesNotUnderstand: error and the system is running out of memory. The questions are where and why? You can try and debug this further by running the VM with --trace=259, e.g.

pharo-vm/pharo --trace=259 my image.image

This will produce lots of output, eventually ending in an endless stream of doesNotUnderstand:'s. So capture the first few megabytes of output (see e.g. head(1) ($ man head))

FYI "traceFlags is a set of flags. 1 => print trace (if something below is selected) 2 => trace sends 4 => trace block activations 8 => trace interpreter primitives 16 => trace events (context switches, GCs, etc) 32 => trace stack overflow 64 => send breakpoint on implicit receiver (Newspeak VM only) 128 => check stack depth on send (simulation only) 256 => trace linked sends "

Alternatively you could use a debugger such as gdb and I can tell you how to put a breakpoint on doesNotUnderstand:

jecisc commented 5 years ago

From pharo dev list:

http://forum.world.st/Pharo-image-don-t-restart-td5090811.html