<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Multi-threaded app using NRF Security</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123170/multi-threaded-app-using-nrf-security</link><description>Is there a known way to enable MBEDTLS_THREADING_C? I believe my application is running into MbedTLS heap corruption because multiple threads are performing crypto operations. I&amp;#39;m using NCS 1.7.0 and the app is running on an nRF9160.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Jul 2025 15:24:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123170/multi-threaded-app-using-nrf-security" /><item><title>RE: Multi-threaded app using NRF Security</title><link>https://devzone.nordicsemi.com/thread/543551?ContentTypeID=1</link><pubDate>Thu, 24 Jul 2025 15:24:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe86fb8d-b9a6-40ca-b803-fbb0ef2bc4c2</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Can you share full error log?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi-threaded app using NRF Security</title><link>https://devzone.nordicsemi.com/thread/543509?ContentTypeID=1</link><pubDate>Thu, 24 Jul 2025 13:06:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b816d64-1860-4fc6-8c6a-3c3b3c32efa3</guid><dc:creator>esisk</dc:creator><description>&lt;p&gt;When the device my app is running on is charging, data is encrypted and sent out via BLE advertisements in one thread. The device also scans for some encrypted BLE advertisements, so the bt_rx_thread will decrypt some advertisements.&lt;/p&gt;
&lt;p&gt;One error is sometimes I will see&lt;br /&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;hdr verify fail&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;printed out to the console. Then, mbedtls_exit is called and since I have defined _exit() in my application code that reboots my app, the app reboots. Also, there&amp;#39;s a code path in my app where a persistent public key is loaded from the key store in order to send to our server. After some time charging, this load will eventually fail with error -141 which means PSA_ERROR_INSUFFICIENT_MEMORY.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi-threaded app using NRF Security</title><link>https://devzone.nordicsemi.com/thread/543393?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2025 16:00:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd889839-d7aa-4a8c-b563-3d56d2cc0368</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Can you provide more information about your application and error log which shows the error?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>