Skip to content
Commit 7977d65c authored by michael.berlin.xtreemfs@gmail.com's avatar michael.berlin.xtreemfs@gmail.com
Browse files

mno-async_writes/client: Fixed crashes due to xtreemfs::rpc::Client::handleTimeout().

The timeout handling did remove client requests while the respective boost::asio asynchronous operation (e.g., async_write) was still pending. Consequently, boost::asio tried to access memory which was already returned to the application and freed by it. So far this error could be only observed when asynchronous writes were enabled and the OSD did return an error.

This commit fixes the problem by resetting (closing) a connection when at least one of its requests timed out. Since boost::asio cannot provide a portable mechanism to abort pending asynchronous operations, we did resort to closing the whole connection.

Further changes:
- Minor fixes to ensure that boost::asio connection callbacks do not access a deleted ClientConnection instance which was removed due to a linger timeout.
- Documented many members of Client, ClientConnection and ClientRequest.
- Reduced visibility of methods where possible.
- Added "const" where suitable.

git-svn-id: https://xtreemfs.googlecode.com/svn/branches/mno-async_writes@2984 f8528748-c2c0-11dd-ba5c-d3b7c2b3b534
parent 07d06ab7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment