You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When creating a custom service that configures KubOS logging functionality, the service increasingly uses more system memory as it runs. This memory consumption appears to be proportional to the number of log statements made by the service. This appears to be due to a possible memory leak in the log4rs/log4rs-syslog pair of libraries (which appears to mostly be on the syslog side). I have reported this issue upstream in im-0/log4rs-syslog#33
System Details
beaglebone black
Kubos 1.21.0
Severity
Medium - Irritating bug, but there's a workaround
To Reproduce
see instructions in upstream issue
Bug Output
this bug is present if a service uses more and more memory as it runs as shown by the 6th column of the ps aux | grep <service-name> command. Valgrind also shows memory leaks (see upstream issue for some output)
Workaround
The workaround is to remove the line Logger::init("service-name"); from the service. This will likely break logging. Another option depending on how fast the memory leaks is to put logging behind a conditional compilation guard to exclude it from specific builds when logging is not needed for debugging or memory use is important.
The text was updated successfully, but these errors were encountered:
I saw that too when i was testing this. From what i can tell the stdout appender appears to be fine. That said, i was seeing some weird results when playing with that other variable, so im not really sure whats going on there
Description
When creating a custom service that configures KubOS logging functionality, the service increasingly uses more system memory as it runs. This memory consumption appears to be proportional to the number of log statements made by the service. This appears to be due to a possible memory leak in the log4rs/log4rs-syslog pair of libraries (which appears to mostly be on the syslog side). I have reported this issue upstream in im-0/log4rs-syslog#33
System Details
Severity
To Reproduce
see instructions in upstream issue
Bug Output
this bug is present if a service uses more and more memory as it runs as shown by the 6th column of the
ps aux | grep <service-name>
command. Valgrind also shows memory leaks (see upstream issue for some output)Workaround
The workaround is to remove the line
Logger::init("service-name");
from the service. This will likely break logging. Another option depending on how fast the memory leaks is to put logging behind a conditional compilation guard to exclude it from specific builds when logging is not needed for debugging or memory use is important.The text was updated successfully, but these errors were encountered: