<div dir="ltr"><div><div>Hi Mariano, if you know the method that may cause this crash can you check<br></div>if it works if you recompile this method with the old compiler,<br></div>maybe this issue is responsible - wrong stack frame size :<br><a class="" href="https://pharo.fogbugz.com/f/cases/13854/frameSize-calculated-wrongly-for-lineSegmentsDo">13854</a> frameSize calculated wrongly for #lineSegmentsDo:<br><br><br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-16 17:00 GMT+01:00 Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi guys,<div><br></div><div>I am debugging a Pharo VM crash I am having and I cannot figure out what it is exactly. I suspect it might be related to block closures compilation but I am not sure. I have a reproducible crash test under Pharo 4.0 and OSX. </div><div><br></div><div>I built a VM in debug mode and I run it via gdb. This is the kind of info I am able to see:</div><div><br></div><div><div><i>Program received signal SIGSEGV, Segmentation fault.</i></div><div><i>0x000ab66b in updatePointersInRangeFromto (memStart=924623948, memEnd=928201420) at /Users/mariano/Pharo/git/pharo-vm/src/vm/gcc3x-cointerp.c:40444</i></div><div><i>40444<span style="white-space:pre-wrap">                                        </span> &amp;&amp; (((longAt(fieldOop)) &amp; MarkBit) != 0)) {</i></div><div><i>(gdb) call printAllStacks()</i></div><div><i>Process 0x30e228c4 priority 40</i></div><div><i>0xbffb2e10 M FaAction class&gt;block: 0x20ebb104: a(n) FaAction class</i></div><div><i>0xbffb2e30 M BlockClosure(FaMemoryStoreSession)&gt;register: 0x371d0968: a(n) BlockClosure</i></div><div><i>0xbffb2e4c M INVALID RECEIVER&gt;register: 0x371cfd54: a(n) bad class</i></div><div><i><br></i></div><div><i>(callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil)) 48626</i></div><div><i>0x3721e1f0 is not a context</i></div><div><i>0x371c34b4 is not a context</i></div><div><br></div><div>And another crash:</div><div><br></div><div><div><i>Program received signal SIGSEGV, Segmentation fault.</i></div><div><i>0x000ab66b in updatePointersInRangeFromto (memStart=924677864, memEnd=928262300) at /Users/mariano/Pharo/git/pharo-vm/src/vm/gcc3x-cointerp.c:40444</i></div><div><i>40444<span style="white-space:pre-wrap">                                        </span> &amp;&amp; (((longAt(fieldOop)) &amp; MarkBit) != 0)) {</i></div><div><i>(gdb) call printAllStacks()</i></div><div><i>Process 0x30e228c4 priority 40</i></div><div><i>0xbffb2de0 M INVALID RECEIVER&gt;initialize 0x3722b9a0: a(n) bad class</i></div><div><i>0xbffb2df8 M FaAction class(Behavior)&gt;new 0x20ebb104: a(n) FaAction class</i></div><div><i>0xbffb2e10 M FaAction class&gt;block: 0x20ebb104: a(n) FaAction class</i></div><div><i>0xbffb2e30 M INVALID RECEIVER&gt;register: 0x371ddee0: a(n) bad class</i></div><div><i>0xbffb2e4c M INVALID RECEIVER&gt;register: 0x371dd328 is in old space</i></div><div><i><br></i></div><div><i>(callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil)) 48626</i></div><div><i>0x3722b750 is not a context</i></div><div><i>[New Thread 0x1b43 of process 5886]</i></div><div><i>[New Thread 0x1d2f of process 5886]</i></div><div><i>[New Thread 0x1f07 of process 5886]</i></div><div><i>[New Thread 0x1e07 of process 5886]</i></div><div><br></div><div>From what I can see in <i>#printActivationNameFor: aMethod receiver: anObject isBlock: isBlock firstTemporary: maybeMessage</i></div></div><div>It looks like if the memory address is not an OOP, nor forwarding pointer nor...</div><div><br></div><div>It also seems like the above stack I can get is not the real cause but a side effect that makes GC to crash (#updatePointersInRangeFromto)</div><div><br></div><div>As said, I have a way to reproduce the crash, and I already have the VM compiled in debug and gdb running. I can also attach the full output of the gdb stack. </div><div><br></div><div>BTW.... in the output of the gdb I see lots of printings like:</div><div><br></div><div><i>(numStack + ReceiverIndex) &lt; (lengthOf(theContext)) 45421</i></div><div><i>(ReceiverIndex + contextSize) &lt; (lengthOfbaseHeaderformat(oop, header2, fmt)) 40416</i><br></div><div><br></div><div><br></div><div>Any pointer is appreciated.</div><div><br></div><div>Thanks!</div><div><br></div>-- <br><div>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div></div>
<br></blockquote></div><br></div></div></div></div></div>