<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"><<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>></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 <<a href="mailto:petr.fischer@me.com">petr.fischer@me.com</a>> wrote:<br>
> Yes there is "PharoVMBuilder buildFreeBSD", but some "cog*" errors occurs... So I am still building with "PharoVMSpur32Builder buildUnix32" under Linux (CentOS6) and then move compiled vm to my FreeBSD box with Linux compatibility layer.<br>
><br>
> I compiled DEBUG vm version according to your advice and this is gdb output:<br>
><br>
> Program received signal SIGSEGV, Segmentation fault.<br>
> 0x080aefc1 in scavengeReferentsOf (referrer=684415032) at /home/pf/pharo/pharo-vm-debug/src/vm/gcc3x-cointerp.c:39014<br>
> 39014 if (((longAt(referent)) & ((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>
><br>
> I need to learn a little, how to play this "core C" game in gdb...<br>
> What next?<br>
<br>
</span>I recently learnt a bit of using gdb on the image. I'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'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>
><br>
> A also compiled PharoS (Pharo Stack) VM, and it'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'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'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>
><br>
> pf<br>
><br>
><br>
>> You could build a debug VM from here<br>
>> <a href="https://github.com/pharo-project/pharo-vm" rel="noreferrer" target="_blank">https://github.com/pharo-project/pharo-vm</a><br>
>> I also glimpsed some FreeBSD build options there you might try.<br>
>> cheers -ben<br>
>><br>
>> On Fri, Jun 24, 2016 at 12:05 PM, Petr Fischer <<a href="mailto:petr.fischer@me.com">petr.fischer@me.com</a>> wrote:<br>
>><br>
>> > So... I compiled latest sources (blessed) on CentOS 6.8, fine, moved<br>
>> > compiled binaries to FreeBSD and tried to load Seaside to the latest 50760<br>
>> > image.<br>
>> > Still stack errors, log here: <a href="http://pastebin.com/raw/bf1EpWNt" rel="noreferrer" target="_blank">http://pastebin.com/raw/bf1EpWNt</a><br>
>> ><br>
>> > When I run this on CentOS, everything is fine (loading Seaside, no stack<br>
>> > errors), but when I run the same on FreeBSD, stack errors (segfaults)<br>
>> > occurs.<br>
>> ><br>
>> > So... There is something bad on FreeBSD side? Can I debug more?<br>
>> ><br>
>> > pf<br>
>> ><br>
>> ><br>
>> > > Try 50760 from...<br>
>> > > <a href="http://files.pharo.org/image/50/" rel="noreferrer" target="_blank">http://files.pharo.org/image/50/</a><br>
>> > ><br>
>> > > cheers -ben<br>
>> > ><br>
>> > > On Sat, Jun 18, 2016 at 12:49 AM, Petr Fischer <<a href="mailto:petr.fischer@me.com">petr.fischer@me.com</a>><br>
>> > wrote:<br>
>> > > > VM version (from<br>
>> > <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>
>> > > ><br>
>> > > > 5.0 #1 Sun Jan 17 14:19:14 CET 2016 gcc 4.7.2 [Production Spur ITHB VM]<br>
>> > > > CoInterpreter VMMaker.oscog-eem.1630 uuid:<br>
>> > 2ed025ea-f400-4440-8e8b-5aa46d06c9ab Jan 17 2016<br>
>> > > > StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid:<br>
>> > 2ed025ea-f400-4440-8e8b-5aa46d06c9ab Jan 17 2016<br>
>> > > > <a href="https://github.com/estebanlm/pharo-vm.git" rel="noreferrer" target="_blank">https://github.com/estebanlm/pharo-vm.git</a> Commit:<br>
>> > 21ec004cce7d26010c18d357c805a0e1a4ffe376 Date: 2016-01-14 11:42:33 +0100<br>
>> > By: Esteban Lorenzano <<a href="mailto:estebanlm@gmail.com">estebanlm@gmail.com</a>> Jenkins build #498<br>
>> > > > Linux swing-hudson-lin64 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2<br>
>> > x86_64 GNU/Linux<br>
>> > > > plugin path: /usr/home/pf/Work/Smalltalk/pharo5.0.centos/bin [default:<br>
>> > /usr/home/pf/Work/Smalltalk/pharo5.0.centos/bin/]<br>
>> > > ><br>
>> > > > Image version (from official 5.0 download):<br>
>> > > ><br>
>> > > > [version] 5.0 #50723<br>
>> > > ><br>
>> > > > pf<br>
>> > > ><br>
>> > > >> in fact, this is not related to FFI… but it should be fixed…<br>
>> > > >><br>
>> > > >> along with the VM version, which version of Pharo are you using?<br>
>> > > >><br>
>> > > >> Esteban<br>
>> > > >><br>
>> > > >> > On 17 Jun 2016, at 14:04, Max Leske <<a href="mailto:maxleske@gmail.com">maxleske@gmail.com</a>> wrote:<br>
>> > > >> ><br>
>> > > >> > Hi Petr,<br>
>> > > >> ><br>
>> > > >> > That looks like a bug with FreeType with our FFI. It should<br>
>> > actually have been fixed but I don’t know if the VM for FreeBSD is up to<br>
>> > date. Can you post the output of “Smalltalk vm version”?<br>
>> > > >> ><br>
>> > > >> > Cheers,<br>
>> > > >> > Max<br>
>> > > >> ><br>
>> > > >> >> On 17 Jun 2016, at 13:26, Petr Fischer <<a href="mailto:petr.fischer@me.com">petr.fischer@me.com</a>><br>
>> > wrote:<br>
>> > > >> >><br>
>> > > >> >> Hello, I got some random segfaults (while loading Seaside) with 32<br>
>> > bit spur vm on FreeBSD - can someone (with low level knowledge) decode<br>
>> > attached log?<br>
>> > > >> >> Is this some problem with stack size? Can I fix this?<br>
>> > > >> >><br>
>> > > >> >> Log:<br>
>> > > >> >> <a href="http://pastebin.com/raw/NpFUnjh0" rel="noreferrer" target="_blank">http://pastebin.com/raw/NpFUnjh0</a><br>
>> > > >> >><br>
>> > > >> >> There is "**StackOverflow**" 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>