<?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>Random blocking issue with getaddrinfo function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110840/random-blocking-issue-with-getaddrinfo-function</link><description>Hello, 
 I am currently using some code from the HTTP client sample to send HTTP requests to a server from my application. I have encountered an issue where the thread from which I send the request occasionally blocks. The serial log indicates that the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 May 2024 12:25:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110840/random-blocking-issue-with-getaddrinfo-function" /><item><title>RE: Random blocking issue with getaddrinfo function</title><link>https://devzone.nordicsemi.com/thread/486427?ContentTypeID=1</link><pubDate>Wed, 29 May 2024 12:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44788344-1443-4f89-9416-5c5531331223</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;That&amp;#39;s weird. Maybe it&amp;#39;s because the log contains no packet transmissions, just internal modem activity? Are you sure that you have established a connection to a remote host when the trace was done?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Random blocking issue with getaddrinfo function</title><link>https://devzone.nordicsemi.com/thread/483561?ContentTypeID=1</link><pubDate>Wed, 15 May 2024 15:38:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dac734e-fb65-4e79-99cf-4374a8577c2e</guid><dc:creator>V1incentC</dc:creator><description>&lt;p&gt;I managed to capture the trace with rtt like in this issue:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/104983/how-to-capture-nrf9160-modem-traces-using-rtt"&gt;How to capture nrf9160 modem traces using RTT?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But when I try to open it in wireshark I get this error:&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1715787419235v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/modemtraces_5F00_stuck_5F00_in_5F00_addressinfo.bin"&gt;devzone.nordicsemi.com/.../modemtraces_5F00_stuck_5F00_in_5F00_addressinfo.bin&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Random blocking issue with getaddrinfo function</title><link>https://devzone.nordicsemi.com/thread/483277?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 12:17:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:210a8a34-4cba-4f4f-b4dc-705d27f0480b</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Yes, it just enters idle mode. I read about it, and it should return with a timeout if the DNS server is not reached. So this behavior is not expected. Can you do a modem trace and reproduce the issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Random blocking issue with getaddrinfo function</title><link>https://devzone.nordicsemi.com/thread/482369?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 18:01:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b536cd74-7e85-4ea7-9e73-70f205f0921e</guid><dc:creator>V1incentC</dc:creator><description>&lt;p&gt;I caught it at this part:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enter low power state */&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;_sleep_if_allowed wfi&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * Clear PRIMASK and flush instruction buffer to immediately service&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * the wake-up interrupt.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; */&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;cpsie&amp;nbsp;&amp;nbsp; &amp;nbsp;i&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;isb&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bx&amp;nbsp;&amp;nbsp; &amp;nbsp;lr&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then I let the program run and paused it a few times and it mostly jumps around timeout.c, thread.c and timer.c.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These are the last lines on the serial log:&lt;br /&gt;[00:04:01.572,967] &amp;lt;inf&amp;gt; livehub_api: lcd:Server ping&lt;br /&gt;&lt;br /&gt;[00:04:01.572,998] &amp;lt;inf&amp;gt; http_client: Sending HTTP POST request from server_sender_thread&lt;br /&gt;&lt;br /&gt;[00:04:01.573,364] &amp;lt;inf&amp;gt; http_client: Getting address info&lt;br /&gt;&lt;br /&gt;[00:04:03.166,351] &amp;lt;inf&amp;gt; modem_control: RRC mode: Idle&lt;br /&gt;&lt;br /&gt;As you can see in my http_client_send_request function I posted the execution stops at getaddrinfo(), according to LOG prints.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Random blocking issue with getaddrinfo function</title><link>https://devzone.nordicsemi.com/thread/482349?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 15:39:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0777f081-599f-4381-a5b2-3c07e4faacd9</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;have you tried running it in the debugger to see what part of the code it hangs at?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>