Hello,
I recently acquired a Gumstix Overo Water with a Tobi and decided to put Node.js on it to turn it into a web server of sorts.
The build dies with an "Illegal instruction" error, and I am thoroughly confused.
In order to set up the build, I did the following: 1. imaged a microSD card with the Linaro binaries indicated by http://wiki.gumstix.org/index.php?title=Installing_Linaro_Image 2. booted 3. dd'd/enabled 200MB of swap on the SD card 4. apt-get update/upgrade everything 5. installed various development dependencies (git, libc6-dev, g++, and many others) 6. cloned Joyent's repo. 7. modified `wscript` in the repo with V8-specific changes for ARM (including enabling hard-float) (modified the scons invocation in v0.8) 8. ./configure 8. make 9. observed 'illegal instruction' death in the make process:
/root/node/deps/v8/src/arguments.h: In constructor 'v8::internal::CustomArguments::CustomArguments(v8::internal::Isolate*, v8::internal::Object*, v8::internal::Object*, v8::internal::JSObject*)': /root/node/deps/v8/src/arguments.h:93:65: internal compiler error: Illegal instruction Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.6/README.Bugs for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. scons: *** [obj/release/runtime-profiler.o] Error 1 scons: building terminated because of errors.
If I restart the build, it works fine for a while (including rebuilding the object it died building) then dies again. A different portion of the build is running and it usually receives a segfault:
[ 9/35] cxx: src/node_javascript.cc -> out/Release/src/node_javascript_5.o /usr/bin/g++ -pthread -g -O3 -DHAVE_OPENSSL=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_FDATASYNC=1 -DARCH="arm" -DPLATFORM="linux" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -IRelease/src -I../src -IRelease/deps/http_parser -I../deps/http_parser -IRelease/deps/uv/include -I../deps/uv/include -IRelease/deps/uv/src/ares -I../deps/uv/src/ares -IRelease/deps/v8/include -I../deps/v8/include -Ideps/v8/include ../src/node_javascript.cc -c -o Release/src/node_javascript_5.o g++: internal compiler error: Segmentation fault (program as) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.6/README.Bugs for instructions. Waf: Leaving directory `/root/node/out'
I am confused. I've made a few observations about my setup:
* Thinking that it might be a thermal problem because it was under heavy load at 600MHz in open air, I dug out a small heat sink, attached it, and pointed a small fan at it. It now runs cool to the touch. I still get the same 'illegal instruction' deaths under load.
* Usually three invocations of 'make' are required before it actually finishes, but it does finish. I can run the command-line interpreter and it seems to behave inasmuch as I've used it. * 'make test' fails, but I think that's a Node.js/ARM problem. * I run htop to monitor the build, and sometimes the build system works fine while htop dies with an 'illegal instruction' error. * Node.js on ARM is presently somewhat sticky, so I checked out the v0.6.6 tag. v0.6.18 encounters the same problem. v0.8.9 simply segfaults instead. * I have an Overo Water (GS3503W-R2889) on a Tobi. * MLO version: I haven't the foggiest, but I get the U-Boot version string twice, once being before u-boot.bin is loaded. * U-Boot 2012.04.01 (Jul 19 2012 - 17:31:34) * I moved the SD card to a different Water/Tobi pair and I got the same error (illegal instruction, Node.js v0.8.9)
It feels like a task swapping bug in the kernel. Perhaps it's related to errata on the OMAP3530. It could also be read timeouts from the swap file on the SD card, though dmesg doesn't say anything of the sort. I found a kernel patch regarding inconsistent caches on ARM, but it hit in 2.6.33 and I'm running 3.2.1.
Has anyone seen something like this? Would anyone be willing to replicate the problem? I'd be happy to share my tweaks to Node.js' build system to get it to build.
Thanks for reading! Jon Kunkee
Like Jeff mentioned, I also saw some illegal instructions on early linaro builds but didn't pursue it at the time. I just did a little digging online and there was some mention of ARM errata causing issues ( https://bugs.launchpad.net/ubuntu/+source/fakeroot/+bug/495536)
Based on, https://github.com/gumstix/Gumstix-Overo-Kernel/blob/master/arch/arm/configs... several of the errata are not set. To be honest, I've not found a description of the errata other than the high-level detail mentioned in the kernel config so I'd love to know which are the correct ones to be setting for the Overo.
-Ash On Thu, Sep 20, 2012 at 11:00 AM, Jonathan Kunkee jonathan.kunkee@gmail.com wrote:
Hello,
I recently acquired a Gumstix Overo Water with a Tobi and decided to put Node.js on it to turn it into a web server of sorts.
The build dies with an "Illegal instruction" error, and I am thoroughly confused.
In order to set up the build, I did the following:
- imaged a microSD card with the Linaro binaries indicated by
http://wiki.gumstix.org/index.php?title=Installing_Linaro_Image 2. booted 3. dd'd/enabled 200MB of swap on the SD card 4. apt-get update/upgrade everything 5. installed various development dependencies (git, libc6-dev, g++, and many others) 6. cloned Joyent's repo. 7. modified `wscript` in the repo with V8-specific changes for ARM (including enabling hard-float) (modified the scons invocation in v0.8) 8. ./configure 8. make 9. observed 'illegal instruction' death in the make process:
/root/node/deps/v8/src/arguments.h: In constructor 'v8::internal::CustomArguments::CustomArguments(v8::internal::Isolate*, v8::internal::Object*, v8::internal::Object*, v8::internal::JSObject*)': /root/node/deps/v8/src/arguments.h:93:65: internal compiler error: Illegal instruction Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.6/README.Bugs for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. scons: *** [obj/release/runtime-profiler.o] Error 1 scons: building terminated because of errors.
If I restart the build, it works fine for a while (including rebuilding the object it died building) then dies again. A different portion of the build is running and it usually receives a segfault:
[ 9/35] cxx: src/node_javascript.cc -> out/Release/src/node_javascript_5.o /usr/bin/g++ -pthread -g -O3 -DHAVE_OPENSSL=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_FDATASYNC=1 -DARCH="arm" -DPLATFORM="linux" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -IRelease/src -I../src -IRelease/deps/http_parser -I../deps/http_parser -IRelease/deps/uv/include -I../deps/uv/include -IRelease/deps/uv/src/ares -I../deps/uv/src/ares -IRelease/deps/v8/include -I../deps/v8/include -Ideps/v8/include ../src/node_javascript.cc -c -o Release/src/node_javascript_5.o g++: internal compiler error: Segmentation fault (program as) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.6/README.Bugs for instructions. Waf: Leaving directory `/root/node/out'
I am confused. I've made a few observations about my setup:
- Thinking that it might be a thermal problem because it was under heavy
load at 600MHz in open air, I dug out a small heat sink, attached it, and pointed a small fan at it. It now runs cool to the touch. I still get the same 'illegal instruction' deaths under load.
- Usually three invocations of 'make' are required before it actually
finishes, but it does finish. I can run the command-line interpreter and it seems to behave inasmuch as I've used it.
- 'make test' fails, but I think that's a Node.js/ARM problem.
- I run htop to monitor the build, and sometimes the build system works fine
while htop dies with an 'illegal instruction' error.
- Node.js on ARM is presently somewhat sticky, so I checked out the v0.6.6
tag. v0.6.18 encounters the same problem. v0.8.9 simply segfaults instead.
- I have an Overo Water (GS3503W-R2889) on a Tobi.
- MLO version: I haven't the foggiest, but I get the U-Boot version string
twice, once being before u-boot.bin is loaded.
- U-Boot 2012.04.01 (Jul 19 2012 - 17:31:34)
- I moved the SD card to a different Water/Tobi pair and I got the same
error (illegal instruction, Node.js v0.8.9)
It feels like a task swapping bug in the kernel. Perhaps it's related to errata on the OMAP3530. It could also be read timeouts from the swap file on the SD card, though dmesg doesn't say anything of the sort. I found a kernel patch regarding inconsistent caches on ARM, but it hit in 2.6.33 and I'm running 3.2.1.
Has anyone seen something like this? Would anyone be willing to replicate the problem? I'd be happy to share my tweaks to Node.js' build system to get it to build.
Thanks for reading! Jon Kunkee
Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk%3B258768047%3B13503038%3Bj? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ gumstix-users mailing list gumstix-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gumstix-users
On Thu, Sep 20, 2012 at 7:33 PM, Ash Charles ashcharles@gmail.com wrote:
Like Jeff mentioned, I also saw some illegal instructions on early linaro builds but didn't pursue it at the time. I just did a little digging online and there was some mention of ARM errata causing issues ( https://bugs.launchpad.net/ubuntu/+source/fakeroot/+bug/495536)
Based on, https://github.com/gumstix/Gumstix-Overo-Kernel/blob/master/arch/arm/configs... several of the errata are not set. To be honest, I've not found a description of the errata other than the high-level detail mentioned in the kernel config so I'd love to know which are the correct ones to be setting for the Overo.
For omap34/35xx class hardware definitely turn on CONFIG_ARM_ERRATA_430973=y
When using a mix of arm/thumb application binaries on this core.....
Regards,
On Fri, Sep 21, 2012 at 2:48 PM, Robert Nelson robertcnelson@gmail.com wrote:
For omap34/35xx class hardware definitely turn on CONFIG_ARM_ERRATA_430973=y
When using a mix of arm/thumb application binaries on this core.....
Thanks Robert. Do you know of any references for these errata beyond just the kernel config. descriptions?
--Ash
Email client got the best of me again. Sorry, Robert, for sending this to you twice. First, a note on my earlier situation:
I just had one end-to-end build finish successfully, but it caused htop (a completely independent process) to die. Says it gave me a core dump. Without a kernel core dump this would probably be pretty useless, and I'm not sure what to do with it...if anyone is interested, let me know. It's ~770KB.
CONFIG_ARM_ERRATA_430973=y
Do you know of any references for these errata beyond just the kernel config. descriptions?
I did some research on this topic, and I understand from the OMAP3530 docs that I would have to contact TI with my silicon revision in order to get a list of Cortex-A8 errata. * Has this been done already? * I looked at http://processors.wiki.ti.com/index.php/How_to_Find_the_Silicon_Revision_of_... and used u-boot to find out that my board (version is earlier in the thread) has TI Silicon revision ES3.1. Does Gumstix have to talk to TI to get the official list of Cortex-A8 errata per silicon revision?
Thanks! Jon Kunkee
On Mon, Sep 24, 2012 at 12:14 PM, Ash Charles ash@gumstix.com wrote:
On Fri, Sep 21, 2012 at 2:48 PM, Robert Nelson robertcnelson@gmail.com wrote:
For omap34/35xx class hardware definitely turn on CONFIG_ARM_ERRATA_430973=y
When using a mix of arm/thumb application binaries on this core.....
Thanks Robert. Do you know of any references for these errata beyond just the kernel config. descriptions?
Sorry, Ash I don't have any more references beyond the kernel config... I only know when ubuntu made the switch to "armv7-a + thumb2" (with lucid) my beagle (omap3530 ES3.0 r1p3 based core..) would randomly spout out "Illegal instruction" as seen in (1) and that ARM_ERRATA_430973 has fixed it ever since... I can guess if your in a pure "arm" or "thumb2" environment you'd never run into the issue..
1: https://bugs.launchpad.net/ubuntu/+source/fakeroot/+bug/495536
Regards,
For omap34/35xx class hardware definitely turn on CONFIG_ARM_ERRATA_430973=y
When using a mix of arm/thumb application binaries on this core.....
I can confirm that this fixed my problem. The other two errata seem to have no noticeable effect, e.g. not using them doesn't cause crashes, having them doesn't break anything.
Thanks Robert. Do you know of any references for these errata beyond just the kernel config. descriptions?
Ash, would you be willing to ask TI through Gumstix?
Thanks, Jon