[ECOS] Network code unstable (Still Not Solved).

Pieter Truter ptruter@intrinsyc.com
Mon Feb 18 15:07:00 GMT 2002


Here is the promissed test app.
I am not sure what is working and what is not.
Sometimes it crash after 100 loops, sometimes after the first loop. If I put
it in ROM it always crash in the first loop.

Please give this a try.



-----Original Message-----
From: Pieter Truter 
Sent: Tuesday, February 12, 2002 12:21 PM
To: eCos Disuss
Subject: RE: [ECOS] Network code unstable (Solved).



All good and valid questions. ;-) 
That is why I did not suspect priority because I only have a single thread.

I will create a simple sample that highlight the problem and send it to.

Pieter

-----Original Message-----
From: Gary Thomas [mailto:gthomas@redhat.com]
Sent: Tuesday, February 12, 2002 11:49 AM
To: Pieter Truter
Cc: eCos Disuss
Subject: RE: [ECOS] Network code unstable (Solved).


On Tue, 2002-02-12 at 12:36, Pieter Truter wrote:
> 
> I think the problem appears when the network is at a lower priority than
the
> user thread. It will only appear if the network is flooded (ie. download
of
> big file). The network stack never times out or recover from it. Small
> batches of work seems fine.
> 
> I run some test for you. It fails on priority <= 10, 11 and up is fine.
> 
> I hope this helps.
> 

It would be nice to see the code.  In particular, what is the thread 
that called the TFTP client code doing?  Why doesn't it simply stall 
when the network runs out of data, instead of everything dying?  (Not 
that you have these answers, but with proper tests, I can find them and
try and make the stack better).

>  
> -----Original Message-----
> From: Gary Thomas [mailto:gthomas@redhat.com]
> Sent: Tuesday, February 12, 2002 11:16 AM
> To: Pieter Truter
> Cc: eCos Disuss
> Subject: RE: [ECOS] Network code unstable (Solved).
> 
> 
> On Tue, 2002-02-12 at 11:51, Pieter Truter wrote:
> > 
> > I played around with my thread priority and made it 15 instead of 10.
That
> > solved my problem.
> > 
> 
> Is this [broken] testcase something you can share with me?  I'd like to 
> understand the problems so we can fix them or document how to avoid them
> like you have.
> 
> > For the record what should thead priorities be, not to interfere with
the
> > network?
> > 
> > Thanks
> > 
> > -----Original Message-----
> > From: Andrew Lunn [mailto:andrew.lunn@ascom.ch]
> > Sent: Tuesday, February 12, 2002 10:33 AM
> > To: Pieter Truter
> > Cc: eCos Disuss
> > Subject: Re: [ECOS] Network code unstable.
> > 
> > 
> > On Tue, Feb 12, 2002 at 10:27:47AM -0800, Pieter Truter wrote:
> > > This is only when I download big files (250Kb and up)
> > 
> > The TFTP server has two different retry counters. For each 512byte
> > packet it allows a number of retires and then gives up. Also, there is
> > a maximum for the whole transfer. If you exceed either of these it
> > closes the connection.
> > 
> > Check for this. Maybe you are loosing packets or have a bad link?
> > 
> >       Andrew
> > 
> > Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> > and search the list archive: http://sources.redhat.com/ml/ecos-discuss
> 
> 
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


begin 600 tftptest.c
M(VEN8VQU9&4@/'-T9&EO+F@^"B-I;F-L=61E(#QS=&1L:6(N:#X*(VEN8VQU
M9&4@/&YE='=O<FLN:#X*(VEN8VQU9&4@/'-Y<R]T>7!E<RYH/@HC:6YC;'5D
M92`\;F5T+VEF+F@^"B-I;F-L=61E(#QN970O:69?9&PN:#X*(VEN8VQU9&4@
M/&YE=&EN970O:6XN:#X*(VEN8VQU9&4@/'-Y<R]E<G)N;RYH/@HC:6YC;'5D
M92`\<W1R:6YG+F@^"B-I;F-L=61E(#QL:6UI=',N:#X*(VEN8VQU9&4@/&%S
M<V5R="YH/@HC:6YC;'5D92`\8W1Y<&4N:#X*(VEN8VQU9&4@/'1F='!?<W5P
M<&]R="YH/@H*(V1E9FEN92!35$%#2U]325I%("A#64=.54U?2$%,7U-404-+
M7U-)6D5?5%E024-!3"D*(V1E9FEN92!04DE/4DE462`@(#4@"@HC9&5F:6YE
M($)51D9%4E]325I%("@Q,#(T*C$P,C0J,3`I("\O(#$P365G"@IC:&%R*B!4
M1G1P4V5R=F5R(#T@(C$Y,BXQ-C@N,"XQ-3,B.PIC:&%R*B!&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&1R
M(#T@;G1O:&PH971H,%]B;V]T<%]D871A+F)P7WEI861D<BYS7V%D9'(I.R`O
M+R!#;&EE;G0*("`@("`@('-I861D<B`](&YT;VAL*&5T:#!?8F]O='!?9&%T
M82YB<%]S:6%D9'(N<U]A9&1R*3L@+R\@4V5R=F5R"B`@('T*("`@96QS90H@
M("!["B`@("`@("!D:6%G7W!R:6YT9B@B3F5T=V]R:R!S=&%R='5P(&9A:6QE
M9"Y<;B(I.PH@("`@("`@8WEG7W1E<W1?97AI="@I.PH@("!]"@H@("!B=69F
M97(@/2`H=3@J*2!M86QL;V,H0E5&1D527U-)6D4I.PH@("!F;W(@*&EN9&5X
M(#T@,#L@:6YD97@@/"`Q,#`P.R!I;F1E>"LK*0H@("!["B`@("`@(&EN="!L
M96YG=&@@/2`P.PH*("`@("`@9&EA9U]P<FEN=&8H(B4T9"!T9G1P(&=E="`E
M<R!F<F]M("5S("(L(&EN9&5X+"!&:6QE3F%M92P@5$9T<%-E<G9E<BD[(`H@
M("`@("!L96YG=&@@/2!T9G1P9V5T*%1&='!397)V97(L($9I;&5.86UE+"!B
M=69F97(L($)51D9%4E]325I%+"`F97)R;W(I.PH@("`@("!I9B`H;&5N9W1H
M(#P@,"D*("`@("`@>PH@("`@("`@("!D:6%G7W!R:6YT9B@B15)23U(Z("(I
M.PH@("`@("`@("!S=VET8V@@*&5R<F]R*0H@("`@("`@("!["B`@("`@("`@
M("`@(&-A<V4@5$944%]%3D]41D]53D0Z(&1I86=?<')I;G1F*")F:6QE(&YO
M="!F;W5N9"(I.R!B<F5A:SL*("`@("`@("`@("`@8V%S92!41E107T5!0T-%
M4U,Z("`@9&EA9U]P<FEN=&8H(F%C8V5S<R!V:6]L871I;VXB*3L@8G)E86L[
M"B`@("`@("`@("`@(&-A<V4@5$944%]%3D]34$%#13H@(&1I86=?<')I;G1F
M*")D:7-K(&9U;&PB*3L@8G)E86L["B`@("`@("`@("`@(&-A<V4@5$944%]%
M0D%$3U`Z("`@(&1I86=?<')I;G1F*")I;&QE9V%L(%1&5%`@;W!E<F%T:6]N
M(BD[(&)R96%K.PH@("`@("`@("`@("!C87-E(%1&5%!?14)!1$E$.B`@("!D
M:6%G7W!R:6YT9B@B=6YK;F]W;B!T<F%N<V9E<B!)1"(I.R!B<F5A:SL*("`@
M("`@("`@("`@8V%S92!41E107T5%6$E35%,Z("`@9&EA9U]P<FEN=&8H(F9I
M;&4@86QR96%D>2!E>&ES=',B*3L@8G)E86L["B`@("`@("`@("`@(&-A<V4@
M5$944%]%3D]54T52.B`@(&1I86=?<')I;G1F*")N;R!S=6-H('5S97(B*3L@
M8G)E86L["B`@("`@("`@("`@(&-A<V4@5$944%]424U%3U54.B`@(&1I86=?
M<')I;G1F*")O<&5R871I;VX@=&EM960@;W5T(BD[(&)R96%K.PH@("`@("`@
M("`@("!C87-E(%1&5%!?3D5415)2.B`@("!D:6%G7W!R:6YT9B@B;F5T=V]R
M:R!E<G)O<B(I.R!B<F5A:SL*("`@("`@("`@("`@8V%S92!41E107TE.5D%,
M240Z("`@9&EA9U]P<FEN=&8H(FEN=F%L:60@<&%R86UE=&5R(BD[(&)R96%K
M.PH@("`@("`@("`@("!C87-E(%1&5%!?4%)/5$]#3TPZ("!D:6%G7W!R:6YT
M9B@B<')O=&]C;VP@=FEO;&%T:6]N(BD[(&)R96%K.PH@("`@("`@("`@("!C
M87-E(%1&5%!?5$]/3$%21T4Z("!D:6%G7W!R:6YT9B@B9FEL92!I<R!L87)G
M97(@=&AA;B!B=69F97(B*3L@8G)E86L["B`@("`@("`@("`@(&1E9F%U;'0Z
M("`@("`@("`@("`@(&1I86=?<')I;G1F*")U;F1E9FEN960B*3L*("`@("`@
M("`@?0H@("`@("`@("!D:6%G7W!R:6YT9B@B+EQN(BD["B`@("`@("`@(&EF
M("AE<G)O<B`]/2!41E107U1)345/550I"B`@("`@("`@('L*("`@("`@("`@
M("`@<VAO=U]N971?=&EM97,H*3L*("`@("`@("`@("`@+R]C;VYT:6YU93L*
M"2!]"B`@("`@("`@(&)R96%K.PH@("`@("!]"B`@("`@(&1I86=?<')I;G1F
M*")L96YG=&@@/2`E9%QN(BP@;&5N9W1H*3L*("`@?0H@("!D:6%G7W!R:6YT
M9B@B7&Y<;E1E<FUI;F%T961<;B(I.PH*("`@8WEG7W1E<W1?97AI="@I.PI]
M"@IV;VED(&-Y9U]S=&%R="AV;VED*0I["B`@("\O($-R96%T92!A(&UA:6X@
M=&AR96%D+@H@("!C>6=?=&AR96%D7V-R96%T92A04DE/4DE462P@("`@("`@
M("`@+R\@4')I;W)I='D*("`@("`@("`@("`@("`@("`@("`@8U]M86EN+"`@
M("`@("`@("`@("\O(&5N=')Y"B`@("`@("`@("`@("`@("`@("`@(#`L("`@
M("`@("`@("`@("`@("`O+R!E;G1R>2!P87)A;65T97(*("`@("`@("`@("`@
M("`@("`@("`@(E1E<W0B+"`@("`@("`@("`@("\O($YA;64*("`@("`@("`@
M("`@("`@("`@("`@<W1A8VLL("`@("`@("`@("`@("\O(%-T86-K"B`@("`@
M("`@("`@("`@("`@("`@(%-404-+7U-)6D4L("`@("`@("`O+R!3:7IE"B`@
M("`@("`@("`@("`@("`@("`@("9T:')E861?:&%N9&QE+"`@("`O+R!(86YD
M;&4*("`@("`@("`@("`@("`@("`@("`@)G1H<F5A9%]D871A("`@("`@("\O
M(%1H<F5A9"!D871A('-T<G5C='5R90H@("`I.PH*("`@8WEG7W1H<F5A9%]R
M97-U;64H=&AR96%D7VAA;F1L92D[("`O+R!3=&%R="!I=`H@("!C>6=?<V-H
3961U;&5R7W-T87)T*"D["GT*"@==
`
end

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list