Skip to content

ARM v6 is not supported on 1.13 and 1.14 #25562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
whesse opened this issue Jan 22, 2016 · 8 comments
Closed

ARM v6 is not supported on 1.13 and 1.14 #25562

whesse opened this issue Jan 22, 2016 · 8 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-io P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@whesse
Copy link
Contributor

whesse commented Jan 22, 2016

Dart versions after 1.12 have a segfault when built for ARM v6. A hello world program works fine, but pub get fails.
The most likely candidate is the switch from NSS to BoringSSL. It would be good if people could verify that a program using secure sockets fails, and others don't. There are also variables that can be set in the gyp files, to build a Dart VM without BoringSSL or secure networking support.

It is listed in our FAQ that we support ARM v6, and the Rasberry pi one and zero use it, I think.
So we need to decide what to do about this. There is also an issue on ARM64 support, which is just waiting on a roll of BoringSSL to a more recent version #24321

@sgjesse @mit-mit @zanderso

@whesse whesse added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-io labels Jan 22, 2016
@sebe
Copy link

sebe commented Jan 22, 2016

I used the test from #24855

Here is what happens on my pi zero
pi@pizero:~/testdart $ cat pubspec.yaml
name: test
version: 0.0.1
author: tester
environment:
sdk: '>1.12.0 <2.0.0'
dependencies:
yaml: any

pi@pizero:~/testdart $ ulimit -c unlimited # to allow core to be generated

pi@pizero:~/testdart $ ../dart-sdk-d/bin/pub get -v
FINE: Pub 1.14.0-dev.7.2
MSG : Resolving dependencies...
SLVR: Solving dependencies:
| - yaml any from hosted (yaml)
IO : Get versions from https://pub.dartlang.org/api/packages/yaml.
FINE: HTTP GET https://pub.dartlang.org/api/packages/yaml
| Accept: application/vnd.pub.v2+json
| user-agent: Dart pub 1.14.0-dev.7.2
Segmentation fault (core dumped)

pi@pizero:~/testdart $ gdb /home/pi/dart-sdk-d/bin/dart core
GNU gdb (Raspbian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 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:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/pi/dart-sdk-d/bin/dart...(no debugging symbols found)...done.
[New LWP 1473]
[New LWP 1468]
[New LWP 1471]
[New LWP 1472]
[New LWP 1475]
[New LWP 1476]
[New LWP 1477]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Core was generated by `/home/pi/dart-sdk-d/bin/dart /home/pi/dart-sdk-d/bin/snapshots/pub.dart.snapsho'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0046a8d4 in ?? ()
(gdb) disassemble 0x0046a8c0,+32
Dump of assembler code from 0x46a8c0 to 0x46a8e0:
0x0046a8c0: ldr r6, [r3, r6, lsl #2]
0x0046a8c4: eor lr, lr, r8
0x0046a8c8: add r5, r5, #64 ; 0x40
0x0046a8cc: and r12, r12, #63 ; 0x3f
0x0046a8d0: lsr r2, r2, #18
=> 0x0046a8d4: ldr r5, [r3, r5, lsl #2]
0x0046a8d8: eor lr, lr, r7
0x0046a8dc: add r12, r12, #192 ; 0xc0
End of assembler dump.
(gdb) quit

@zanderso
Copy link
Member

Disabling the hand-coded assembly in boringssl makes the crash during pub get go away.

https://codereview.chromium.org/1613233006/

In a case like this, where the fix isn't obvious, I'm not sure that trying to find and upstream a fix for the hand-coded assembly is the right thing to do. We should rather file a bug with the boringssl authors.

@zanderso
Copy link
Member

@sebe If you're set up to do a build for Pi0, could you give this fix a try? Thanks!

@zanderso
Copy link
Member

/cc @danrubel

@sebe
Copy link

sebe commented Jan 23, 2016

applied the patch to third_party/boringssl/boringssl_configurations.gypi
and still getting Segmentation fault.

@zanderso
Copy link
Member

You'd also need the first of the two patches above, and to pass -a armv6 to build.py instead of just arm. If it's still segfaulting after that, then we'll have to track that down.

@sebe
Copy link

sebe commented Jan 23, 2016

Cool, -a armv6 is not a option for my build.py, so I just changed it to Dart_arm_Base from Dart_armv6_Base in the patch and pub get works fine now.
List of -a options.
-a [all,ia32,x64,simarm,arm,simarmv5te,armv5te,simmips,mips,simarm64,arm64,],

@zanderso
Copy link
Member

This crash has been fixed on bleeding edge by the two CLs above.

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed Priority-Medium labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-io P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants