Opened 9 years ago

Last modified 9 years ago

#8937 new Bugs

boost::asio::ip::tcp 5000ms stall

Reported by: Florian George <fgeorge@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

Under certain circumstances, the boost::asio::ip::tcp module exhibits a, with a bit of patience, reproducible behavior of every now and then stalling for quite exactly 5000ms.

On May 02, 2011, a discussion about this was started by Torben Wiggerich on the Boost Mailing List: http://boost.2283326.n4.nabble.com/asio-Randomly-having-problems-reading-from-the-socket-td3490016.html

On May 09, 2011, a traffic dump was requested by Cliff Green.

I ran into the problem some time later and posted a traffic dump on Apr 02, 2012. No one has replied since.

Today, I tested whether the issue still persists with

Boost 1.49.0 Boost 1.53.0 Boost 1.54.0

and it still occurs with all of them.

For the CPU I used an Intel Core2 Duo P7350 @ 2.0 GHz, because this bug is only reproducible in a reasonable time frame (under 1 hour) on a sufficiently slow computer. Back then I used an Athlon X2 4400+. An i7 will be too fast to show this behavior reliably, or in a reasonable amount of time, or maybe even ever.

The operating system used was Windows 7 x64 SP1.

The compiler used was Visual Studio 2008 SP1 x86 + all updates from Windows Update.

I attached a Repro Case based on the code posted by Torben in the Thread. With this, on the Core2Duo I used, the behavior was repeatedly observable in under an hour of Server + Client running.

Attachments (1)

Boost5000msReproCase.zip (57.7 KB ) - added by Florian George <fgeorge@…> 9 years ago.

Download all attachments as: .zip

Change History (2)

by Florian George <fgeorge@…>, 9 years ago

Attachment: Boost5000msReproCase.zip added

comment:1 by anonymous, 9 years ago

I have also seen the same problem in my own testing where there is a pause of exactly 5 seconds where no more TCP traffic is received by a tcp socket. I am not sure if the delay is on the sending or receiving side. The problem seems more likely to occur when sending larger amounts of data (~400k) in a single async_write call.

In my testing I was using Boost 1.48.0. The problem only occurs for me in Windows 7 (compiled with MSVC 2010) and not in Ubuntu 12.04 (compiled with gcc 4.6.3).

Note: See TracTickets for help on using tickets.