<div dir="ltr">Hi,<div><br></div><div>Thanks for you example, I could reproduce.</div><div><br></div><div>It seems when the VM tries to grow the remember set while there is not enough free space in old space to grow it, it does that error. </div><div><br></div><div>In your case, the remember set grows in the middle of a GC, and during GC there is not enough free space in old space to allocate a larger remember set. The full GC includes a scavenge, the scavenge tenures objects leading to a growth of the remembered table, and as old space is not reclaimed yet (later in the full GC phase), there is not enough free space for it. I don't think at this point we can do a scavenge for Remembered table shrinkage (we're already in the middle of a scavenge, which is part of the full GC). Hence I think the best bet is to allocate a new old space memory segment, even though that operation can fail, it's still better than crashing. There are other solutions I can think of but I don't like any of them.</div><div><br></div><div>In <font face="monospace, monospace">SpurGenerationScavenger>>growRememberedSet</font>, we have:</div><div><br></div><div>...</div><div><div><font face="monospace, monospace">newObj := manager allocatePinnedSlots: numSlots * 2.</font></div><div><font face="monospace, monospace"><span style="white-space:pre">      </span>newObj ifNil:</font></div><div><font face="monospace, monospace"><span style="white-space:pre">          </span>[newObj := manager allocatePinnedSlots: numSlots + 1024.</font></div><div><font face="monospace, monospace"><span style="white-space:pre">               </span> newObj ifNil:</font></div><div><font face="monospace, monospace"><span style="white-space:pre">                 </span>[self error: 'could not grow remembered set']].</font></div></div><div>...</div><div><br></div><div>If I replace:</div><div><br></div><div><span style="font-family:monospace,monospace">self error: 'could not grow remembered set'</span><br></div><div><span style="font-family:monospace,monospace"><br></span></div><div><font face="arial, helvetica, sans-serif">by:</font></div><div><span style="font-family:monospace,monospace"><br></span></div><div><div><font face="monospace, monospace">(manager growOldSpaceByAtLeast: numSlots + 1024) ifNil: [</font><span style="font-family:monospace,monospace">self error: 'could not grow remembered set'</span><font face="monospace, monospace">].</font></div><div><font face="monospace, monospace">newObj := manager allocatePinnedSlots: numSlots + 1024. "cannot fail"</font></div></div><div><br></div><div>Then your example works (in 5min45sec on my machine).</div><div><br></div><div>I would like to have Eliot's opinion before integrating as I am not sure if growing old space in the middle of a scavenge performed during a full GC is a good idea, there might be some strange uncommon interactions with the rest of the GC logic I don't see right now. </div><div><br></div><div>Eliot what do you think ?</div><div><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 19, 2017 at 9:52 PM, Phil B <span dir="ltr"><<a href="mailto:pbpublist@gmail.com" target="_blank">pbpublist@gmail.com</a>></span> wrote:<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="auto"><div dir="auto"><span style="font-family:sans-serif">Clément,</span><br></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div>I was curious as to whether you or Eliot were able to get anything useful from this or not.<div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Phil</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Oct 13, 2017 2:52 AM, "Clément Bera" <<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail-m_531649886662147090quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 12, 2017 at 9:41 PM, Phil B <span dir="ltr"><<a href="mailto:pbpublist@gmail.com" target="_blank">pbpublist@gmail.com</a>></span> wrote:<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="auto"><span style="font-family:sans-serif">Clément,</span><div dir="auto"><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Oct 11, 2017 4:09 AM, "Clément Bera" <<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail-m_531649886662147090m_-4745356188533487573m_1650672647837637772m_9020003116192838897quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi,<div><br></div><div>Without a way to reproduce, it is difficult to deal with the problem.</div><div><br></div><div dir="auto"></div></div></blockquote></div></div></div><div dir="auto">Hopefully, this will allow you to do so: <a href="https://github.com/pbella/VmIssueCouldNotGrow" target="_blank">https://github.com/pbella/VmIs<wbr>sueCouldNotGrow</a></div><div dir="auto"><br></div><div dir="auto">This turned out to be tricky to provide a repo case for since I'm not sure exactly what is triggering it so I reproduced the type of work I'm throwing at the VM (it's a bulk parser/loader) where there's lots of continuous allocation going on with the occasional saving of a result to generate lots of garbage.  This should run in 5-10 minutes depending on the speed of your system.</div><div dir="auto"><br></div><div dir="auto">The main caveat is that I'm only able to get this example to reliably reproduce with the included VM with the commented VM parameters applied.  So I'm not sure if this is an issue only with this particular VM/parameter combination or if it's just generally a difficult to reproduce issue.</div></div></blockquote><div><br></div><div>Ok.</div><div><br></div><div>Today I am very busy.</div><div><br></div><div>I will try to have a look tomorrow, else Eliot said he could have a look next week. 5-10 min means if I want to simulate I must likely will need to start simulation tonight and debug tomorrow morning.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Phil</div></div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_531649886662147090m_-4745356188533487573gmail_signature"><div dir="ltr"><span style="font-size:12.8px">Clément Béra</span><div style="font-size:12.8px">Pharo consortium engineer</div><div style="font-size:12.8px"><a href="https://clementbera.wordpress.com/" target="_blank">https://clementbera.wordpress.<wbr>com/</a><br></div><div style="font-size:12.8px"><span style="line-height:16px">Bâtiment B 40, avenue Halley 59650 </span><span style="font-weight:bold;line-height:16px">Villeneuve d'Ascq</span></div></div></div>
</div></div>
<br></blockquote></div><br></div></div></div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span style="font-size:12.8px">Clément Béra</span><div style="font-size:12.8px">Pharo consortium engineer</div><div style="font-size:12.8px"><a href="https://clementbera.wordpress.com/" target="_blank">https://clementbera.wordpress.com/</a><br></div><div style="font-size:12.8px"><span style="line-height:16px">Bâtiment B 40, avenue Halley 59650 </span><span style="font-weight:bold;line-height:16px">Villeneuve d'Ascq</span></div></div></div>
</div></div></div>