discuss-gnuradio
[Top][All Lists]
Advanced

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

Socket PDU (TCP Server) crashes


From: Moses Browne Mwakyanjala
Subject: Socket PDU (TCP Server) crashes
Date: Tue, 24 Mar 2020 10:47:36 +0100

Hello everyone,
I'm running a GNU Radio program in standalone C++ application. I experience something strange with the Socket PDU block. 
In a header file, the Socket PDU object is declared as follows:
gr::blocks::socket_pdu::sptr m_TCPServer;
and in the implementation file, the object is initialized like this:
m_TCPServer = gr::blocks::socket_pdu::make("TCP_SERVER","127.0.0.1","2001");
Tracing the debugger output, the SIGSEGV signal is triggered by the reactive_socket_service_base::destroy(...) function. In particular, the debugger points to the 
reactor_.deregistor_descriptor(..) function. 

All help is warmly welcomed. 

DISCLAIMER: The program is run on a machine with an old version of GNU Radio (3.7.11.1), which can't be updated (for security reasons). 

Regards,
Moses. 

void reactive_socket_service_base::destroy( reactive_socket_service_base::base_implementation_type& impl)
{
  if (impl.socket_ != invalid_socket)
  {
    BOOST_ASIO_HANDLER_OPERATION(("socket", &impl, "close"));
    reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,=====> Debugger points to this line
        (impl.state_ & socket_ops::possible_dup) == 0);
    boost::system::error_code ignored_ec;
    socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
  }
}

DEBUGGER OUTPUT
---------------
1   boost::asio::detail::reactive_socket_service_base::destroy                                                                                                      reactive_socket_service_base.ipp 87   0x7ffff64c9baf 
2   boost::asio::socket_acceptor_service<boost::asio::ip::tcp>::destroy                                                                                             socket_acceptor_service.hpp      137  0x7ffff64c9e8a
3   boost::asio::basic_io_object<boost::asio::socket_acceptor_service<boost::asio::ip::tcp>>::~basic_io_object                                                      basic_io_object.hpp              124  0x7ffff64c9e8a
4   boost::asio::basic_socket_acceptor<boost::asio::ip::tcp, boost::asio::socket_acceptor_service<boost::asio::ip::tcp>>::~basic_socket_acceptor                    basic_socket_acceptor.hpp        55   0x7ffff64c9e8a
5   boost::checked_delete<boost::asio::basic_socket_acceptor<boost::asio::ip::tcp, boost::asio::socket_acceptor_service<boost::asio::ip::tcp>>>                     checked_delete.hpp               34   0x7ffff64c9e8a
6   boost::detail::sp_counted_impl_p<boost::asio::basic_socket_acceptor<boost::asio::ip::tcp, boost::asio::socket_acceptor_service<boost::asio::ip::tcp>>>::dispose sp_counted_impl.hpp              78   0x7ffff64c9e8a
7   boost::detail::sp_counted_base::release                                                                                                                         sp_counted_base_gcc_x86.hpp      146  0x7ffff64c203a
8   boost::detail::sp_counted_base::release                                                                                                                         sp_counted_base_gcc_x86.hpp      144  0x7ffff64c5cfd
9   boost::detail::shared_count::~shared_count                                                                                                                      shared_count.hpp                 443  0x7ffff64c5cfd
10  boost::shared_ptr<boost::asio::basic_socket_acceptor<boost::asio::ip::tcp, boost::asio::socket_acceptor_service<boost::asio::ip::tcp>>>::~shared_ptr            shared_ptr.hpp                   323  0x7ffff64c5cfd
11  gr::blocks::socket_pdu_impl::socket_pdu_impl                                                                                                                    socket_pdu_impl.cc               45   0x7ffff64c5cfd
12  gr::blocks::socket_pdu::make                                                                                                                                    socket_pdu_impl.cc               38   0x7ffff64c6132
13  StandardTTC::createFlowgraph                                                                                                                                    standardttc.cpp                  1006 0x427807      
14  StandardTTC::startDevice                                                                                                                                        standardttc.cpp                  405  0x421510      
15  StandardTTC::qt_static_metacall                                                                                                                                 moc_standardttc.cpp              63   0x49df41      
16  QMetaObject::activate(QObject *, QMetaObject const *, int, void * *)                                                                                                                                  0x7ffff3fc2f80
17  QAbstractButton::toggled(bool)                                                                                                                                                                        0x7ffff4b803e2
18  QAbstractButton::setChecked(bool)                                                                                                                                                                     0x7ffff48b712d
19  ??                                                                                                                                                                                                    0x7ffff48b6cd3
20  QAbstractButton::mouseReleaseEvent(QMouseEvent *)                                                                                                                                                     0x7ffff48b6e24
... <More>                                                                                                                                                                                                              


reply via email to

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