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

Update signalDecoder.cpp: Fix OOM crash caused by rtl_433_Decoder_Stack too small on Lilygo Lora device #156

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

puterboy
Copy link
Contributor

@puterboy puterboy commented Oct 6, 2024

♻️ Current situation

This fixes the crash caused by OOM when low water mark on rtl_433_Decder_Stack drops below 0. (See: 1technophile/OpenMQTTGateway#2043)

Describe the current situation. Explain current problems, if there are any. Be as descriptive as possible (e.g., including examples or code snippets).

💡 Proposed solution

I increased the memory size by 1500 which after running for a week on 2 different Lilygo Lora ESP32 devices leaves the water mark at just over 1KB -- I want to leave a little spare in case there are other sensor configurations and edge cases that would dip further into the stack.

I also wrapped the definitions of rtl_433_Decoder_stack with ifndef rtl_433_Decoder_Stack so that users can easily manually tweak the allocated stack size for their own particular situations.

⚙️ Release Notes

Increase rtl_433_Decoder_Stack size for OOK_Modulation to avoid OOM crashes

Testing

NA

Reviewer Nudging

Where should the reviewer start? what is a good entry point?

…ck to small on Lilygo Lora device

This fixes the crash caused by OOM when low water mark on rtl_433_Decder_Stack drops below 0.
(See: 1technophile/OpenMQTTGateway#2043)
I increased the memory size by 1500 which after running for a week on 2 different Lilygo Lora ESP32 devices leaves the water mark at just over 1KB -- I want to leave a little spare in case there are other sensor configurations and edge cases that would dip further into the stack.

I also wrapped the definitions of `rtl_433_Decoder_stack` with `ifndef rtl_433_Decoder_Stack` so that users can easily manually tweak the allocated stack size for their own particular situations.
@puterboy
Copy link
Contributor Author

puterboy commented Oct 6, 2024

Not sure why build fails - it works fine on my platformio install and my changes were truly trivial.
Seems from error message perhaps to be an error on the build site.

@NorthernMan54 NorthernMan54 merged commit 08073f6 into NorthernMan54:main Oct 6, 2024
1 of 2 checks passed
@NorthernMan54
Copy link
Owner

Newer version of ubuntu breaks the build....

Run actions/setup-python@v4
Installed versions
Version 3.7 was not found in the local cache
Error: The version '3.7' with architecture 'x64' was not found for Ubuntu 24.04.

@NorthernMan54
Copy link
Owner

Published as v0.3.3

Tks very much

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

Successfully merging this pull request may close these issues.

2 participants