LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug] TLS configuration memory leak

Hi everyone,

 

There appears to be a memory leak in the TLS configuration VIs, specifically when using Add Private Key to TLS Configuration. See the snippet and attachment which demonstrates the problem. This issue has been tested under LV2022 Q3, and LV2020 on both Windows and Linux RT.

 

TLS Memory Leak.png

 

After about 700k iterations of the above code, LabVIEW's memory use is close to 3GB and continues to climb:

 

tls-memory-leak-700k-iterations.png

 

If the "Add Private Key" button in the example code is set False the memory leaks stop. The leak issue might be related to this idea / bug where Not a Refnum always reports the TLS config refnum isn't valid, which could be why LabVIEW isn't freeing the TLS resources.

 

One workaround is to the create the TLS config and store the refnum in memory, then use it rather than reloading the cert each time. This doesn't help in the case where certs need to be reloaded (say for different server connections), and requires additional checks due to Not a Refnum's insistence the TLS config refnum is always invalid.

 

Is this memory leak a known issue?

0 Kudos
Message 1 of 1
(823 Views)