<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:large">Hi Andrei,<br></div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">   fixed in commit 561b06530bbaed5f19e9d7f077a7df9eb3a8d236, VMMaker.oscog-eem.2824</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 11, 2020 at 8:58 AM Andrei Chis <<a href="mailto:chisvasileandrei@gmail.com">chisvasileandrei@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <div dir="ltr">Hi,<div><br></div><div>We are getting often crashes on our CI when calling `Context>copyTo:` in a GT image and a vm build from <a href="https://github.com/feenkcom/opensmalltalk-vm" target="_blank">https://github.com/feenkcom/opensmalltalk-vm</a>.</div><div><br></div><div>To sum up during `Context>copyTo:`, `Object>>#copy` is called on a context leading to a segmentation fault crash. Looking at that context in lldb the pc looks off.  It has the value `0xfffffffffea7f6e1`.</div><div><div><br></div><div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);border-top-left-radius:6px;border-top-right-radius:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px;color:rgb(36,41,46)"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;padding:0px;margin:0px;border-top-left-radius:6px;border-top-right-radius:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit;background-position:initial initial;background-repeat:initial initial"> (lldb) call (void *) printOop(0x1206b6990)
    0x1206b6990: a(n) Context
     0x1206b6a48 0xfffffffffea7f6e1                0x9        0x1146b2e08        0x1206b6b00 
     0x1206b6b28        0x1206b6b50 <br></code></pre></div></div><div><br></div><div>Can this indicate some corruption or is it expected to have such values? `CoInterpreter>>ensureContextHasBytecodePC:` has code that also handles negative values for the pc which suggests that this might be expected.<br></div><div><br></div><div>Changing `Context>copyTo:` by adding a `self pc` before calling `self copy` leads to no more crashes. Not sure if there is a reason for that or just plain luck.</div><div><br></div><div>A simple reduced stack is below (more details in this issue [1]). The crash happens always with contexts reified as objects (in this case 0x1206b6990 s [] in GtExamplesCommandLineHandler>runPackages). </div><div>Could this suggest some kind of issue in the vm when reifying contexts, or just some other problem with memory corruption? </div><div><br></div><div><br></div><div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);border-top-left-radius:6px;border-top-right-radius:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px;color:rgb(36,41,46)"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;padding:0px;margin:0px;border-top-left-radius:6px;border-top-right-radius:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit;background-position:initial initial;background-repeat:initial initial"> 0x7ffeefbb4380 M Context(Object)>copy 0x1206b6990: a(n) Context
    0x7ffeefbb43b8 M Context>copyTo: 0x1206b6990: a(n) Context
    0x7ffeefbb4400 M Context>copyTo: 0x1206b5ae0: a(n) Context
  ...
    0x7ffeefba6078 M Context>copyTo: 0x110548b28: a(n) Context
    0x7ffeefba60d0 I Context>copyTo: 0x110548a70: a(n) Context
    0x7ffeefba6118 I MessageNotUnderstood(Exception)>freezeUpTo: 0x110548a20: a(n) MessageNotUnderstood
    0x7ffeefba6160 I MessageNotUnderstood(Exception)>freeze 0x110548a20: a(n) MessageNotUnderstood
    0x7ffeefba6190 M [] in GtExampleEvaluator>result 0x110544fb8: a(n) GtExampleEvaluator
    0x7ffeefba61c8 M BlockClosure>cull: 0x110545188: a(n) BlockClosure
    0x7ffeefba6208 M Context>evaluateSignal: 0x110548c98: a(n) Context
    0x7ffeefba6240 M Context>handleSignal: 0x110548c98: a(n) Context
    0x7ffeefba6278 M Context>handleSignal: 0x110548be0: a(n) Context
    0x7ffeefba62b0 M MessageNotUnderstood(Exception)>signal 0x110548a20: a(n) MessageNotUnderstood
    0x7ffeefba62f0 M GtDummyExamplesWithInheritanceSubclassB(Object)>doesNotUnderstand: exampleH 0x1105487d8: a(n) GtDummyExamplesWithInheritanceSubclassB
    0x7ffeefba6328 M GtExampleEvaluator>primitiveProcessExample:withEvaluationContext: 0x110544fb8: a(n) GtExampleEvaluator
 ...
    0x7ffeefbe64d0 M [] in GtExamplesHDReport class(HDReport class)>runPackages: 0x1145e41c8: a(n) GtExamplesHDReport class
    0x7ffeefbe6520 M [] in Set>collect: 0x1206b5ab0: a(n) Set
    0x7ffeefbe6568 M Array(SequenceableCollection)>do: 0x1206b5c50: a(n) Array
       0x1206b5b98 s Set>collect:
       0x1206b5ae0 s GtExamplesHDReport class(HDReport class)>runPackages:
       0x1206b6990 s [] in GtExamplesCommandLineHandler>runPackages
       0x1206b6a48 s BlockClosure>ensure:
       0x1206b6b68 s UIManager class>nonInteractiveDuring:
       0x1206b6c48 s GtExamplesCommandLineHandler>runPackages
       0x1206b6d98 s GtExamplesCommandLineHandler>activate
       0x1206b75d0 s GtExamplesCommandLineHandler class(CommandLineHandler class)>activateWith:
       0x1207d2f00 s [] in PharoCommandLineHandler(BasicCommandLineHandler)>activateSubCommand:
       0x1207e6620 s BlockClosure>on:do:
       0x1207f7ab8 s PharoCommandLineHandler(BasicCommandLineHandler)>activateSubCommand:
       0x120809d40 s PharoCommandLineHandler(BasicCommandLineHandler)>handleSubcommand
       0x12082ca60 s PharoCommandLineHandler(BasicCommandLineHandler)>handleArgument:
       0x120789938 s [] in PharoCommandLineHandler(BasicCommandLineHandler)>activate
       0x1207a83e0 s BlockClosure>on:do:
       0x1207b57a0 s [] in PharoCommandLineHandler(BasicCommandLineHandler)>activate
       0x1207bf830 s [] in BlockClosure>newProcess</code></pre></div><div>Cheers,</div><div>Andrei</div><div><br></div><div><br></div><div>[1] <a href="https://github.com/feenkcom/gtoolkit/issues/1440" target="_blank">https://github.com/feenkcom/gtoolkit/issues/1440</a></div><div><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>