bug-commoncpp
[Top][All Lists]
Advanced

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

TCPStream problem


From: Dan . Nelson
Subject: TCPStream problem
Date: Wed, 4 Aug 2004 13:13:53 -0500


Hi,

I'm having a problem with the TCPStream class I'm hoping someone can help with...I'm working on the Win32 platform with Visual Studio 6, with 6 or 7 modules using TCPStreams to talk to each other.  Under normal conditions, things seem to work properly.  Under one recently-identified and repeatable circumstance, a heavy load is applied so that a lot of data is flowing both ways through the TCPStream and data suddenly stops flowing BOTH ways.  The data is divided into "messages" separated by calls to TCPStream::overflow() to ensure each message goes through the connection in a timely fashion.

This happens both when the modules are compiled as release services or as debug console applications.  When I break in the debugger, I find that BOTH modules in the test are blocking at the exact same position (though not always on the exact same message), at the call to TCPStream::overflow(), and they're both blocking on the ::send() call.  The parameters both sides are trying to use with send() look like valid values.

I noticed at this point that there is a special-case in TCPStream::overflow() for a buffer of size 1 (I was using first size 10 * 1024 and then 50 * 1024), so I reset things to try to exercise the special-case.  I had the same result except the deadlock seemed to happen with fewer messages making it successfully through the connection.

I originally was working with CommonCPP2 version 1.0.8 when I hit this problem.  Upgrading to version 1.1.8 yesterday and this morning yields the same result.

I would supply sample code, but couldn't figure out a way to simplify the problem into a reproduceable example.  Any ideas on whether I should try varying configuration settings would be very welcome.

Thanks,
Dan
reply via email to

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