Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
async_chat + pion5 problem with promises
trigen@FIREFLY:/projects/cheerp-utils/tests/server[pion5]> gdb ./async_chat
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./async_chat...(no debugging symbols found)...done.
(gdb) r
Starting program: /projects/cheerp-utils/tests/server/async_chat
warning: the debug information found in "/lib64/ld-2.21.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
1456077677 INFO pion.http.plugin_server : Added request handler for HTTP resource:
1456077677 INFO pion.http.plugin_server : Loaded web service plug-in for resource (): FileService
1456077677 INFO pion.http.plugin_server : Set web service option for resource (/): directory=.
1456077677 INFO pion.http.plugin_server : Added request handler for HTTP resource: /cheerp_call
1456077677 INFO pion.http.plugin_server : Starting server on port 1987
1456077677 INFO pion.scheduler : Starting thread scheduler
[New Thread 0x7ffff2aa4700 (LWP 27249)]
[New Thread 0x7ffff22a3700 (LWP 27250)]
[New Thread 0x7ffff1aa2700 (LWP 27251)]
[New Thread 0x7ffff12a1700 (LWP 27252)]
[New Thread 0x7ffff0aa0700 (LWP 27253)]
[New Thread 0x7ffff029f700 (LWP 27254)]
[New Thread 0x7fffefa9e700 (LWP 27255)]
[New Thread 0x7fffef29d700 (LWP 27256)]
Found _Z20getChatMessageRemotev
1456077680 WARN pion.http.plugin_server : Closing orphaned connection on port 1987
Found _Z17sendMessageRemoteRKSs
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff0aa0700 (LWP 27253)]
0x00007fffd8000078 in ?? ()
(gdb) bt
#0 0x00007fffd8000078 in ?? ()
#1 0x00000000004162c9 in std::_Function_handler<void (std::string const&), cheerp::voidUtils<std::string>::addCallback(cheerp::Promise<std::string>*)::{lambda(std::string const&)#1}>::_M_invoke(std::_Any_data const&, std::string const&) ()
#2 0x0000000000415c62 in cheerp::PromiseMid<std::string>::done(std::string const&) ()
#3 0x0000000000415fab in void cheerp::argumentDeserializer<void (*)(std::string const&), &(sendMessageRemote(std::string const&)), void, std::string const&>::execute<>(char const*) ()
#4 0x0000000000415d04 in cheerp::PromiseBase* serverSkel<void (*)(std::string const&), &(sendMessageRemote(std::string const&)), void, std::string const&>(cheerp::SerializationInterface*, char const*) ()
#5 0x000000000041d830 in requestHandler(boost::shared_ptr<pion::http::request> const&, boost::shared_ptr<pion::tcp::connection> const&) ()
#6 0x00007ffff7988f54 in boost::function2<void, boost::shared_ptr<pion::http::request> const&, boost::shared_ptr<pion::tcp::connection> const&>::operator() (this=<optimized out>, a0=..., a1=...)
at /usr/local/src/boost_1_60_0/target//include/boost/function/function_template.hpp:770
#7 pion::http::server::handle_request (this=0x66b5f0, http_request_ptr=..., tcp_conn=..., ec=...) at http_server.cpp:103
#8 0x00007ffff798f90b in boost::function3<void, boost::shared_ptr<pion::http::request>, boost::shared_ptr<pion::tcp::connection>, boost::system::error_code const&>::operator() (this=<optimized out>, a0=..., a1=..., a2=...)
at /usr/local/src/boost_1_60_0/target//include/boost/function/function_template.hpp:770
#9 0x00007ffff798f751 in pion::http::request_reader::finished_reading (this=<optimized out>, ec=...) at ../include/pion/http/request_reader.hpp:96
#10 0x00007ffff798806c in pion::http::reader::consume_bytes (this=0x7fffdc015db0) at http_reader.cpp:110
#11 0x00007ffff7988391 in pion::http::reader::consume_bytes (this=0x7fffdc015db0, read_error=..., bytes_read=422) at http_reader.cpp:62
#12 0x00007ffff79900a4 in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, pion::http::reader, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<pion::http::request_reader> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, pion::http::reader, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<pion::http::request_reader> >, boost::arg<1> (*)(), boost::arg<2> (*)()> > > (function=..., context=...) at /usr/local/src/boost_1_60_0/target//include/boost/asio/detail/handler_invoke_helpers.hpp:37
#13 boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::_bi::bind_t<void, boost::_mfi::mf2<void, pion::http::reader, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<pion::http::request_reader> >, boost::arg<1> (*)(), boost::arg<2> (*)()> > >::do_complete (owner=<optimized out>, base=<optimized out>) at /usr/local/src/boost_1_60_0/target//include/boost/asio/detail/reactive_socket_recv_op.hpp:110
#14 0x00007ffff7952e83 in boost::asio::detail::task_io_service_operation::complete (this=<optimized out>, owner=..., ec=..., bytes_transferred=<optimized out>) at /usr/local/src/boost_1_60_0/target//include/boost/asio/detail/task_io_service_operation.hpp:38
#15 boost::asio::detail::task_io_service::do_run_one (this=0x66bdf0, lock=..., this_thread=..., ec=...) at /usr/local/src/boost_1_60_0/target//include/boost/asio/detail/impl/task_io_service.ipp:372
#16 0x00007ffff79528e0 in boost::asio::detail::task_io_service::run (this=0x66bdf0, ec=...) at /usr/local/src/boost_1_60_0/target//include/boost/asio/detail/impl/task_io_service.ipp:149
#17 0x00007ffff7948d3e in boost::asio::io_service::run (this=<optimized out>) at /usr/local/src/boost_1_60_0/target//include/boost/asio/impl/io_service.ipp:59
#18 pion::scheduler::process_service_work (this=0x66b600, service=...) at scheduler.cpp:111
#19 0x00007ffff76baa05 in thread_proxy () from /usr/local/src/boost_1_60_0/target/lib/libboost_thread.so.1.60.0
#20 0x00007ffff5dd26aa in start_thread (arg=0x7ffff0aa0700) at pthread_create.c:333
#21 0x00007ffff5b07eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment