<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software SolutionsのトピックRe: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253715#M7391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for the idea. I will look at this problem from that angle and see if I can affect it. Right now I've just dialed back the cgi message frequency to no more then one every 100mS and that seems to work. Not a very satisfying fader experience for the user but it beats crashing the OS. I will post any insights or breakthroughs back to this thread. Thanks again for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tim &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jan 2014 17:08:40 GMT</pubDate>
    <dc:creator>Tim562</dc:creator>
    <dc:date>2014-01-30T17:08:40Z</dc:date>
    <item>
      <title>HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253712#M7388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm using the HTTP Server from RTCS 4.0.2 and have discovered a problem. When the client webpage sends a large volume of CGI POST messages the entire MQX system can be crashed. What I mean by "high volume" is I have a webpage with a gain slider on it and as it is moved it generates a CGI POST message that is about 100 bytes long. If I only allow the webpage to send one message per second there's no problem but, if I don't pace it, after a few (5, 10) seconds of continuous slider movement, MQX crashes. It's not a problem with my CGI function that process the incoming gain command (I've commented it out and just ignored these messages and the same thing happens).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The main CGI function that is called when any incoming message is received reads from the socket into a temp buffer (allocated for this session), calls the appropriate function to handle the message (based on it's content), frees the memory allocated for the buffer and exits. The problem seems to occur when a new CGI POST message is received while a previous message is still being processed. Has anybody else run into a problem similar to this? When the system crashes (under debug control) I frequently observe that MQX is running the SOCK_STREAM_shutdown() function. Any thoughts on troubleshooting something likes this? Thanks for any replies!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13905073279428599" jivemacro_uid="_13905073279428599"&gt;
&lt;P&gt;_mqx_int CGI_ParseMsg(HTTPSRV_CGI_REQ_STRUCT *param)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_32 lTotalMsgBytes, lReadLength, lBytesRead, lReadval;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mqx_int lRetval = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char_ptr sRecvBuffer = NULL;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char_ptr sBufferPtr = NULL;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(param-&amp;gt;request_method != HTTPSRV_REQ_POST)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(0);&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Attempt to allocate a sRecvBuffer to store the received data
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lTotalMsgBytes = param-&amp;gt;content_length;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sRecvBuffer = _mem_alloc(lTotalMsgBytes);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(sRecvBuffer == NULL)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PSERVE_LogMsg(local-&amp;gt;cOurSlot, "CGI_ParseMsg() - Unable To Allocate sRecvBuf", gcLOGENTRY_ERROR);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(0);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Read in the data until all bytes (per lTotalRecvdMsgBytes value) are received
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sBufferPtr = sRecvBuffer; //Use sBufferPtr as a movable temp pointer so sRecvBuffer can always point to buffer start
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lBytesRead = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(param-&amp;gt;content_length &amp;gt; 0)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lReadLength = HTTPSRV_cgi_read(param-&amp;gt;ses_handle, sBufferPtr, (lTotalMsgBytes-lBytesRead));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; param-&amp;gt;content_length -= lReadLength;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sBufferPtr += lReadLength;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lBytesRead += lReadLength;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Parse / decode the msg here
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mem_free(sRecvBuffer);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(0);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 20:20:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253712#M7388</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-01-23T20:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253713#M7389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I was able to observe a crash where the debugger continued to function and was able to view Task Summary and Stack Usage info. Looks like I have two tasks in distress (main and TCP/IP) with no stack overflows. I've tried increasing the stack size in both the RTCS init (_RTCSTASK_stacksize = 100000;) and HttpdServer init ( params.script_stack = 100000; ) but it seems to make no difference. A buffer overflow or a failure to release allocated memory would be my usual suspects, but that doesn't seem to be the case here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TASK SUMMARY&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41475i54F202A0DDDAE2D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STACK USAGE&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41879i8A293383610D5D0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 21:52:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253713#M7389</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-01-23T21:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253714#M7390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tim:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can say I've run into this issue in a past lifetime (i.e. a non-Freescale MQX job) about 8 years ago.&amp;nbsp; At the time I was led to believe that this was a fairly common occurrence for several of the open source web servers.&amp;nbsp; CGI messaging creates a new process handler for the request, and pounding the server with CGI messages crashed quite a few of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get around this, a new protocol called FastCGI was developed.&amp;nbsp; FastCGI differs from standard CGI in that the process was persistent, so it reduced overhead since the server did not have to create and then destroy the process handler over and over again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that this doesn't really help you with MQX, but perhaps you may find the information helpful or see if Freescale plans on implementing FastCGI in the library (hopefully someone from Freescale will read this and let us know).&amp;nbsp; It is also possible that you could look into the code of one of the open source servers and implement this in MQX (one in particular that was very good was the Hiawatha web server).&amp;nbsp; At some point in time I plan on using this type of communications in my project, although I am far from the step where this would be necessary.&amp;nbsp; Or at the worst case, perhaps it would be possible to limit the requests on the server... although that probably is much help in the long run aside from stopping the whole OS to crash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very interested in what you come up with... as I said at some point perhaps we could work on a FastCGI port together.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 16:45:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253714#M7390</guid>
      <dc:creator>stevejanisch</dc:creator>
      <dc:date>2014-01-27T16:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253715#M7391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for the idea. I will look at this problem from that angle and see if I can affect it. Right now I've just dialed back the cgi message frequency to no more then one every 100mS and that seems to work. Not a very satisfying fader experience for the user but it beats crashing the OS. I will post any insights or breakthroughs back to this thread. Thanks again for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tim &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 17:08:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253715#M7391</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-01-30T17:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253716#M7392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to add a break point in the function _task_set_error(). Then take a screenshot to the task stack and share here so we can see where in the code these invalid pointers are coming up. Maybe we can figure out how to solve that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Garabo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 20:56:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253716#M7392</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2014-01-30T20:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253717#M7393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will do Garabo, thanks for the tip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 22:38:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253717#M7393</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-02-12T22:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253718#M7394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I haven't been able to catch a crash that leaves the debugger operational yet but, setting the breakpoint you suggested is catching semi-regular errors (mostly during start-up) as MQX attempts to allocate a memory partition in support of processing a received TCP/IP packet. The task_set_error() function parameter "new_error_code" value is 2050 and the function _partition_alloc_internal() that called task_set_error() passed it the constant "PARTITION_OUT_OF_BLOCKS". This error condition seems to occur semi-regularly during operation of the system (especially during boot up) but doesn't normally seem to crash things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Not sure that this is the task stack condition during a crash caused by heavy CGI activity but it may be a clue as to what's happening? I will keep attempting to catch a breakpoint hit that coincides with the CGI activity crash and post the stack if I catch it. Any thoughts on what I might do to prevent this error condition? The system (MQX 3.8.1.1 with RTCS 4.01) is running on a TWR-MPC-5125 module with 256MB of DDR memory and I have tons of working ram available to my application if I need it so I don' t think it's a shortage of ram, right? Any config changes I can make to try and make more memory available to MQK for this operation? Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42698iD93673A1A5CE417B/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error.jpg" alt="MQX task_set_error() stack capture on error.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, just caught this error during normal (non heavy CGI) operation. new_error_code = 3, _mem_free() passed MQX_NOT_RESOURCE_OWNER when called _task_set_error().&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(2).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42699iF912F374AEAA6867/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(2).jpg" alt="MQX task_set_error() stack capture on error(2).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 00:01:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253718#M7394</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-02-13T00:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253719#M7395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you are getting out of PCBs try to add this before the RTCS task is created:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_RTCSPCB_init = 4;&lt;/P&gt;&lt;P&gt;_RTCSPCB_grow = 2;&lt;/P&gt;&lt;P&gt;_RTCSPCB_max = 20;&lt;/P&gt;&lt;P&gt;_RTCS_msgpool_init = 4;&lt;/P&gt;&lt;P&gt;_RTCS_msgpool_grow = 2;&lt;/P&gt;&lt;P&gt;_RTCS_msgpool_max&amp;nbsp; = 20;&lt;/P&gt;&lt;P&gt;_RTCS_socket_part_init = 4;&lt;/P&gt;&lt;P&gt;_RTCS_socket_part_grow = 2;&lt;/P&gt;&lt;P&gt;_RTCS_socket_part_max&amp;nbsp; = 20;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Garabo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 19:47:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253719#M7395</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2014-02-13T19:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253720#M7396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for your suggestion, the settings you recommended were already specified in my application. For fun I tried doubling each value but experienced the same OS crash upon consistent CGI message activity. I did observe a slightly different task stack upon a task_set_error() function breakpoint (last night before doubling the _RTCS_ values) and am posting it here. It appears that the TCP/IP task is out of memory. Do you know how I increase the memory available to that task? Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(3).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41162i2D023CE18669BF15/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(3).jpg" alt="MQX task_set_error() stack capture on error(3).jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(3a).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41354i04578DCF63D63CC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(3a).jpg" alt="MQX task_set_error() stack capture on error(3a).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 17:51:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253720#M7396</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-02-14T17:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253721#M7397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have noticed that since I doubled the _RTCS_ values from the defaults, I haven't seen the&amp;nbsp; task_set_error() function breaking on any more RTCS or TCP errors (that's a good thing : )... Continuous CGI activity still crashes the OS though : ( ... After a dozen or so crashes,&amp;nbsp; the task_set_error() function broke with this stack capture:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(4).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41608i78CA63D729659470/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(4).jpg" alt="MQX task_set_error() stack capture on error(4).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error being logged was MQX_INVALID_POINTER. Maybe the problem isn't with the _RTCS or the TCP/IP task after all? Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 18:19:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253721#M7397</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-02-14T18:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253722#M7398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please give a check with the attached scheduler change in the PSP project:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 09:56:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253722#M7398</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2014-02-17T09:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253723#M7399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin and Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I placed the new dispatch.s file in the "C:\Program Files (x86)\Freescale\Freescale MQX 3.8.1.1\mqx\source\psp\powerpc" folder (replacing the existing file) then rebuilt MQX and tried my application again but, unfortunately got the same results. I believe this is occurring when the CGI messages come in faster then they can be serviced and multiple sockets are opened to handle them. I'm pasting in a couple of screen caps that I got when my application hit a breakpoint I set in the _task_set_error() function (Indicated error number 4 which I believe is OUT_OF_MEMORY). Is there any other info I could try and capture that might provide more clues as to what's happening? Thanks much for your suggestion of trying the modification to the dispatch.s file, I appreciate it. Hope all is well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Tim Hutchinson&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(5).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42465i2BA84B94F0D033E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(5).jpg" alt="MQX task_set_error() stack capture on error(5).jpg" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(5a).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42231i706D3E9D1B8AE20D/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(5a).jpg" alt="MQX task_set_error() stack capture on error(5a).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(5b).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41487iE845842A266A4FA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(5b).jpg" alt="MQX task_set_error() stack capture on error(5b).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(5e).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42179iE3BA964239A68DF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(5e).jpg" alt="MQX task_set_error() stack capture on error(5e).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 19:20:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253723#M7399</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-02-18T19:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253724#M7400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin and Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm starting to think that a high volume of CGI message traffic is not required to cause the MQX crash. I'm thinking that it just provides more opportunity for a crash. It looks like there may be an issue with the amount of memory allocated to the TCP/IP task (not the stack size). Do you know how I can increase that amount? How about any other information I might examine to determine what's happening here? Hope all is well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 00:06:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253724#M7400</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-02-27T00:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253725#M7401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A good way to increase the TCPIP memory dedicated for it is by adding this:&lt;/P&gt;&lt;P&gt;_RTCSTASK_stacksize = 4500;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Garabo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 14:52:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253725#M7401</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2014-02-27T14:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253726#M7402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Looking at the above stack usage screen capture it looks like the stack size for the TCP/IP task isn't the problem with only 17% utilization. It looks like the RTCS task was trying to allocate a memory chunk (400 to 500 bytes if I remember correctly) and was unable to do so. Examining the MQX/Memory Pools and MQX/Memory blocks info provided by CodeWarrior indicated there was aprox 130MB of RAM available to the system, yet the call to _mem_alloc_zero() failed and _task_set_error() (where I had a breakpoint set) was called to document that error. It seems to me that with around 130MB of RAM available to MQX that _mem_alloc_zero() should have been able to allocate a few hundred bytes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm trying to figure out where to look to determine how _mem_alloc_zero() could've been unable to provide the requested memory. Perhaps this problem wasn't the "cause" of the crash but just a symptom of some other problem? The MQX project seems to be completely stable until the web server is called into action, then it's only a matter of time before I run into this crash. Maybe it's an issue with porting the RTCS from 4.0.2 into MQX 3.8.1.1? Any thoughts on further troubleshooting? Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 17:23:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253726#M7402</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-02-27T17:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253727#M7403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin and Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I've had a thought about the crashes I'm seeing and wonder if something I'm doing in my code is the problem. When I need to send a reply to a web client, I build that reply in a temp buffer (pBuf in example below), issue the response using HTTPSRV_cgi_write(), and then free the buffer like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13935297518223847" jivemacro_uid="_13935297518223847" modifiedtitle="true"&gt;
&lt;P&gt;uint_16 CGI_ServicePwordMsg(HTTPSRV_CGI_REQ_STRUCT *param, char_ptr pRecvBuffer)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lReplyLen;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char_ptr pBuf = NULL;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HTTPSRV_CGI_RES_STRUCT response;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pBuf = _mem_alloc(256);&amp;nbsp;&amp;nbsp;&amp;nbsp; //Allocate a 256 byte temp buffer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(pBuf == NULL)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(0);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/*&lt;/P&gt;
&lt;P&gt;Function code goes here&lt;/P&gt;
&lt;P&gt;&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;&amp;nbsp; lReplyLen = ???; //lReplyLen is set to actual number of bytes loaded in the buffer&lt;/P&gt;
&lt;P&gt;*/&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Fill out the response info and write the data
&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; ISSUE_RESPONSE:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; response.ses_handle = param-&amp;gt;ses_handle;
&amp;nbsp;&amp;nbsp;&amp;nbsp; response.content_type = HTTPSRV_CONTENT_TYPE_PLAIN;
&amp;nbsp;&amp;nbsp;&amp;nbsp; response.status_code = 200;
&amp;nbsp;&amp;nbsp;&amp;nbsp; response.data = pBuf;
&amp;nbsp;&amp;nbsp;&amp;nbsp; response.data_length = lReplyLen;
&amp;nbsp;&amp;nbsp;&amp;nbsp; response.content_length = response.data_length;
&amp;nbsp;&amp;nbsp;&amp;nbsp; HTTPSRV_cgi_write(&amp;amp;response);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Release the allocated receive buffer
&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(_mem_free(pBuf) != MQX_OK)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;lt;-- OK TO RELEASE pBUF MEMORY HERE ???
&amp;nbsp;&amp;nbsp;&amp;nbsp; return(0);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(response.content_length);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if my freeing the buffer immediately after the HTTPSRV_cgi_write() call is causing a problem? Perhaps the buffer memory can't be released back to MQX until after the reply transmission has completed? Perhaps a better practice is to allocate a persistent buffer to support replies to CGI service requests? I guess another good question would be, does HTTPSRV_cgi_write() block until it is finished transmitting the contents of the buffer? Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 19:47:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253727#M7403</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-02-27T19:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253728#M7404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim, try using "_mem_alloc_system()" to allocate your memory (or _mem_alloc_system_zero() in case the memory needs to be cleared". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 07:27:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253728#M7404</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2014-03-04T07:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253729#M7405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I will give it a try and report back here. Did you have any opinion on my practice of freeing my temporary memory buffer immediately after calling HTTPSRV_cgi_write()? Hope all is well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 17:40:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253729#M7405</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-03-04T17:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253730#M7406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I changed all calls to _mem_alloc() in the CGI service functions to be calls to _mem_alloc_system() with pretty much the same results (out of memory crash). I had a breakpoint set in the _task_set_error() function and when it hit (on an attempt to allocate 496 bytes of memory) I made screen captures of the situation as reported by Code Warrior. The breakpoint was in place at application startup and no hits were encountered (at startup, init and running) until the web interface started servicing CGI client requests. I'm pasting in the various screen captures and attaching a larger capture of the MQX memory blocks (I thought it too large to paste into this msg). I'm also attaching the extram.lcf file for the project&amp;nbsp; in case it sheds any light. I've noticed that the MQX Memory blocks report indicates 87MB of memory available from 0x0A00_0420 to 0x0F7F_FFA0 (aprox 3.0MB used) which the extram.lcf file indicates is in the "kernel" memory area.&amp;nbsp; I appreciate your suggestions Martin and If you can think of anything I might be able to do to gather more info about what's happening I would be grateful. Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H5&gt;&lt;SPAN style="text-decoration: underline;"&gt;Captures were taken when _mem_alloc_zero() attempted to allocate 496 bytes and failed&lt;/SPAN&gt;.&lt;/H5&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Stack when _task_set_error() breakpoint hit:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(6).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42963i2BC64A57BA3AB2F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(6).jpg" alt="MQX task_set_error() stack capture on error(6).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MQX Task Summary when _task_set_error() breakpoint hit (No TCP/IP error until after _task_set_error() returned):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(6b).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42964i1B9DC870AC419FCD/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(6b).jpg" alt="MQX task_set_error() stack capture on error(6b).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MQX Stack Usage Report (Notice no overflows):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(6a).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42965i0EE538EDDE2E5054/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(6a).jpg" alt="MQX task_set_error() stack capture on error(6a).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MQX Memory Pools report (tons of available memory right?):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MQX task_set_error() stack capture on error(6c).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42966i738D41A5D603FB01/image-size/large?v=v2&amp;amp;px=999" role="button" title="MQX task_set_error() stack capture on error(6c).jpg" alt="MQX task_set_error() stack capture on error(6c).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 19:33:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253730#M7406</guid>
      <dc:creator>Tim562</dc:creator>
      <dc:date>2014-03-04T19:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server 4.0.2 System Crash On Recipt Of High Volume Of CGI POST Messages</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253731#M7407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've juste read your posts and I think I have the same problem : &lt;A _jive_internal="true" href="https://community.nxp.com/message/388034#388034" style="font-size: 10pt; line-height: 1.5em;" title="https://community.freescale.com/message/388034#388034"&gt;https://community.freescale.com/message/388034#388034&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me, it's not with CGI requests, but with any request (SHTML, HTML, GIF, JPEG or other file extensions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I there are too many requests too close, the HTTPSRV will crashed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to add a patch in an external task to kill the open socket on timeout, but the result is not perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you some fresh informations about your problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 09:48:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-4-0-2-System-Crash-On-Recipt-Of-High-Volume-Of-CGI/m-p/253731#M7407</guid>
      <dc:creator>yb</dc:creator>
      <dc:date>2014-03-18T09:48:10Z</dc:date>
    </item>
  </channel>
</rss>

