lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] httpserver problem


From: vincent cui
Subject: Re: [lwip-users] httpserver problem
Date: Thu, 22 Sep 2011 11:27:29 +0000

That's why my code will halt after running a long time .
I run the chargen application in lwIP_contrib, it works fine. But it only send 
1 character each time ...
My case is sending a large of data each time ..maybe it is why my lwIP halt .

In fact, I am not clear about the case that new connection coming but old 
connection is not done (all connection deal with same thing), I just wonder to 
know
If it will case deadlock for some resource


锘?Vincent Cui
Sr.Firmware Engineer
Mobile: +8613482482211
Tel: +86 21 34612525x6104
Fax: +86 21 34619770
E-Mail: address@hidden
Shanghai EnLogic Electric Technology Co., Ltd.
Address: 1104-1106, Building A, No.391, Guiping Road, Xuhui District, Shanghai, 
200233
http://www.enlogic.com
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of FreeRTOS Info
Sent: 2011年9月21日 23:54
Cc: Mailing list for lwIP users
Subject: Re: [lwip-users] httpserver problem

On 21/09/2011 14:31, vincent cui wrote:
> Richard:
> 
> I reference to "basicsocketcommandserver" , it is almost as mine. So
> I suppose mine code is fine. 

That just uses the sockets interface, and is unlikely to be a problem
unless your lwipconfig.h is wrong.  What you should be looking at is how
packets are passed from the network driver into the stack - that is the
bit that is important to get right in a multi tasking environment.

> But I also found some problem. 1.
> configTICK_RATE_HZ, the DEFINE value is 1000ms , It means switching
> task when tick trigger. So I change it to 5ms.

1000Hz = 1ms period, not 1000ms!  The HZ in the name denotes the units
as Hertz.

If you set the parameter to 5, you will get 200ms (extremely slow) not
5ms.  See the description of the parameter here:
http://www.freertos.org/a00110.html.  That is a very basic thing to get
right before you do anything else, and this mailing list is not the
correct place to be asking FreeRTOS questions.


> 2. my server code for dealing with GET command will send a big of
> data, and those data is defined as global variable So It is possible
> for lwIP hang when new TCP coming but old TCP is not handled done
> yet..
> 
> Does it make sense ?

No.

I think you are describing something to do with mutual exclusion on a
global variable that is in your application?  If so, you will have to
work that out.

Regards,
Richard

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.

> 
> 锘?Vincent Cui Sr.Firmware Engineer Mobile: +8613482482211 Tel: +86
> 21 34612525x6104 Fax: +86 21 34619770 E-Mail:
> address@hidden Shanghai EnLogic Electric Technology Co.,
> Ltd. Address: 1104-1106, Building A, No.391, Guiping Road, Xuhui
> District, Shanghai, 200233 http://www.enlogic.com -----Original
> Message----- From: FreeRTOS Info [mailto:address@hidden Sent:
> 2011年9月20日 22:48 To: Mailing list for lwIP users Cc: vincent
> cui Subject: Re: [lwip-users] httpserver problem
> 
> FreeRTOSConfig.h will be irrelevant.  sys_arch much more relevant.
> 
> There are some FreeRTOS examples that demonstrate socket usage in a 
> multitasking environment - although thus far only a command
> interpreter, so nothing that will put the stack under the same load
> as an HTTP server has the potential to do.
> 
> From what I have read on this list, the normal answer seems to be,
> there could be a threading issue with the way your interrupts are
> interacting with the stack.
> 
> Regards, Richard.
> 
> + http://www.FreeRTOS.org Designed for Microcontrollers. More than
> 7000 downloads per month.
> 
> 
> 
> 
> 
> On 20/09/2011 15:33, vincent cui wrote:
>> The bug happen in dynamic... If I dump the lwipopt and freertos
>> configuration files.  Do you help to figure it out ?
>> 
>> ï»?Vincent Cui Sr.Firmware Engineer Mobile: +8613482482211 Tel:
>> +86 21 34612525x6104 Fax: +86 21 34619770 E-Mail:
>> address@hidden Shanghai EnLogic Electric Technology Co.,
>> Ltd. Address: 1104-1106, Building A, No.391, Guiping Road, Xuhui
>> District, Shanghai, 200233 http://www.enlogic.com
>> 
>> -----Original Message----- From:
>> address@hidden
>> [mailto:address@hidden On
>> Behalf Of Kieran Mansley Sent: 2011Äê9ÔÂ20ÈÕ 22:30 To:
>> Mailing list for lwIP users Subject: Re: [lwip-users] httpserver
>> problem
>> 
>> On Tue, 2011-09-20 at 14:10 +0000, vincent cui wrote:
>>> But I really don't know why lwIP will hang ...
>> 
>> It's either (i) a bug in lwIP; or (ii) a bug in your port; or
>> (iii) badly configured for the load you're putting it under and has
>> run out of resources.
>> 
>> Kieran
>> 
>> 
>> _______________________________________________ lwip-users mailing
>> list address@hidden 
>> https://lists.nongnu.org/mailman/listinfo/lwip-users 
>> _______________________________________________ lwip-users mailing
>> list address@hidden 
>> https://lists.nongnu.org/mailman/listinfo/lwip-users
> 


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

[Prev in Thread] Current Thread [Next in Thread]