【发布时间】:2023-03-05 08:25:01
【问题描述】:
我的程序在大多数情况下似乎运行良好,但偶尔会出现分段错误。
增强版本 = 1.41.0
在 RHEL 4 上运行
使用 GCC 3.4.6 编译
回溯:
#0 0x08138546 in boost::asio::detail::posix_fd_set_adapter::is_set (this=0xb74ed020, descriptor=-1)
在/home/scottl/boost_1_41_0/boost/asio/detail/posix_fd_set_adapter.hpp:57
__result = -1 'ÿ'
#1 0x0813e1b0 in boost::asio::detail::reactor_op_queue::perform_operations_for_descriptors (this=0x97f3b6c, descriptors=@0xb74ed020, result=@0xb74ecec8)
在/home/scottl/boost_1_41_0/boost/asio/detail/reactor_op_queue.hpp:204
op_iter = {_M_node = 0xb4169aa0}
i = {_M_node = 0x97f3b74}
#2 0x081382ca in boost::asio::detail::select_reactor::run (this=0x97f3b08, block=true)
在/home/scottl/boost_1_41_0/boost/asio/detail/select_reactor.hpp:388
read_fds = {fd_set_ = {fds_bits = {16, 0 }},max_descriptor_ = 65}
write_fds = {fd_set_ = {fds_bits = {0 }},max_descriptor_ = -1}
retval = 1
lock = { = {},mutex_ = @0x97f3b1c,locked_ = true}
除了_fds = {fd_set_ = {fds_bits = {0 }},max_descriptor_ = -1}
max_fd = 65
tv_buf = {tv_sec = 0, tv_usec = 710000}
tv = (timeval *) 0xb74ecf88
ec = {m_val = 0, m_cat = 0x81f2c24}
sb = { = {},blocked_ = true,old_mask_ = {__val = {0, 0, 134590223,
3075395548, 3075395548, 3075395464, 134729792, 3075395360, 135890240, 3075395368, 134593920, 3075395544, 135890240,
3075395384, 134599542, 3020998404, 135890240, 3075395400, 134614095, 3075395544, 4, 3075395416, 134548135, 3021172996,
4294967295, 3075395432, 134692921, 3075395504, 0, 3075395448, 134548107, 3021172992}}}
#3 0x0812eb45 in boost::asio::detail::task_io_service >::do_one (this=0x97f3a70,
锁定=@0xb74ed230,this_idle_thread=0xb74ed240,ec=@0xb74ed2c0)
在/home/scottl/boost_1_41_0/boost/asio/detail/task_io_service.hpp:260
more_handlers = 假
c = {lock_ = @0xb74ed230,task_io_service_ = @0x97f3a70}
h = (boost::asio::detail::handler_queue::handler *) 0x97f3aa0
轮询 = 假
task_has_run = true
#4 0x0812765f in boost::asio::detail::task_io_service >::run (this=0x97f3a70,
ec=@0xb74ed2c0) 在/home/scottl/boost_1_41_0/boost/asio/detail/task_io_service.hpp:103
ctx = { = {},所有者_ = 0x97f3a70,下一个_ = 0x0}
this_idle_thread = {wakeup_event = { = {},cond_ = {__c_lock = {
__status = 0,__spinlock = 22446},__c_waiting = 0x2bd7,
__padding = "\000\000\000\000×+\000\000\000\000\000\000×+\000\000\000\000\000\000\204:\177\t\000\000 \000", __align = 0},
signalled_ = true},下一个 = 0x0}
lock = { = {},mutex_ = @0x97f3a84,locked_ = false}
n = 11420
#5 0x08125e99 in boost::asio::io_service::run (this=0x97ebbcc) at /home/scottl/boost_1_41_0/boost/asio/impl/io_service.ipp:58
ec = {m_val = 0, m_cat = 0x81f2c24}
s = 8
#6 0x08154424 in boost::_mfi::mf0::operator() (this=0x9800870, p=0x97ebbcc)
在/home/scottl/boost_1_41_0/boost/bind/mem_fn_template.hpp:49
没有当地人。
#7 0x08154331 in boost::_bi::list1 >::operator(), boost::_bi::list0> (this=0x9800878, f=@0x9800870, a=@0xb74ed337)
在/home/scottl/boost_1_41_0/boost/bind/bind.hpp:236
没有当地人。
#8 0x081541e5 in boost::_bi::bind_t, boost::_bi::list1 > >::operator() (this=0x9800870) at /home/scottl/boost_1_41_0/boost/bind/bind_template.hpp:20
一={}
#9 0x08154075 in boost::detail::thread_data, boost::_bi::list1 > > >::run (this=0x98007a0)
在/home/scottl/boost_1_41_0/boost/thread/detail/thread.hpp:56
没有当地人。
#10 0x0816fefd in thread_proxy () at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/locale_facets.tcc :2443
__ioinit = {静态_S_refcount =,静态_S_synced_with_stdio = }
---键入继续,或 q 退出---
common::RuntimeException = {} 的类型信息
common::RuntimeException = "N6common16RuntimeExceptionE" 的 typeinfo 名称
#11 0x00af23cc in start_thread () from /lib/tls/libpthread.so.0
没有可用的符号表信息。
#12 0x00a5c96e in __init_misc () from /lib/tls/libc.so.6
没有可用的符号表信息。
【问题讨论】:
标签: c++ boost boost-asio