Skip to content

rpclib crashes when client closes connection #161

@sytelus

Description

@sytelus

I updated rpclib to commit 9885c01 and have started seeing this issue in AirSim. Whenever client closes connection (while rpc server is still executing the last request), the rpc server is crashing. I'm running rpc server in in async mode with 4 threads.

Exception message

Exception thrown at 0x00007FFB05EC445D (ntdll.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

Call Stack

 	ntdll.dll!00007ffb05ec445d()	Unknown
 	UE4Editor-AirSim-Win64-DebugGame.dll!clmdep_asio::detail::strand_service::do_post(class clmdep_asio::detail::strand_service::strand_impl * &,class clmdep_asio::detail::win_iocp_operation *,bool)	C++
 	UE4Editor-AirSim-Win64-DebugGame.dll!clmdep_asio::detail::strand_service::post<class <lambda_bf124d0559dff89781f6285bbd7a9e99> >(class clmdep_asio::detail::strand_service::strand_impl * &,class <lambda_bf124d0559dff89781f6285bbd7a9e99> &)	C++
 	UE4Editor-AirSim-Win64-DebugGame.dll!clmdep_asio::io_service::strand::post<class <lambda_bf124d0559dff89781f6285bbd7a9e99> >(class <lambda_bf124d0559dff89781f6285bbd7a9e99> &&)	C++
 	UE4Editor-AirSim-Win64-DebugGame.dll!clmdep_asio::detail::win_iocp_socket_recv_op<class clmdep_asio::mutable_buffers_1,class clmdep_asio::detail::wrapped_handler<class clmdep_asio::io_service::strand,class <lambda_4abbd431c2e1df4c2e57881306415a2e>,struct clmdep_asio::detail::is_continuation_if_running> >::ptr::~ptr(void)	C++
 	UE4Editor-AirSim-Win64-DebugGame.dll!clmdep_asio::detail::completion_handler<class <lambda_3603deb27010a7192a6e634b4febe106> >::do_complete(class clmdep_asio::detail::win_iocp_io_service *,class clmdep_asio::detail::win_iocp_operation *,class std::error_code const &,unsigned __int64)	C++
 	UE4Editor-AirSim-Win64-DebugGame.dll!clmdep_asio::detail::win_iocp_io_service::do_one(bool,class std::error_code &)	C++
 	UE4Editor-AirSim-Win64-DebugGame.dll!clmdep_asio::detail::win_iocp_io_service::run(class std::error_code &)	C++
 	UE4Editor-AirSim-Win64-DebugGame.dll!rpc::server::operator=(class rpc::server &&)	C++
 	UE4Editor-AirSim-Win64-DebugGame.dll!std::_LaunchPad<class std::unique_ptr<class std::tuple<class std::function<void > >,struct std::default_delete<class std::tuple<class std::function<void > > > > >::_Run(class std::_LaunchPad<class std::unique_ptr<class std::tuple<class std::function<void > >,struct std::default_delete<class std::tuple<class std::function<void > > > > > *)	C++
>	UE4Editor-AirSim-Win64-DebugGame.dll!std::_Pad::_Call_func(void * _Data) Line 210	C++
 	ucrtbase.dll!00007ffb02640369()	Unknown
 	kernel32.dll!00007ffb04a82774()	Unknown
 	ntdll.dll!00007ffb05f20d51()	Unknown

Related issue in AirSim: microsoft/AirSim#567

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions