<div dir="ltr"><div>Thanks Ben, nice references!</div><div>I opted for a simple reduction of TestCase timeout and/or Smalltalk buffer size, and could easily obtain a TestCase timeout on linux.</div><div>But unfortunately, no crash, no rr...</div><div>I have reduced the crash to testSendTimeout on macos, something like <br></div><div><br></div><div>Smalltalk saveAs: 'crash'.<br>Smalltalk snapshot: true andQuit: true.<br>20 timesRepeat: [[(SocketTest selector: #testSendTimeout) runCase] on: TestFailure do: [:exc|]].</div><div><br></div><div>Hoping that narrowing will improve repeatability...</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 25 sept. 2019 à 14:58, Ben Coman <<a href="mailto:btc@openinworld.com">btc@openinworld.com</a>> a écrit :<br></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="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 25 Sep 2019 at 15:32, Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br></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="ltr"><div>I noticed that many crash happen in testSendTimeout.</div><div>This test is organizing a race:</div><div>- Smalltalk fill the socket send buffer</div><div>- the OS tries to drain</div><div><br></div><div>The other thing I noticed is that <font face="verdana,sans-serif">[</font>SocketTest suite run] takes 7 to 8s on macos while only 2 to 3s on ubuntu and windows</div><div>So it might be that some test times out on macos, while it doesn't on other OS.</div><div><br></div><div>This would explain that many crash also happen in JITted Timer loop, and that we cannot observe it in other OSes.</div><div><br></div><div>The access to OS ressources and the race may also explain some randomization of the crash...<br></div><div><br></div><div>So one idea would be to make the test timeout in linux too, see if we can make it crash then try using rr.</div><div>Maybe it's possible with a huge Socket buffer, a smaller image side buffer (we could reduce the size from 1000 to 1 so as to increase overhead).</div></div></blockquote><div><br></div><div>How that might be done spiked my interest, so I had a poke around...</div><div>* <a href="https://serverfault.com/questions/799605/set-large-buffer-queue-on-a-network-interface-to-emulate-bufferbloat" target="_blank">https://serverfault.com/questions/799605/set-large-buffer-queue-on-a-network-interface-to-emulate-bufferbloat</a></div><div></div><div>* <a href="https://coderwall.com/p/wuwoja/simulate-network-latency-to-debug-connection-timeouts" target="_blank">https://coderwall.com/p/wuwoja/simulate-network-latency-to-debug-connection-timeouts</a></div><div>* <a href="https://stackoverflow.com/questions/614795/simulate-delayed-and-dropped-packets-on-linux" target="_blank">https://stackoverflow.com/questions/614795/simulate-delayed-and-dropped-packets-on-linux</a></div><div><br></div><div>But those might not directly affect the send buffer, so maybe an alternative...</div><div><div>* <a href="https://utcc.utoronto.ca/~cks/space/blog/linux/TCPSendbufferDefaultSize" target="_blank">https://utcc.utoronto.ca/~cks/space/blog/linux/TCPSendbufferDefaultSize</a></div><div>* <a href="https://stackoverflow.com/questions/47350028/how-to-tune-linux-network-buffer-size" target="_blank">https://stackoverflow.com/questions/47350028/how-to-tune-linux-network-buffer-size</a></div><div>* <a href="https://www.cyberciti.biz/faq/linux-tcp-tuning/" target="_blank">https://www.cyberciti.biz/faq/linux-tcp-tuning/</a></div><div><br></div><div>cheers -ben<br></div></div><div><br></div><div>P.S. Probably not specifically useful, but Oh Wow! just-too-impressive and more-than-you-could-possible-want-to-know about Linux networking... </div><div><div><a href="https://blog.packagecloud.io/eng/2017/02/06/monitoring-tuning-linux-networking-stack-sending-data" target="_blank">https://blog.packagecloud.io/eng/2017/02/06/monitoring-tuning-linux-networking-stack-sending-data</a>  <br></div><div><br></div></div><div></div></div></div>
</blockquote></div>