Go Down

Topic: 100% cpu or hanging after moving to IDE 1.8.9 (Read 641 times) previous topic - next topic

cragjock

Hello,

I updated my IDE from 1.8.3 to 1.8.9 on Raspberry Pi. Now, when I build the sketch on 1.8.9, it runs at 100% CPU or just hangs the R-Pi requiring a power reset. On the same sketch using IDE 1.8.3, it never exceeds 50%.
I cannot find anything in the Forum or other search.

What can i do?
Please help.

Thanks,
sc

ballscrewbob

There were one or two threads about JAVA causing high CPU usage but nobody mentioned the Pi.

Are you sure you searched for "high cpu usage" or similar ?

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

cragjock

Thanks for the reply.
I saw the JAVA issue threads you mentioned, but it was Windows based.
When I check the Java versions on my R-Pi:
Arduino IDE 1.8.9 JAVA_VERSION="1.8.0_191" and Arduino IDE 1.8.3 JAVA_VERSION="1.8.0_121"

I will swap out the older Java with the newer. The last time I saw this 100% CPU throttle was building the core with a compile switch - j4. Changing to j1 fixed it. But, the compile and build commands, switches etc are the same for the IDE 1.8.3 and 1.8.9

tnx
sc

pert

It sounds like this issue:
https://github.com/arduino/Arduino/issues/8589

I'm using Arduino IDE 1.8.9 on my Raspberry Pi 3 B+ with Raspbian Stretch and I have never encountered this issue.

cragjock

Ok then.

I did a fresh install of IDE 1.8.9 on a separate R-Pi 3B+ and got the same results, near 100%.
I guess the sketch is the issue. It hits 100% when compiling the core for the ESP8266 code.
Other sketches compiling quickly and no where near 100%.

Thanks for the feedback all

sc

cragjock

going to have to dump IDE 1.8.9, it is too problematic.

Went backwards to IDE 1.8.3. It builds quickly and never hits 100% cpu.

enjoy

sc

pert

I did some tests with compiling for ESP8266 using Arduino IDE 1.8.9 on the RPi. I definitely see it hitting 100% and it's quite slow, but it never hung the RPi. There were a couple compilations that were pretty slow and I started working on other things then came back later to check on it, so I don't know exactly how long it took. I did have one that ended with a couple errors shown in the Arduino IDE console window:
Code: [Select]
virtual memory exhausted: Cannot allocate memory
Then other times it compiled fine with no error and without too ridiculous of a delay (compiling for ESP8266 is always pretty slow, even on my more capable computer).

I know there were problems with caching of the compiled core library with previous versions of the Arduino IDE and ESP8266 core for Arduino. It may be that the caching process is problematic, and that was not apparent before because it wasn't being cached.

I just used some of the example sketches for the ESP8266WiFi library for compilation, since those are fairly large. I don't know whether the specific sketch you were compiling was part of the issue. Did you try compiling the minimal File > New sketch when you were using Arduino IDE 1.8.9? If so, did the same problem occur?

cragjock

Thanks for your effort, I appreciate it.

I have been digging around and playing too.

I found that if i disable "Aggressively cache compiled core" and "check for updates at start" in the Arduino preferences, the total first time build time is about 2 minutes 15 seconds and hitting 100% a few times; i would expect some 100%. My sketch had 4 cpp files integrating a few sensors and displaying to an LCD TFT.

Second builds and after, are quite fast( less than 30 seconds) as items are cached.

The Ardunio and ESP8266 caching issues is IDE1.8.3.

Thanks,
sc

Go Up