<div dir="ltr">Hi Ben,<div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 26, 2016 at 6:44 AM, Ben Coman <span dir="ltr">&lt;<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On Sun, Jun 26, 2016 at 8:37 PM, Petr Fischer &lt;<a href="mailto:petr.fischer@me.com">petr.fischer@me.com</a>&gt; wrote:<br>
&gt; Yes there is &quot;PharoVMBuilder buildFreeBSD&quot;, but some &quot;cog*&quot; errors occurs... So I am still building with &quot;PharoVMSpur32Builder buildUnix32&quot; under Linux (CentOS6) and then move compiled vm to my FreeBSD box with Linux compatibility layer.<br>
&gt;<br>
&gt; I compiled DEBUG vm version according to your advice and this is gdb output:<br>
&gt;<br>
&gt; Program received signal SIGSEGV, Segmentation fault.<br>
&gt; 0x080aefc1 in scavengeReferentsOf (referrer=684415032) at /home/pf/pharo/pharo-vm-debug/src/vm/gcc3x-cointerp.c:39014<br>
&gt; 39014   if (((longAt(referent)) &amp; ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {<br>
<br>
</span>The C files are generated from VMMaker and the line numbers change a<br>
lot.  If you look upwards in the C file you should see a generated<br>
comment that links to the Smalltalk source it was generated from.<br>
<span class=""><br>
&gt;<br>
&gt; I need to learn a little, how to play this &quot;core C&quot; game in gdb...<br>
&gt; What next?<br>
<br>
</span>I recently learnt a bit of using gdb on the image.  I&#39;m planning to<br>
write up something but its a few weeks off.  The old post How to debug<br>
the VM? [1] by Mariano needs a bit of adaption, but got me off to a<br>
good start.  If you look in VMMaker package where  #printAllStacks  is<br>
defined you&#39;ll see some others you can call, that just print the<br>
current Smalltalk call stack.<br>
<br>
[1] <a href="https://marianopeck.wordpress.com/2011/04/23/how-to-debug-the-vm/" rel="noreferrer" target="_blank">https://marianopeck.wordpress.com/2011/04/23/how-to-debug-the-vm/</a><br>
<span class=""><br>
&gt;<br>
&gt; A also compiled PharoS (Pharo Stack) VM, and it&#39;s 5x slower, but stable, there is no stack errors (or other crashes) like in cog spur vm.<br>
<br>
</span>You might also try compiling the VM from upstream sources[2], running either:<br>
* vm/build.linux32x86/squeak.cog.spur/build.debug/mvm<br>
* vm/build.linux64x64/squeak.cog.spur/build.debug/mvm<br>
<br>
Did you try the early 64-bit Pharo Image [3] suggested by Esteban in<br>
another thread ?<br>
<br>
Also, you might try Squeak 64-bit Image, since its the platform Eliot<br>
develops the VM on, so it is further advanced in 64-bit stability.<br></blockquote><div><br></div><div>That&#39;s not true.  I develop on Mac OS X using Spur and the 32-bit VM.  I do run the 64-bit system from time to time and am currently collaborating with Bob Westergaard to move the Cadence system over to 64-bits.  I do hope to use 64-bit Spur from day-to-day but am not there yet, not for any reasons of deficiency in 64-bits but simply because my current, large, project-laden, VMMaker image is in 32-bits and I&#39;ve not changed it over yet.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Run vm/image/buildspurtrunk64image.sh.<br>
<br>
[2] <a href="https://github.com/OpenSmalltalk/vm" rel="noreferrer" target="_blank">https://github.com/OpenSmalltalk/vm</a><br>
[3] <a href="http://files.pharo.org/get-files/60/pharo-64.zip" rel="noreferrer" target="_blank">http://files.pharo.org/get-files/60/pharo-64.zip</a><br>
<br>
Now since you are getting down and dirty debugging this at VM level,<br>
probably good to shift this thread to [vm-dev].<br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/vm-dev" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/vm-dev</a><br>
<br>
cheers -ben<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; pf<br>
&gt;<br>
&gt;<br>
&gt;&gt; You could build a debug VM from here<br>
&gt;&gt; <a href="https://github.com/pharo-project/pharo-vm" rel="noreferrer" target="_blank">https://github.com/pharo-project/pharo-vm</a><br>
&gt;&gt; I also glimpsed some FreeBSD build options there you might try.<br>
&gt;&gt; cheers -ben<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Jun 24, 2016 at 12:05 PM, Petr Fischer &lt;<a href="mailto:petr.fischer@me.com">petr.fischer@me.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; &gt; So... I compiled latest sources (blessed) on CentOS 6.8, fine, moved<br>
&gt;&gt; &gt; compiled binaries to FreeBSD and tried to load Seaside to the latest 50760<br>
&gt;&gt; &gt; image.<br>
&gt;&gt; &gt; Still stack errors, log here: <a href="http://pastebin.com/raw/bf1EpWNt" rel="noreferrer" target="_blank">http://pastebin.com/raw/bf1EpWNt</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; When I run this on CentOS, everything is fine (loading Seaside, no stack<br>
&gt;&gt; &gt; errors), but when I run the same on FreeBSD, stack errors (segfaults)<br>
&gt;&gt; &gt; occurs.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; So... There is something bad on FreeBSD side? Can I debug more?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; pf<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; Try 50760 from...<br>
&gt;&gt; &gt; &gt; <a href="http://files.pharo.org/image/50/" rel="noreferrer" target="_blank">http://files.pharo.org/image/50/</a><br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; cheers -ben<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; On Sat, Jun 18, 2016 at 12:49 AM, Petr Fischer &lt;<a href="mailto:petr.fischer@me.com">petr.fischer@me.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt; &gt; &gt; VM version (from<br>
&gt;&gt; &gt; <a href="https://swing.fit.cvut.cz/jenkins/job/pharo-vm-spur-swing/" rel="noreferrer" target="_blank">https://swing.fit.cvut.cz/jenkins/job/pharo-vm-spur-swing/</a>):<br>
&gt;&gt; &gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt; 5.0 #1 Sun Jan 17 14:19:14 CET 2016 gcc 4.7.2 [Production Spur ITHB VM]<br>
&gt;&gt; &gt; &gt; &gt; CoInterpreter VMMaker.oscog-eem.1630 uuid:<br>
&gt;&gt; &gt; 2ed025ea-f400-4440-8e8b-5aa46d06c9ab Jan 17 2016<br>
&gt;&gt; &gt; &gt; &gt; StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid:<br>
&gt;&gt; &gt; 2ed025ea-f400-4440-8e8b-5aa46d06c9ab Jan 17 2016<br>
&gt;&gt; &gt; &gt; &gt; <a href="https://github.com/estebanlm/pharo-vm.git" rel="noreferrer" target="_blank">https://github.com/estebanlm/pharo-vm.git</a> Commit:<br>
&gt;&gt; &gt; 21ec004cce7d26010c18d357c805a0e1a4ffe376 Date: 2016-01-14 11:42:33 +0100<br>
&gt;&gt; &gt; By: Esteban Lorenzano &lt;<a href="mailto:estebanlm@gmail.com">estebanlm@gmail.com</a>&gt; Jenkins build #498<br>
&gt;&gt; &gt; &gt; &gt; Linux swing-hudson-lin64 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2<br>
&gt;&gt; &gt; x86_64 GNU/Linux<br>
&gt;&gt; &gt; &gt; &gt; plugin path: /usr/home/pf/Work/Smalltalk/pharo5.0.centos/bin [default:<br>
&gt;&gt; &gt; /usr/home/pf/Work/Smalltalk/pharo5.0.centos/bin/]<br>
&gt;&gt; &gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt; Image version (from official 5.0 download):<br>
&gt;&gt; &gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt; [version] 5.0 #50723<br>
&gt;&gt; &gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt; pf<br>
&gt;&gt; &gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; in fact, this is not related to FFI… but it should be fixed…<br>
&gt;&gt; &gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; along with the VM version, which version of Pharo are you using?<br>
&gt;&gt; &gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; Esteban<br>
&gt;&gt; &gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt; On 17 Jun 2016, at 14:04, Max Leske &lt;<a href="mailto:maxleske@gmail.com">maxleske@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt; Hi Petr,<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt; That looks like a bug with FreeType with our FFI. It should<br>
&gt;&gt; &gt; actually have been fixed but I don’t know if the VM for FreeBSD is up to<br>
&gt;&gt; &gt; date. Can you post the output of “Smalltalk vm version”?<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt; Cheers,<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt; Max<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt; On 17 Jun 2016, at 13:26, Petr Fischer &lt;<a href="mailto:petr.fischer@me.com">petr.fischer@me.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt; Hello, I got some random segfaults (while loading Seaside) with 32<br>
&gt;&gt; &gt; bit spur vm on FreeBSD - can someone (with low level knowledge) decode<br>
&gt;&gt; &gt; attached log?<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt; Is this some problem with stack size? Can I fix this?<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt; Log:<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt; <a href="http://pastebin.com/raw/NpFUnjh0" rel="noreferrer" target="_blank">http://pastebin.com/raw/NpFUnjh0</a><br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt; &gt;&gt; &gt;&gt; There is &quot;**StackOverflow**&quot; lines n the log...<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="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>
</div></div>