
Hi everyone, I recently ran into a problem with Boost.Asio while using a slightly modified version of the HTTP 2 example server. The debugger trace (attached) shows where a segfault had occurred in the code. The short of it is that when ~wrapped_handler is called, the call to boost::detail::atomic_exchange_and_add fails when boost::detail::sp_counted_base::release is invoked. It occurs when a handler_wrapper is deleted/destructed (~handler_wrapper is called) in the strand_service. I'm just wondering what could be causing this -- it's worth noting that under not-so-heavy load, the problem does not manifest itself; but soon enough when the load on the server goes up (more incoming connections) the server crashes consistently. Any pointers where I should be looking? I'm using Boost.Trunk revision number 43296. -- Dean Michael Berris Software Engineer, Friendster, Inc.

Dean Michael C. Berris wrote:
Hi everyone,
I recently ran into a problem with Boost.Asio while using a slightly modified version of the HTTP 2 example server. The debugger trace (attached) shows where a segfault had occurred in the code.
The short of it is that when ~wrapped_handler is called, the call to boost::detail::atomic_exchange_and_add fails when boost::detail::sp_counted_base::release is invoked. It occurs when a handler_wrapper is deleted/destructed (~handler_wrapper is called) in the strand_service.
I'm just wondering what could be causing this -- it's worth noting that under not-so-heavy load, the problem does not manifest itself; but soon enough when the load on the server goes up (more incoming connections) the server crashes consistently.
Any pointers where I should be looking? I'm using Boost.Trunk revision number 43296.
Revision 43296 is quite old. There have been a few fixes since that might be related to your problem, but I suspect this might be the one: http://svn.boost.org/trac/boost/changeset/43879/trunk/boost/asio It would be better if you could try to reproduce the problem with the latest revision, however. Cheers, Chris

On Tue, Jul 1, 2008 at 8:24 PM, Christopher Kohlhoff <chris@kohlhoff.com> wrote:
Dean Michael C. Berris wrote:
Any pointers where I should be looking? I'm using Boost.Trunk revision number 43296.
Revision 43296 is quite old. There have been a few fixes since that might be related to your problem, but I suspect this might be the one:
http://svn.boost.org/trac/boost/changeset/43879/trunk/boost/asio
It would be better if you could try to reproduce the problem with the latest revision, however.
Thanks Chris, apparently the version in Boost 1.35 doesn't have the same problems. :) -- Dean Michael C. Berris Software Engineer, Friendster, Inc.
participants (3)
-
Christopher Kohlhoff
-
Dean Michael Berris
-
Dean Michael C. Berris