Skip to content
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

BK7231N constant crash after "Error:MAIN:Low heap warning!" #1348

Open
OoSTARTERoO opened this issue Sep 13, 2024 · 6 comments
Open

BK7231N constant crash after "Error:MAIN:Low heap warning!" #1348

OoSTARTERoO opened this issue Sep 13, 2024 · 6 comments

Comments

@OoSTARTERoO
Copy link

OoSTARTERoO commented Sep 13, 2024

Describe the bug
A clear and concise description of what the bug is.

Firmware:

  • Version 1.17.692
  • Device LSPA9
  • Chip/model: BK7231N
  • Device config
    startup command backlog startDriver BL0937; PowerSave 1; loglevel 6; is set

Logs

Info:MAIN:Time 13, idle 73866/s, free 52048, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 4/38 POWERSAVE
Info:MQTT:mqtt_host empty, not starting mqtt
Info:MAIN:Time 14, idle 75616/s, free 40352, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 5/38 POWERSAVE
Error:MAIN:Low heap warning!
Info:MAIN:Time 15, idle 67394/s, free 16960, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 7/38 POWERSAVE
Debug:HTTP:TCP Client 192.168.0.13:43305 thread creation failed! fd: 8
Error:MAIN:Low heap warning!
Info:MAIN:Time 16, idle 71537/s, free 5264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 8/38 POWERSAVE
Debug:HTTP:TCP Client 192.168.0.13:34089 thread creation failed! fd: 8
Debug:HTTP:TCP Client 192.168.0.13:34601 thread creation failed! fd: 8
Error:MAIN:Low heap warning!
Info:MAIN:Time 17, idle 68771/s, free 5264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 8/38 POWERSAVE
Debug:HTTP:TCP Client (PC's ip):35113 thread creation failed! fd: 8
Debug:HTTP:TCP Client (PC's ip):35625 thread creation failed! fd: 8
Debug:HTTP:TCP Client (PC's ip):49449 thread creation failed! fd: 8
Debug:HTTP:TCP Client (PC's ip):49705 thread creation failed! fd: 8
Debug:HTTP:TCP Client (PC's ip):49961 thread creation failed! fd: 8
Debug:HTTP:TCP Client (PC's ip):36137 thread creation failed! fd: 8
Error:MAIN:Low heap warning!
Info:MAIN:Time 18, idle 49883/s, free 5264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 8/38 POWERSAVE
Error:MAIN:Low heap warning!
Info:MAIN:Time 19, idle 59020/s, free 5264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 8/38 POWERSAVE
bk_reboot
wdt reboot
Error:HTTP:TCP Client is disconnected, fd: 2
Info:MAIN:Time 13, idle 67354/s, free 63712, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
Info:MQTT:mqtt_host empty, not starting mqtt
Info:MAIN:Time 14, idle 68115/s, free 63728, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 POWERSAVE
Info:MAIN:Time 15, idle 73756/s, free 28624, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 6/38 POWERSAVE
Error:MAIN:Low heap warning!
Info:MAIN:Time 16, idle 75687/s, free 16928, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 7/38 POWERSAVE
Error:HTTP:TCP Client is disconnected, fd: 7
Error:MAIN:Low heap warning!
Info:MAIN:Time 17, idle 71973/s, free 5232, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 8/38 POWERSAVE
Debug:HTTP:TCP Client 192.168.0.13:28985 thread creation failed! fd: 8
Error:MAIN:Low heap warning!
Info:MAIN:Time 18, idle 63971/s, free 5232, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 8/38 POWERSAVE
Error:MAIN:Low heap warning!
Info:MAIN:Time 19, idle 66038/s, free 5232, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 8/38 POWERSAVE
Error:MAIN:Low heap warning!
Info:MAIN:Time 20, idle 69648/s, free 5024, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 8/38 POWERSAVE
bk_reboot
wdt reboot

opening the web interface seems to make the problem even worse.
It happens when the web interface is open during startup.

@openshwprojects
Copy link
Owner

Does it happen without loglevel setting?

@OoSTARTERoO
Copy link
Author

Yes, without any startup command

@MaxineMuster
Copy link
Contributor

MaxineMuster commented Sep 14, 2024

Are there any other open browser windows open?
Or is something else trying to open a network connection to this device?

Something is eating your memory very fast (see free memory decreaseing from second to second):
52k
40k
16k
5k

63k
28k
17k
5k

Loosing over 30k of free RAM in a second is much...

@openshwprojects
Copy link
Owner

http server again, per socket malloc....

@OoSTARTERoO
Copy link
Author

Oh... Is there any way that I can help you to solve this issue?
I can dig up deeper If you can't replicate it.

Also, Is there any versions without this issue?

@openshwprojects
Copy link
Owner

Please make a 2MB flash backup (strongly adviced) and try doing "restore RF partition".

This issue seems to happen very rarely, I've seen it like 3 times in like, I don't know, it's 2 years of OBK dev? It seems like something in RF (which is not overwritten by OBK) causes TCP sockets to don't finish so each HTTP call keeps the buffer allocated without freeing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants