<?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>BT_LW_WQ stack overflows with debug options</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95838/bt_lw_wq-stack-overflows-with-debug-options</link><description>The `BT_LW_WQ` stack may overflow with the build with debug options selected. Without build with debug options selected, the thread analyzer shows nearly all of the stack space used: [00:00:31.310,882] &amp;lt;inf&amp;gt; thread_analyzer: BT_LW_WQ : STACK: unused 80</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Jan 2023 13:16:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95838/bt_lw_wq-stack-overflows-with-debug-options" /><item><title>RE: BT_LW_WQ stack overflows with debug options</title><link>https://devzone.nordicsemi.com/thread/406255?ContentTypeID=1</link><pubDate>Tue, 24 Jan 2023 13:16:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c0a19be-6d64-4f74-abe5-b6662cfb10dd</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For a non-debug build you shouldn&amp;#39;t have to use the workaround at all.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any issue with the default configuration should be picked up by our own release testing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BT_LW_WQ stack overflows with debug options</title><link>https://devzone.nordicsemi.com/thread/406083?ContentTypeID=1</link><pubDate>Mon, 23 Jan 2023 15:39:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54c7929e-a966-4261-a4d0-947807a495a3</guid><dc:creator>jtrueb</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the workaround option. I will use that for hacks as it is&amp;nbsp;useful in development.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For a non-debug build, the workaround sounds like a bug to me since nothing associates the intended override with the actual SDK version&amp;#39;s Kconfig parameter or value.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am concerned that the workaround adds a manual item to check with each release change that won&amp;#39;t be caught at compile time. In my experience, BT_LONG_WQ_STACK_SIZE will probably be renamed to&amp;nbsp;BT_LW_WQ_STACK_SIZE or something and cause stack overflows again on a later release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BT_LW_WQ stack overflows with debug options</title><link>https://devzone.nordicsemi.com/thread/406013?ContentTypeID=1</link><pubDate>Mon, 23 Jan 2023 11:39:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4638b01-cb88-46c6-9416-e47dc7a15ac8</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;No news on an update from our side yet, but one of the developers alerted me to a better workaround than having to alter the SDK files.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to make the BT_LONG_WQ_STACK_SIZE parameter user configurable you can simply add it to your local Kconfig file (just create a file called Kconfig in the project root folder).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you can redefine the parameter with any default value you want:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;config BT_LONG_WQ_STACK_SIZE
    int &amp;quot;Long workqueue stack size&amp;quot;
    default 2000
    
source &amp;quot;Kconfig.zephyr&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BT_LW_WQ stack overflows with debug options</title><link>https://devzone.nordicsemi.com/thread/405812?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2023 11:11:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a66f7163-45b6-4cb7-82d5-f49c8ba60dc2</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Everything is relative I guess &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Part of the issue is that the Bluetooth host is not tested in all possible configurations of the project, so you could end up in situations where the stack sizes are not sufficient if you are using a configuration that is not standard.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I still haven&amp;#39;t heard back regarding an update to the issue, but I will let you know when I do.&amp;nbsp;&lt;br /&gt;We probably won&amp;#39;t have anything in the short term though, so if disabling debug options is not possible you will probably have to patch this yourself for now.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BT_LW_WQ stack overflows with debug options</title><link>https://devzone.nordicsemi.com/thread/405743?ContentTypeID=1</link><pubDate>Thu, 19 Jan 2023 18:25:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5428fe57-f78c-4472-9a57-c638347d22b9</guid><dc:creator>jtrueb</dc:creator><description>&lt;p&gt;I checked&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.3/nrf/known_issues.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.3/nrf/known_issues.html&lt;/a&gt;&lt;br /&gt;It is not a known issue, but I understand your point that it is a known issue.&lt;/p&gt;
&lt;p&gt;The proper known issue for&amp;nbsp;this is that the VS Code build configuration with &amp;quot;Enable debug options&amp;quot; or use of alternative optimization settings like &lt;span&gt;CONFIG_NO_OPTIMIZATIONS&lt;/span&gt; may cause hard faults due to any stack size usage change from release to release. Faults may be expected behavior for such&amp;nbsp;builds, won&amp;#39;t fix. The workaround is to edit the NCS SDK installation manually and assign larger stack sizes as needed.&lt;br /&gt;&lt;br /&gt;In the future, zephyr&amp;nbsp;could&amp;nbsp;allow parameterized stack usage to fix this issue but likely will not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BT_LW_WQ stack overflows with debug options</title><link>https://devzone.nordicsemi.com/thread/405740?ContentTypeID=1</link><pubDate>Thu, 19 Jan 2023 17:22:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbeb0d59-1ce6-4aea-8fa3-abc559d0e717</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a known issue, and you can follow the existing discussion here:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/52105"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/52105&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have asked the team for a status update, and I will get back to you once I know more regarding a fix.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>