[Vm-dev] [squeak-dev] Squeak5.3 linux ARMv6 segfaults on startup
Levente Uzonyi
leves at caesar.elte.hu
Mon Mar 16 16:33:46 UTC 2020
(cc'd vm-dev for real)
On Mon, 16 Mar 2020, Levente Uzonyi wrote:
> Hi Bruce,
>
> (cc'd vm-dev list)
> That looks interesting.
> If you have a look at the output of
>
> git diff 0b4551db2e5c00f67502250d0336757ed12ab096
> f5ec3f4fa2b61af86bbc2b82a1dabe5bfafe8f4e
>
> you'll see that only the type declarations of a few methods changed, and the
> only change is that int was rewritten to sqInt.
> On 32-bit platforms sqInt is int, so that commit should make no difference at
> all.
> (just saw that Nicolas had a look at this as well)
>
> Are you sure that's the first bad commit?
>
> The next commit (0f0b5324b6e41cda7f92c335d45e563d41285ccd) contains multiple
> arm specific changes according to its message. E.g.:
>
>> Fix old bug in ARM32 LoadEffectiveAddressMwrR
>> Improve the ARM32 trampoline marshalling code fractionally.
>
>> A number of small improvements to context creation as part of
> reversing the
>> order of comparison of the SPReg with anythin g else, to suit ARMv8.
>
>> Get the ARMv5 "stop" instruction (BKPT) correct.
>
> Which version of gcc did you use to compile the VM?
>
>
> Levente
>
> On Mon, 16 Mar 2020, Bruce O'Neel wrote:
>
>>
>> Hi,
>>
>> So since I can seem to build things on my PI, I spent last evening running
>> git bisects. What that came up with was below. The first bad commit does
>> seem like somewhere things could go bad with 32 vs 64 bit, and, possibly
>> unaligned access? Our main test case are the x86 and the x86-64 machines
>> which are famous
>> for doing unaligned access with few complaints.
>>
>> Now
>> this http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html&_ga=2.65157998.1175841526.1584348406-1352071188.1515062694 claims
>> that as of ARMv6 unaligned access is allowed and done in hardware. One
>> wonders if it is completely correctly done, and, this isn't something in
>> Debian/Raspberian, or the hardware, or ????
>>
>> Of course, that might be a rabbit hole as well.
>>
>> cheers
>>
>> bruce
>>
>> /work/share/tmp/opensmalltalk-vm$ git bisect good
>>
>> f5ec3f4fa2b61af86bbc2b82a1dabe5bfafe8f4e is the first bad commit
>>
>> commit f5ec3f4fa2b61af86bbc2b82a1dabe5bfafe8f4e
>>
>> Author: smalltalking <leves at caesar.elte.hu>
>>
>> Date: Wed Jan 8 10:55:18 2020 +0000
>>
>>
>> Fix type inconsistencies (int vs sqInt) (#464)
>>
>>
>>
>> * Fix type inconsistencies (int vs sqInt)
>>
>>
>>
>> Found by trying to compile with LTO enabled.
>>
>> The VM compiles with the updated types on linux with or without LTO
>> enabled (the LTO VM is not functional).
>>
>> Didn't test with the OSes but changed the declarations in their files.
>>
>> Affected functions:
>>
>> - primInIOProcessEventsFlagAddress
>>
>> - ioGatherEntropy
>>
>> - GetAttributeString
>>
>> - primitivePluginBrowserReady
>>
>> - primitivePluginDestroyRequest
>>
>> - primitivePluginRequestFileHandle
>>
>> - primitivePluginRequestState
>>
>> - primitivePluginRequestURL
>>
>> - primitivePluginRequestURLStream
>>
>> - primitivePluginPostURL
>>
>>
>>
>> * Include sqMemoryAccess.h to have sqInt defined
>>
>>
>> :040000 040000 1488890eae3ef3147710b08b2cdf07b98e57b763
>> d6f7b25507a86fe9c5e618ccd03088598d9bc852 M platforms
>>
>> :040000 040000 97c8f9d7a00839fa93d472a8840abec8c42ff45c
>> 1e678e1e08e5badd258cce1a4a20d5c6243b39a8 M src
>>
>>
>>
>>
>> Last good commit
>>
>>
>> commit 0b4551db2e5c00f67502250d0336757ed12ab096
>>
>> Merge: f219b7218 afbf9e015
>>
>> Author: Fabio Niephaus <code at fniephaus.com>
>>
>> Date: Mon Jan 6 17:08:45 2020 +0100
>>
>>
>> Merge pull request #466 from OpenSmalltalk/dtl/build-script-patch [ci
>> skip]
>>
>>
>>
>> Fix image MC loading glitch in image build scripts when checking pack…
>>
>>
>>
>>
>>
>> With the last good commit I have a working ARM COG vm.
>>
>> Image
>> -----
>> /work/share/tmp/Squeak5.3-19431-32bit.image
>> Squeak5.3
>> latest update: #19431
>> Current Change Set: HomeProject
>> Image format 6521 (32 bit)
>>
>> Virtual Machine
>> ---------------
>> /work/share/tmp/opensmalltalk-vm/build.linux32ARMv6/squeak.cog.spur/build/squeak
>> Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives
>> VMMaker.oscog-eem.2597]
>> Unix built on Mar 16 2020 09:27:25 Compiler: 6.3.0 20170516
>> platform sources revision VM: 202001061608
>> :/work/share/tmp/opensmalltalk-vm Date: Mon Jan 6 17:08:45 2020 CommitHash:
>> 0b4551db2 Plugins: 202001061608 :/work/share/tmp/opensmalltalk-vm
>> CoInterpreter VMMaker.oscog-eem.2597 uuid:
>> 7a69be2e-f0d0-4d41-9854-65432d621fed Mar 16 2020
>> StackToRegisterMappingCogit VMMaker.oscog-eem.2597 uuid:
>> 7a69be2e-f0d0-4d41-9854-65432d621fed Mar 16 2020
>>
>> To Build A Similar Virtual Machine
>> ----------------------------------
>> Visit https://github.com/OpenSmalltalk/opensmalltalk-vm; follow the
>> "Clone or download" instructions, then read the top-level README.md
>> and HowToBuild files in the top-level build directory for your
>> platform(s), build.macos64x64/HowToBuild, build.win32x86/HowToBuild, etc.
>>
>>
>> Image
>> -----
>> /work/share/tmp/Squeak6.0alpha-19511-32bit.image
>> Squeak6.0alpha
>> latest update: #19511
>> Current Change Set: HomeProject
>> Image format 6521 (32 bit)
>>
>> Virtual Machine
>> ---------------
>> /work/share/tmp/opensmalltalk-vm/build.linux32ARMv6/squeak.cog.spur/build/squeak
>> Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives
>> VMMaker.oscog-eem.2597]
>> Unix built on Mar 16 2020 09:27:25 Compiler: 6.3.0 20170516
>> platform sources revision VM: 202001061608
>> :/work/share/tmp/opensmalltalk-vm Date: Mon Jan 6 17:08:45 2020 CommitHash:
>> 0b4551db2 Plugins: 202001061608 :/work/share/tmp/opensmalltalk-vm
>> CoInterpreter VMMaker.oscog-eem.2597 uuid:
>> 7a69be2e-f0d0-4d41-9854-65432d621fed Mar 16 2020
>> StackToRegisterMappingCogit VMMaker.oscog-eem.2597 uuid:
>> 7a69be2e-f0d0-4d41-9854-65432d621fed Mar 16 2020
>>
>> To Build A Similar Virtual Machine
>> ----------------------------------
>> Visit https://github.com/OpenSmalltalk/opensmalltalk-vm; follow the
>> "Clone or download" instructions, then read the top-level README.md
>> and HowToBuild files in the top-level build directory for your
>> platform(s), build.macos64x64/HowToBuild, build.win32x86/HowToBuild, etc.
>>
>> Tiny Benchmarks
>> ---------------
>> 320,000,000 bytecodes/sec; 19,000,000 sends/sec
>>
>>
>> 15 March 2020 23:39 tim Rowledge <tim at rowledge.org> wrote:
>>
>>
>> > On 2020-03-15, at 1:11 PM, Bruce O'Neel wrote:
>> >
>> >
>> > Hi,
>> >
>> > It looks like
>> >
>> > sudo apt-get install libgl1-mesa-dev
>> >
>> > replaces
>> >
>> > sudo apt-get install libgl-mesa-dev
>>
>> Looks like it; at least it built ok. Eventually we'll see if it works!
>>
>>
>> tim
>> --
>> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>> Oxymorons: Act naturally
>>
>>
>>
>>
>>
>>
>
More information about the Vm-dev
mailing list