[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Armv8 crash in MVC (Issue #617)

edoneel notifications at github.com
Wed Mar 2 20:52:35 UTC 2022


In response to Marcel - it does not seem that these fast code paths are designed to work on x86.

This is selected in ./opensmalltalk-vm/platforms/unix/config/configure around line 18555 or so.  I have pasted it below.

The BitBltGeneric.c file that fails is only but for Arm32 and Arm64.

In the x86-64 one only uses BitBltPlugin.c.

I've not spent a lot of time looking but it looks like the contents of platforms/Cross/plugins/BitBltPlugin is just the source code that the Pi Foundation paid to write.  

So now it is clearer why it never failed for anything else other than the ArmV8 systems.

Maybe the other problem is that accidentally this is thinking it is still on a 32 bit systems rather than a 64 bit systems since it does seem to be used by the 32 bit systems as well.  

When I set a breakpoint at fastPathBottomToTop on a Arm32 system, and then do the steps above that causes the crash on Arm64 then it hits the breakpoint.



Arm32 example:

$ lscpu
Architecture:        armv7l
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           ARM
Model:               3
Model name:          Cortex-A72
Stepping:            r0p3
CPU max MHz:         1800.0000
CPU min MHz:         600.0000
BogoMIPS:            108.00
Flags:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32

GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./squeak...done.
(gdb) break fastPathBottomToTop
Breakpoint 1 at 0xc1b0c: file. XXXopensmalltalk-vm/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c, line 519.
(gdb) run ~/archive/StcStw/sim/StcStw-32
Starting program: XXX/local/squeak/squeak ~/archive/StcStw/sim/StcStw-32
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb5eaa400 (LWP 22687)]
[New Thread 0xb56a9400 (LWP 22688)]
[New Thread 0xb4da8400 (LWP 22689)]
pthread_setschedparam failed: Operation not permitted
This VM uses a separate heartbeat thread to update its internal clock
and handle events.  For best operation, this thread should run at a
higher priority, however the VM was unable to change the priority.  The
effect is that heavily loaded systems may experience some latency
issues.  If this occurs, please create the appropriate configuration
file in /etc/security/limits.d/ as shown below:

cat <<END | sudo tee /etc/security/limits.d/squeak.conf
*      hard    rtprio  2
*      soft    rtprio  2

and report to the squeak mailing list whether this improves behaviour.

You will need to log out and log back in for the limits to take effect.
For more information please see

Thread 1 "squeak" hit Breakpoint 1, fastPathBottomToTop (op=0xbefcc7a8, 

Snip from configure.

rm -f BitBltPlugin.sub BitBltPlugin.lib

case $host_cpu in
case $host_cpu in
  armv6*) arm_arch="6" ;;
  armv7*) arm_arch="7-A" ;;
# Check whether --enable-fast-bitblt was given.
if test "${enable_fast_bitblt+set}" = set; then :
  enableval=$enable_fast_bitblt;  if   test "x$enableval" = "xyes" ; then
      bitblt_objs="BitBltPlugin.o BitBltArm.o BitBltArmLinux.o BitBltArmSimd.o BitBltDispatch.o BitBltGeneric.o BitBltArmSimdAlphaBlend.o BitBltArmSimdBitLogical.o BitBltArmSimdCompare.o BitBltArmSimdPixPaint.o BitBltArmSimdSourceWord.o"


# Check whether --enable-fast-bitblt was given.
if test "${enable_fast_bitblt+set}" = set; then :
  enableval=$enable_fast_bitblt;  if   test "x$enableval" = "xyes" ; then
      bitblt_objs="BitBltPlugin.o BitBltArm64.o BitBltDispatch.o BitBltGeneric.o"







Reply to this email directly or view it on GitHub:
You are receiving this because you are subscribed to this thread.

Message ID: <OpenSmalltalk/opensmalltalk-vm/issues/617/1057366242 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20220302/c83ce5a2/attachment-0001.html>

More information about the Vm-dev mailing list