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
Bus error on Raspberry Pi 2 armv7 command line app #22384
Comments
There are a number of reasons this could be happening. We'll have to narrow it down. If possible, we can get the best information if you can run a Debug build of the VM under gdb, and get a stack trace for the crash. If the stack trace looks reasonable, we're probably not passing the right flags to the compiler for this ARM CPU, or we could also need a different cross-compiler entirely. gdb may also be confused at this point. This indicates the crash is happening in generated code. In that case, it can be useful to disassemble the code at the point of the crash. In either of these cases, it can also be useful to have the address whose access caused the crash. If you have time to track down this information that would be a big help. If not, one of us will probably grab a Pi2 and try to get things working eventually. Thanks for the bug report! Set owner to @zanderso. |
This comment was originally written by la...@gmail.com Same thing happens on my Pi2 when sending the first command to the mongod server. This happened on the older Model B, too. And also with older dartlang versions (I tried 1.8.0). |
Added Accepted label. |
From http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html Further, unaligned accesses are only allowed to regions marked as Normal memory type, and unaligned access support must be enabled by setting the SCTLR.A bit in the system control coprocessor. Attempts to perform unaligned accesses when not allowed will cause an alignment fault (data abort). === I am wondering whether the SCTLR.A bit is not set by the boot images being used here. |
This comment was originally written by laeu...@gmail.com From what I heard (maybe the presentation press conference https://www.youtube.com/watch?v=My4iAv5b_ts), the RPi2, even though ARMv7, is configured to behave just like the older models (ARMv6 and hard float, IIRC), to be backwards compatible at least in user land. This should be the case at least when on the Raspbian image available for download. On the new (RPi2-only) Ubuntu image that may be different. |
This comment was originally written by sim...@jseb.com Update - So the issue is not urgent for me, just interested in timezone pub package. Unhandled exception: #0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886) |
You can check alignment handling by doing: $ cat /proc/cpu/alignment This will show stats about unaligned accesses, and the last line will show what the kernel does with unaligned access traps. I've been able to repro the failure in #6 on both hardware and in our simulator. It appears there's a bug in optimizing typed data array accesses in Location.fromBytes in the timezone package. I will investigate further. Removed Priority-Low label. |
This comment was originally written by sim...@jseb.com Cool, thanks just compiled and getting expected results now with Seems the alignment is now being fixed on/by my raspberry pi 2, which must be causing the slow down compared to old AMD linux box, with the program taking around 5 seconds to run on pi 2 and around 0.5 seconds on ReleaseIA32/AMD. Thanks for working on this, again extremely low priority for me, I wonder if alignment issue for other small arm devices running linux and or android. More details My default cat /proc/cpu/alignment has "User faults: 2 (fixup)" |
Fixed by https://codereview.chromium.org/1068823004/ in r44955 The timezone package appears to rely on a data file containing lots of unaligned fields. Reading in and parsing this file is likely the source of the alignment traps and slowdown. Aligning the fields would probably improve performance on Intel, as well. It might be worthwhile filing a bug against the timezone package. Thanks for reporting issue! Happy to have this bug fixed =) Added Fixed label. |
This issue was originally filed by sim...@jseb.com
What steps will reproduce the problem?
import 'package:timezone/standalone.dart';
main() {
print("detroit time");
initializeTimeZone().then((_) {
final detroit = getLocation('America/Detroit');
final now = new TZDateTime.now(detroit);
print("detroit time is $now");
});
}
What is the expected output? What do you see instead?
Expected Result, on Intel cpu
detroit time
detroit time is 2015-02-11 18:09:25.986-0500
Failed Result, on Raspberry Pi 2 armv7
detroit time
Bus error
What version of the product are you using?
Dart VM version: 1.9.0-edge.43675 (Wed Feb 11 16:14:19 2015) on "linux_arm"
On what operating system?
Debian raspbian jessie
uname -a
Linux raspberrypi 3.18.5-v7+ #225 SMP PREEMPT Fri Jan 30 18:53:55 GMT 2015 armv7l GNU/Linux
What browser (if applicable)?
N/A command line app
Please provide any additional information below.
Linux dmesg command after bus error
[36831.772850] Alignment trap: not handling instruction ed930b00 at [<0068ccd8>]
[36831.772882] Unhandled fault: alignment exception (0x001) at 0xb5534789
The text was updated successfully, but these errors were encountered: