Subject: [Boost-bugs] [Boost C++ Libraries] #10956: null point exception using asio based on linux
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-23 06:58:49
#10956: null point exception using asio based on linux
-------------------------------------+------------------------------
Reporter: xuzhiteng <419855192@â¦> | Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.56.0
Severity: Problem | Keywords:
-------------------------------------+------------------------------
I have writen a linux server application based on centos boost asio.I have
created thread pool accelerating asyn asio,but it is cored down like
following.
#0 start_op (this=0x1196e18, impl=..., op_type=1, op=0x7fd2b01a8c30,
is_continuation=<value optimized out>, is_non_blocking=true, noop=false)
at
/usr/share/server_depends/cmake/depends/net/../../../depends/net/../boost_1_56_0/boost/asio/detail/impl/epoll_reactor.ipp:219
#1 boost::asio::detail::reactive_socket_service_base::start_op
(this=0x1196e18, impl=..., op_type=1, op=0x7fd2b01a8c30,
is_continuation=<value optimized out>, is_non_blocking=true, noop=false)
at
/usr/share/server_depends/cmake/depends/net/../../../depends/net/../boost_1_56_0/boost/asio/detail/impl/reactive_socket_service_base.ipp:214
#2 0x00007fd2b94dc667 in
async_send<boost::asio::detail::consuming_buffers<boost::asio::const_buffer,
asio_net::shared_const_buffer>,
boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
boost::asio::stream_socket_service<boost::asio::ip::tcp> >,
asio_net::shared_const_buffer, boost::asio::detail::transfer_all_t,
boost::_bi::bind_t<void, boost::_mfi::mf2<void, asio_net::AsioSocket,
boost::system::error_code const&, unsigned long>,
boost::_bi::list3<boost::_bi::value<asio_net::AsioSocket*>, boost::arg<1>,
boost::arg<2> > > > > (this=<value optimized out>, ec=<value optimized
out>, bytes_transferred=<value optimized out>, start=<value optimized
out>)
at
/usr/share/server_depends/cmake/depends/net/../../../depends/net/../boost_1_56_0/boost/asio/detail/reactive_socket_service_base.hpp:216
#3
async_send<boost::asio::detail::consuming_buffers<boost::asio::const_buffer,
asio_net::shared_const_buffer>,
boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
boost::asio::stream_socket_service<boost::asio::ip::tcp> >,
asio_net::shared_const_buffer, boost::asio::detail::transfer_all_t,
boost::_bi::bind_t<void, boost::_mfi::mf2<void, asio_net::AsioSocket,
boost::system::error_code const&, unsigned long>,
boost::_bi::list3<boost::_bi::value<asio_net::AsioSocket*>, boost::arg<1>,
boost::arg<2> > > > > (this=<value optimized out>, ec=<value optimized
out>, bytes_transferred=<value optimized out>, start=<value optimized
out>)
at
/usr/share/server_depends/cmake/depends/net/../../../depends/net/../boost_1_56_0/boost/asio/stream_socket_service.hpp:330
#4
async_write_some<boost::asio::detail::consuming_buffers<boost::asio::const_buffer,
asio_net::shared_const_buffer>,
boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
boost::asio::stream_socket_service<boost::asio::ip::tcp> >,
asio_net::shared_const_buffer, boost::asio::detail::transfer_all_t,
boost::_bi::bind_t<void, boost::_mfi::mf2<void, asio_net::AsioSocket,
boost::system::error_code const&, unsigned long>,
boost::_bi::list3<boost::_bi::value<asio_net::AsioSocket*>, boost::arg<1>,
boost::arg<2> > > > > (this=<value optimized out>, ec=<value optimized
out>, bytes_transferred=<value optimized out>, start=<value optimized
out>)
at
/usr/share/server_depends/cmake/depends/net/../../../depends/net/../boost_1_56_0/boost/asio/basic_stream_socket.hpp:732
I guess that the socket writing thread starts a reactor io when the other
thread closes it concurrency.Is that a bug?Does the socket closing
function should add some lock to avoid it.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10956> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC