-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
espota.py stalls on some OTA updates leaving Python running in a tight infinite loop #4746
Comments
Hi Paraphraser, I, too, am having this issue; though at 15% cpu per instance. Using an EPS-201 off e-bay here but hangs most of the time after an OTA. Hopefully there will be a solution soon. Thanks, |
Same issue here. Happens only about 30-50% of the time. |
Also seeing this issue, at least 50% of the time when updating over OTA. I'm on Win10, with Python 2.7.14 and Arduino 1.8.6 using github version of esp8266 arduino. Seen on both NodeMCU and D1 mini lite. |
Have you tried again with version 2.4.2 ? |
I am using version 2.4.2 at the moment. Over the last week I have pushed OTA updates to ESP8266 devices several times and have not encountered the stall condition. Whether that means 2.4.2 has "cured" the problem OR the problem is still there and I was just lucky to avoid it, is unknown. On the second part of your reply, I must confess ignorance. I do not know what that means. I simply have the requisite "Additional Board Manager" URL for the ESP8266 in my preferences pane and I just accept updates as and when the IDE tells me there is something new. At the moment, the IDE is telling me everything is up-to-date. I'm willing to give "#5135" a whirl but please point me at some step-by-step instructions that cover (a) how to bring that change into my system and (b) how to back it out again. |
@Paraphraser right, thanks for the feedback. If the issue happens again and instead of trying #5135, find the file |
@SWR-DMaster @glyndon @dragondaud Can you please try with latest git version ? |
See #4283 (comment) |
The original filer seems to have reported it fixed, and there were later issues and PRs that optimized this. Closing for now. If there's a problem 2.5.0 please do file a new one with template. |
Basic Infos
Platform
Settings in IDE
Problem Description
I am using OTA updating. On most attempts (>95%) the sketch compiles and uploads without incident. On the remaining 5% of occasions:
Thus far, I have never had a second attempt (ie starting at step 9) stall, requiring a third attempt.
I could live with the occasional stall but one side-effect is that Python never quits. It shows up in the Mac OS "Activity Monitor" as being responsible for 99.9% of energy consumption, which suggests it is stuck in a tight infinite loop. The high energy consumption is why I noticed the problem because the laptop I was working on became unusually hot. The only way to recover from this is to kill Python (or restart). Quitting the IDE does not cause Python to quit.
This side effect of high energy consumption by Python is my main motivation in reporting the problem, so that anyone following in my footsteps will know that finding and clobbering Python is an effective workaround.
I am not including a test sketch because OTA updating works 95% of the time, suggesting that OTA updating is set up correctly in the code running on the WeMos board. I currently have one WeMos D1 R2s and one WeMos D1 R2 Mini Pro, running totally different sketches, both being updated OTA. The problem is evident on both targets but does not "follow the board" and does not "follow the sketch". The common element is the IDE which suggests that this problem is more likely to be with either the IDE or espota.py.
The IDE does not produce any error messages associated with this problem. The closest I can get is some "ps" output for the stalled invocation of Python:
$ ps -ax|grep -i python
2040 ?? 21:59.05 python /Users/home/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/tools/espota.py -i 192.168.1.152 -p 8266 --auth= -f /var/folders/py/j18yts_n3rzb3hmxyz41bghm0000gn/T/arduino_build_945086/sketch_19_hikingMeterLogger_WeMosD1.ino.bin
The text was updated successfully, but these errors were encountered: