100% CPU usage

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 543
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

100% CPU usage

#1 Post by mackowiakp » 16 Dec 2024, 13:08

I compiled new FW by adding to existing Config.h WOL module P101.
Now i have 100% CPU usage don know why. Unit can not connect to MQTT server.
I try to disable WOL module byt result was the same.
Below main menu output:
Any help?

Code: Select all

Unit Number:	1
Local Time:	2024-12-16 13:02:33
Time Source:	NTP
Time Wander:	0.000 [ppm]
Uptime:	00h02m
Load:	100.00 [%] (LC=119)
CPU Eco Mode:	false
Boot:	Cold Boot (0)
Reset Reason:	Power On
Last Action before Reboot:	Background Task
SW WD count:	0
Memory
Free RAM:	8464 [byte] (8424 - )
Heap Max Free Block:	7944 [byte]
Heap Fragmentation:	7 [%]
Free Stack:	3664 [byte] (1264 - )
Network
IP Config:	Static
IP / Subnet:	192.168.0.18 / 255.255.255.0
Gateway:	192.168.0.1
Client IP:	192.168.0.8
DNS:	192.168.0.201 / (IP unset)
Allowed IP Range:	192.168.0.0 - 192.168.0.255
Connected:	00:01:49.961
Number Reconnects:	0
WiFi ?
WiFi Connection:	802.11n (RSSI -65 dBm)
SSID:	maciek24 (34:60:F9:26:28:C5)
Channel:	1
Encryption Type:	WPA2/PSK
Last Disconnect Reason:	(202) Auth fail
Configured SSID1:	maciek24
Configured SSID2:	
STA MAC:	84:F3:EB:E3:62:B2
AP MAC:	86:F3:EB:E3:62:B2
WiFi Settings
Force WiFi B/G:	false
Restart WiFi Lost Conn:	true
Force WiFi No Sleep:	true
Periodical send Gratuitous ARP:	false
Connection Failure Threshold:	0
Max WiFi TX Power:	17.50 [dBm]
Current WiFi TX Power:	14.00 [dBm]
WiFi Sensitivity Margin:	3 [dB]
Send With Max TX Power:	false
Extra WiFi scan loops:	0
Use Last Connected AP from RTC:	false
Extra Wait WiFi Connect:	false
Hidden SSID Slow Connect:	true
Include Hidden SSID:	false
Enable SDK WiFi Auto Reconnect:	false
Firmware
Build:⋄	20241210 - Mega
System Libraries:⋄	ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄	Skrzypowa: Dec 10 2024 12:20:13
Plugin Count:⋄	30 []
Build Origin:	Self built
Build Time:⋄	Dec 10 2024 12:20:13
Binary Filename:⋄	ESP_Easy_mega_20241210_custom_274_ESP8266_4M1M
Build Platform:⋄	Linux-6.6.61-desktop-1.mga9-x86_64-with-glibc2.36
Git HEAD:⋄	No_.git_dir
System Status
Syslog Log Level:	None
Serial Log Level:	None
Web Log Level:	None
Enable Serial Port Console:	false
Console Serial Port:	-
I2C Bus State:	OK
I2C bus cleared count:	0
Network Services
Network Connected:	✔
NTP Initialized:	✔
MQTT Client Connected:	❌
ESP Board
ESP Chip ID:	14901938 (0xE362B2)
ESP Chip Frequency:	80 [MHz]
ESP Chip Model:	ESP8266EX
ESP Chip Cores:	1
ESP Board Name:	Espressif Generic ESP8266 ESPEasy 4M Flash 1M FS
Storage
Flash Chip ID:	Vendor: 0x68 Device: 0x4016
Flash Chip Real Size:	4096 [kB]
Flash IDE Size:	4096 [kB]
Flash Chip Speed:	40 [MHz]
Flash IDE Speed:	40 [MHz]
Flash IDE Mode:	DIO
Flash Writes:	0 daily / 0 boot
Sketch Size:	903 [kB] (2168 kB free)
Max. OTA Sketch Size:	1019 [kB] (1044464 bytes)
OTA possible:	true
OTA 2-step Needed:	false
SPIFFS Size:	934 [kB] (836 kB free)
Page size:	256 [byte]
Block size:	8192 [byte]
Number of blocks:	116
Maximum open files:	5
Maximum path length:	32
Partitions
Partition Table:	
903.08k
sketch
2.12M
ota
1000k
fs
SPIFFS
4k
eeprom
sector:1019
4k
RFcal
12k
WiFi

TD-er
Core team member
Posts: 9884
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: 100% CPU usage

#2 Post by TD-er » 16 Dec 2024, 13:26

Is it possible to disable your (MQTT) controller and save these settings?

For example via serial: (assuming your MQTT controller is controller #1)

Code: Select all

ControllerDisable,1
save

mackowiakp
Normal user
Posts: 543
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: 100% CPU usage

#3 Post by mackowiakp » 16 Dec 2024, 13:45

I don't know if that was the cause but the reboot always happens when I use the WOL function.
In my case I sent WOL during event handling 2 times. Now I send it once and the CPU usage is 20%.
I will test it but for now it looks like that was the cause.
Below is a fragment of the rule that corresponds to it. The WOL call is "IT13".
The second call is currently inactive. I will see after some time if it helped.

Code: Select all

On Rules#Timer=8 do
 Let,17,0
 Let,1,0
 IT13
 LCDCMD,clear
 tone,16,1300,50
 LCD,2,6,"Włączenie"
 LCD,3,6,"komputera"
 TimerSet,6,6
// IT13
 Let,6,1
endon

mackowiakp
Normal user
Posts: 543
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: 100% CPU usage

#4 Post by mackowiakp » 17 Dec 2024, 11:08

Everything indicates that the cause of 100% processor load was a double call of VOL function.
Although this is strange because the first call was just after the On Rules#Timer=8 call, then the LCD display calls are in use (which takes some time) and then the VOL call was repeated.
It is also strange that after an self reboot the load remained at 100% and then after a few minutes (portable because of that) the reboot occurred again.
The FW was compiled from the same sources as previously installed and the only thing I changed was adding P101, i.e. VOL support.
Currently, sometimes (but rarely) after using the VOL function the load reaches 100% but after about a minute it decreases to the standard 20-22%.

bidrohini
Normal user
Posts: 147
Joined: 03 Nov 2022, 16:24

Re: 100% CPU usage

#5 Post by bidrohini » 17 Dec 2024, 13:56

mackowiakp wrote: 17 Dec 2024, 11:08 Everything indicates that the cause of 100% processor load was a double call of VOL function.
Although this is strange because the first call was just after the On Rules#Timer=8 call, then the LCD display calls are in use (which takes some time) and then the VOL call was repeated.
It is also strange that after an self reboot the load remained at 100% and then after a few minutes (portable because of that) the reboot occurred again.
The FW was compiled from the same sources as previously installed and the only thing I changed was adding P101, i.e. VOL support.
Currently, sometimes (but rarely) after using the VOL function the load reaches 100% but after about a minute it decreases to the standard 20-22%.
You can add a small delay between the WOL command and the subsequent tasks like LCD updates.

mackowiakp
Normal user
Posts: 543
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: 100% CPU usage

#6 Post by mackowiakp » 19 Dec 2024, 01:27

Tested wit 1 sec delay. The problem still exist

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests