-
-
Notifications
You must be signed in to change notification settings - Fork 7k
raspberry pi3 hangs when compiling a sketch in arduino #8589
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
Comments
Which version of the Arduino IDE are you using? |
It says Arduino 1.8.8 I am fairly new to the arduino/linux world so not sure if there is any kind of build in logging that can show what's going on when the vncscreen/IDE freezes. Once frozen the rpi will stay on the wifi but I can not reach or via vnc anymore |
When running the GUI do you see a yellow lightning bolt on the top right? This indicates a bad power supply which might cause freezes when the CPU is under heavy load. https://raspberrypi.stackexchange.com/questions/57963/what-does-the-lightning-bolt-mean |
i am also having same issue, tried to compile blink sketch from examples. works fine in 1.8.5 but it takes around 5 minutes to compile that blink sketch |
What is the board type? Uno, ESP8266, etc. Possibly related discussion https://forum.arduino.cc/index.php?topic=625007.0 |
NodeMCU, ESP8266
…On Thu, Aug 22, 2019, 9:09 AM gdsports ***@***.***> wrote:
What is the board type? Uno, ESP8266, etc.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8589?email_source=notifications&email_token=ALK62JORA2EBF2G3NVDHKE3QFYGOFA5CNFSM4G3GTJEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD43Z5EQ#issuecomment-523738770>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALK62JN233PMIJ35SYU5VJDQFYGOFANCNFSM4G3GTJEA>
.
|
I think I read somewhere that it's some issue with the arduino IDE using up too much resources |
i saw your other thread about this issue and some people have replied to it
as well but some of those responses are above my head :)
1.8.5 works fine, the parallel build feature was introduced since 1.8.6 and
I guess that's where the problem begins.
I saw the release note of 1.8.9 which says "New target! ARM64 boards are
now fully supported (Nvidia Jetson and RaspberryPi3 with 64bit operating
system)" not sure if it is referring to the same issue but even if it is,
it's about 64bit version of Pi not 32 (the one I have)
…On Thu, Aug 22, 2019, 11:21 AM Bringamosa ***@***.***> wrote:
I think I read somewhere that it's some issue with the arduino IDE using
up too much resources
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8589?email_source=notifications&email_token=ALK62JMMQN22JDNWEMV3JQDQFYV7FA5CNFSM4G3GTJEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD44AQ4I#issuecomment-523765873>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALK62JLEEKMKPP27N6TKNBLQFYV7FANCNFSM4G3GTJEA>
.
|
I verified an RPi 4 with 4GB of RAM and Arduino LinuxARM 32-bit will compile the blink sketch for board type ESP8266 without freezing. 4GB RAM versus 1GB avoids the out of memory problems. Running full Raspbian up to date and VNC. |
ok but that's Pi4, in my case I have Pi3 model B which has 1.2g quad core
with 1gb RAM which unfortunately can't be increased, so I guess I am out of
luck then :(
|
Hi all,
My suggestion is to provide a way to override that value via a platform.txt flag, not exposed by the Preferences UI. Could it be ok for everyone? |
The flag has no effect on the number of copies of gcc/g++ running at the same time. I have seen as many as 54 copies of cc1plus running at the same time. On systems with 1GB of RAM, physical RAM is quickly exhausted so the OS thrashes the swap file. The following is from a terminal window while compiling the blink sketch from scratch (build all) for a Generic ESP8266.
|
arduino-cli also spawns off far more than 4 gcc/g++ processes.
In a different terminal window,
|
I read the same somewhere, but not sure how to get it fixed.
…On Sat, Aug 24, 2019, 2:03 AM gdsports ***@***.***> wrote:
arduino-cli also spawns off far more than 4 gcc/g++ processes.
$ arduino-cli compile --fqbn esp8266:esp8266:generic
Arduino/blink/blink.ino
In a different terminal window,
***@***.***:~ $ ps aux|grep cc1 |wc
39 3091 63178
***@***.***:~ $ ps aux|grep cc1 |wc
37 2929 59879
***@***.***:~ $ ps aux|grep cc1 |wc
37 2929 59879
***@***.***:~ $ ps aux|grep cc1 |wc
37 2929 59879
***@***.***:~ $ ps aux|grep cc1 |wc
31 2443 49870
***@***.***:~ $ ps aux|grep cc1 |wc
23 1795 36651
***@***.***:~ $ ps aux|grep cc1 |wc
12 904 18263
***@***.***:~ $ ps aux|grep cc1 |wc
5 337 6652
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8589?email_source=notifications&email_token=ALK62JPESPRVJYZTNQJRS4TQGBGARA5CNFSM4G3GTJEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5BKJIQ#issuecomment-524461218>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALK62JMYDDUE37QLDDXTUR3QGBGARANCNFSM4G3GTJEA>
.
|
@gdsports thanks for checking, I tested it and indeed the builder logic to limit concurrent processes is flawed. I prepared a patch here https://github.com/arduino/arduino-builder/compare/master...facchinm:fix_fake_parallel_limitation?expand=1 and here arduino/arduino-cli#356 ; this should really limit the maximum concurrent processes to N=cores number, so maybe we don't need the extra |
great @facchinm |
I'll push the builder PR to get the prebuilt binary for testing ;) |
@tariqshiwani you can grab the build here arduino/arduino-builder#331 (comment) |
@facchinm Thanks, the patched arduino-builder works fine. I do not think the "-j1" patch is needed. The GUI performance is excellent even while running parallel compiles. |
@facchinm thanks for the patch but it didn't work for me. i am getting following error when hit compile on Blink sample sketch Arduino: 1.8.9 (Linux), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200" /home/pi/arduino/arduino-1.8.9/arduino-builder: 1: /home/pi/arduino/arduino-1.8.9/arduino-builder: Syntax error: "(" unexpected Error compiling for board NodeMCU 1.0 (ESP-12E Module). |
Sorry my bad, please disregard my previous comments, I mistakenly copied linux32 instead of linuxarm its working perfectly fine. Thank you guys @Bringamosa @gdsports @gdsports @facchinm |
The patch to the builder has been merged and scheduled for the next IDE release. |
Hi, just a quick report to confirm that I faced the exact same issue with 1.8.9 on linux32 (with 54 cc1plus processes as well), and that upgrading to 1.8.13 solved the problem. Thank you! |
It does not matter what sketch I try to compile, my pri will go into 100% CPU usage and hang. Even with the bare minimum sketch.
Ant idea how I can start debugging
The text was updated successfully, but these errors were encountered: