[En-Nut-Discussion] Question about two network connections.
Harald Kipp
harald.kipp at egnite.de
Tue Feb 3 14:30:30 CET 2004
Hi Alexander,
This may be caused by many bugs. The system itself
seems to be stable in this sense...but who knows.
Recently a bug in netbuf.c had been detected, but
it appears under very specific circumstances only.
May be try a copy of this file from CVS.
In the first place increase the stack size of
your threads. This is easy.
Next, carefully review your code, specially those
parts, that write to allocated memory. The malloc
routines in the debug version (NUTDEBUG) offer
some additional protection and may help to locate
the problem.
If two threads are modifying multibyte values,
make sure, that the modification is atomic.
Most likely the problem is _not_ caused by too less
heap space.
Harald
At 09:56 02.02.2004 -0500, you wrote:
>Hi, All.
>I have such a problem:
>I use two network oriented threads.
>Main thread periodically sends data through Inet using POST method of http
>protocol. Having sent the next potion of data, it obtains something as
>server reply and parses it as server command.
>Another thread, which I call DirectTCP, opens another socket and accepts
>data from port 23 - telnet like this:
>NutTcpAccept(dirsock, 23).
>It is supposed to be used for immediate incoming commands from the server.
>Actually, it works but sometimes it hangs up and the box is being reloaded
>by watchdog. I tried to investigate the situation and found that the
>'tdp->td_memory' of the main thread after some time becomes not equal to
>DEADBEEF, which is interpreted as "CORRUPT" in one of the examples. I tried
>to free as much heap as possible and now I have almost 16K heap available,
>but I have not achieved stable work still.
>Maybe I have to upgrade the system? Judging from version.c I use 3.3.0.1.
>now. Please, advise.
>Thanks,
>Alexander Baranov
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
More information about the En-Nut-Discussion
mailing list