<?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>Mesh assert on mesh stack init.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51024/mesh-assert-on-mesh-stack-init</link><description>After many reboots, suddenly I got stuck at this error on every boot: 
 
 The data that&amp;#39;s on the flash pages: 
 
 My mesh init params: 
 
 Using NRF52832, SDK 15.3.0, SD 132 6.1.1, and Mesh SDK 3.2.0. 
 My question is: what do you expect the user to do</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Feb 2020 12:59:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51024/mesh-assert-on-mesh-stack-init" /><item><title>RE: Mesh assert on mesh stack init.</title><link>https://devzone.nordicsemi.com/thread/236264?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 12:59:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0289ac89-1620-47c0-86b8-67f62fa85134</guid><dc:creator>bart</dc:creator><description>&lt;p&gt;So by the time you asked for this full dump, I already decided disable persistent storage, and thus couldn&amp;#39;t provide you with a full flash dump. However, we started using it again, and again ran into mesh asserts after some time.&lt;/p&gt;
&lt;p&gt;I suspect it started on brownout (already have a couple cases that are crashing since we enabled mesh persistent storage), which happens when the device is unplugged.&lt;/p&gt;
&lt;p&gt;This time it crashes at some other place in the code, but again during loading from flash at init.&lt;/p&gt;
&lt;p&gt;GDB trace:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;0x0003915a in app_error_fault_handler (id=id@entry=16386, pc=302160, info=info@entry=536935760) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/third/nrf/app_error_weak.c:101
101	    NRF_BREAKPOINT_COND;
(gdb) bt
#0  0x0003915a in app_error_fault_handler (id=id@entry=16386, pc=302160, info=info@entry=536935760) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/third/nrf/app_error_weak.c:101
#1  0x0004fd34 in mesh_assertion_handler (pc=&amp;lt;optimized out&amp;gt;) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/tools/mesh_sdk/examples/common/src/assertion_handler_weak.c:54
#2  0x00049c52 in restore_addresses_for_model (p_model=0x200057e0 &amp;lt;m_model_pool+112&amp;gt;) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/tools/mesh_sdk/mesh/access/src/access.c:816
#3  restore_models () at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/tools/mesh_sdk/mesh/access/src/access.c:853
#4  access_flash_config_load () at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/tools/mesh_sdk/mesh/access/src/access.c:989
#5  0x0004d4e2 in mesh_stack_init (p_init_params=p_init_params@entry=0x2000fdc4, p_device_provisioned=p_device_provisioned@entry=0x200040e4 &amp;lt;Mesh::getInstance()::instance+4&amp;gt;) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/tools/mesh_sdk/mesh/stack/src/mesh_stack.c:114
#6  0x0003b698 in Mesh::init (this=0x200040e0 &amp;lt;Mesh::getInstance()::instance&amp;gt;, board=...) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/mesh/cs_Mesh.cpp:273
#7  0x0003de6c in Crownstone::startOperationMode (mode=@0x2000ffec: OperationMode::OPERATION_MODE_NORMAL, this=0x2000ff14) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/cs_Crownstone.cpp:623
#8  Crownstone::startOperationMode (this=0x2000ff14, mode=@0x2000ffec: OperationMode::OPERATION_MODE_NORMAL) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/cs_Crownstone.cpp:612
#9  0x0003dc30 in Crownstone::switchMode (this=this@entry=0x2000ff14, newMode=@0x2000ffec: OperationMode::OPERATION_MODE_NORMAL) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/cs_Crownstone.cpp:528
#10 0x0003d6a0 in Crownstone::init1 (this=this@entry=0x2000ff14) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/cs_Crownstone.cpp:248
#11 0x0003e2fc in Crownstone::init (step=1, this=0x2000ff14) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/cs_Crownstone.cpp:806
#12 Crownstone::handleEvent (this=0x2000ff14, event=...) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/cs_Crownstone.cpp:806
#13 0x0002f884 in EventDispatcher::dispatch (this=0x20002618 &amp;lt;EventDispatcher::getInstance()::instance&amp;gt;, event=...) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/events/cs_EventDispatcher.cpp:33
#14 0x0002f2e4 in Storage::handleFileStorageEvent (this=0x20002818 &amp;lt;Storage::getInstance()::instance&amp;gt;, p_fds_evt=0x20002a28 &amp;lt;Timer::init()::APP_SCHED_BUF+264&amp;gt;) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/drivers/cs_Storage.cpp:906
#15 0x00040162 in app_sched_execute () at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/tools/nrf5_sdk/components/libraries/scheduler/app_scheduler.c:280
#16 0x0003e2c8 in Crownstone::run (this=this@entry=0x2000ff14) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/cs_Crownstone.cpp:784
#17 0x0003e44c in main () at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/source/src/cs_Crownstone.cpp:960
(gdb) f 2
#2  0x00049c52 in restore_addresses_for_model (p_model=0x200057e0 &amp;lt;m_model_pool+112&amp;gt;) at /home/vliedel/dev/bluenet-workspace-cmake/bluenet/tools/mesh_sdk/mesh/access/src/access.c:816
816	        NRF_MESH_ERROR_CHECK(dsm_address_publish_add_handle(p_model-&amp;gt;model_info.publish_address_handle));
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Config:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ACCESS_FLASH_PAGE_COUNT = 1
DSM_FLASH_PAGE_COUNT = 1
FLASH_MANAGER_RECOVERY_PAGE_OFFSET_PAGES = 6&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Flash dump: &lt;a href="https://www.dropbox.com/s/tqwbpsqlklew9co/flash.log?dl=1"&gt;www.dropbox.com/.../flash.log&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh assert on mesh stack init.</title><link>https://devzone.nordicsemi.com/thread/210658?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 09:20:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91eba382-4217-4ebe-97e0-d28d43ecbace</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We haven&amp;#39;t been able to reproduce this assert even after rebooting the device several thousand times. Looks like the cause of this assertion is possibly corrupted length field of the written entry. Such corruption can occur if the flash power supply is unstable, and if flash data gets corrupted such assertion can trigger.&lt;/p&gt;
&lt;p&gt;Seems like the problem occurred for the page starting at 0x6D000 (since p_end is 0x6E000 as per the debug logs) and a flash dump for that page haven&amp;#39;t been provided. Could you provide a full flash dump when this issue happens and also ensure that the chip power supply is stable?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh assert on mesh stack init.</title><link>https://devzone.nordicsemi.com/thread/207166?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 13:18:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:660afbe2-58df-4ca6-b3b0-972dd56bcf7a</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;You are correct. I have forwarded this to the team. I will update you when they figured out what is causing this assert.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh assert on mesh stack init.</title><link>https://devzone.nordicsemi.com/thread/205891?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 12:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a93523b-8fef-43ff-9d81-31a3ce2a139a</guid><dc:creator>bart</dc:creator><description>&lt;p&gt;How is that different than using the back trace I pasted? You can see exactly where in the mesh sdk code it fails.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh assert on mesh stack init.</title><link>https://devzone.nordicsemi.com/thread/205836?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 10:22:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cb6c4e0-a980-4ce1-b762-1fa44090d0fd</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;If you put a breakpoint at app_error_fault_handler you can read out the line number to see which function are triggering this error. You should also get&amp;nbsp;an error code. The error seems to be somewhere in your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh assert on mesh stack init.</title><link>https://devzone.nordicsemi.com/thread/204938?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2019 08:21:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7befff9e-a443-4bc4-a296-b03174335acf</guid><dc:creator>bart</dc:creator><description>&lt;p&gt;What more debug would you need? The backtrace i pasted shows which assert fails, but i&amp;#39;m not that much in the mesh code to understand what it means. I was hoping you could tell me this.&lt;/p&gt;
&lt;p&gt;I rebooted it about 1000 times, but I didn&amp;#39;t try to reproduce this state yet, as i have the option to simply disable mesh persistent storage for now.&lt;/p&gt;
&lt;p&gt;Bart&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh assert on mesh stack init.</title><link>https://devzone.nordicsemi.com/thread/204463?ContentTypeID=1</link><pubDate>Fri, 16 Aug 2019 10:53:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a35cb7f3-3c97-4f3a-b3f4-8b5a27e66fbd</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what is causing this issue but you should debug your application and see what error you get when this happens. Put a breakpoint at&amp;nbsp;app_error_fault_handler and check the error code.&lt;/p&gt;
&lt;p&gt;If you re-flash your application&amp;nbsp;on the device, does this still occurr? How many reboots until this happens? Is it the same amount of reboots each time?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>