<?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>Kernel panic on nRF9151 when connecting to AWS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122246/kernel-panic-on-nrf9151-when-connecting-to-aws</link><description>Hi, 
 I&amp;#39;m developing an application running on a nRF9151 that connects to AWS. I&amp;#39;m using the aws_iot library and my code is based on the aws_iot sample application. While I have been able to successfully connect to AWS at times, for the last day or so</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 14 Jun 2025 15:33:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122246/kernel-panic-on-nrf9151-when-connecting-to-aws" /><item><title>RE: Kernel panic on nRF9151 when connecting to AWS</title><link>https://devzone.nordicsemi.com/thread/539270?ContentTypeID=1</link><pubDate>Sat, 14 Jun 2025 15:33:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:566969e6-e9a7-4de4-be84-1ddf823267ab</guid><dc:creator>Hakon</dc:creator><description>[quote user="Scott Grubb"]Is there another heap setting that I need to change?&amp;nbsp;[/quote]
&lt;p&gt;You can try increasing CONFIG_AT_MONITOR_HEAP_SIZE, if you haven&amp;#39;t tried that already.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kernel panic on nRF9151 when connecting to AWS</title><link>https://devzone.nordicsemi.com/thread/539171?ContentTypeID=1</link><pubDate>Fri, 13 Jun 2025 09:57:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3af38d70-1989-4464-b56b-ae13049302c6</guid><dc:creator>Scott Grubb</dc:creator><description>&lt;p&gt;I disabled CONFIG_ASSERT and now I can see that the problem is because there is insufficient heap space for an incoming notification.&amp;nbsp; I have tried increasing the HEAP_MEM_POOL_SIZE to 65536 bytes&amp;nbsp;but I&amp;#39;m still seeing the same message.&amp;nbsp; Is there another heap setting that I need to change?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1749808633758v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kernel panic on nRF9151 when connecting to AWS</title><link>https://devzone.nordicsemi.com/thread/539141?ContentTypeID=1</link><pubDate>Fri, 13 Jun 2025 07:39:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c8a7bce-c55b-460f-a9d5-60465c32574b</guid><dc:creator>Scott Grubb</dc:creator><description>&lt;p&gt;Having said that, there is something odd going on within the aws_iot_connect() function.&amp;nbsp; CONFIG_AWS_IOT_CONNECT_TIMEOUT is set to 30s by default, but it is taking around 150s for the connection attempt to timeout.&amp;nbsp; It appears that the kernel panic always occurs on the second call to aws_iot_connect() after the first has timed out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kernel panic on nRF9151 when connecting to AWS</title><link>https://devzone.nordicsemi.com/thread/539115?ContentTypeID=1</link><pubDate>Thu, 12 Jun 2025 23:48:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef28d665-dd09-409c-861a-464302f4748b</guid><dc:creator>Scott Grubb</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestions.&lt;/p&gt;
&lt;p&gt;I had a read through the discussion you linked to.&amp;nbsp; However, I don&amp;#39;t think it explains the problem that I&amp;#39;m having, because I&amp;#39;m not doing anything (that I&amp;#39;m aware of) under interrupt.&amp;nbsp; Task scheduling, including connecting to AWS, is all done using the system workqueue.&amp;nbsp; The aws_iot library does make use of an event_handler but all that does is print out the event to the log (and I&amp;#39;m using deferred logging).&amp;nbsp; I guess it&amp;#39;s possible that there is something in the aws_iot library or the mqtt_helper that&amp;#39;s attempting to take a semaphore under interrupt but that seems unlikely as I&amp;#39;m sure other people would have encountered the same problem before me.&lt;/p&gt;
&lt;p&gt;Scott&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kernel panic on nRF9151 when connecting to AWS</title><link>https://devzone.nordicsemi.com/thread/539114?ContentTypeID=1</link><pubDate>Thu, 12 Jun 2025 22:58:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2de399b5-9998-4b04-8cfe-e3eebd4faa99</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Edit: Oops, just&amp;nbsp;noticed you already traced the instruction to assert.c. Maybe the link below will still help.&lt;/p&gt;
&lt;p&gt;Try to look up where function is located with &lt;em&gt;arm-none-eabi-addr2line&lt;/em&gt;; this (usually) gives the source file and line number:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;arm-none-eabi-addr2line -e build-folder/zephyr/zephyr.elf 0x000612d2&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For such an interrupt error, this discussion might help:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/118869/zephyr-fatal-error-4-kernel-panic-on-cpu-0"&gt;zephyr-fatal-error-4-kernel-panic-on-cpu-0&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>