Project

General

Profile

Actions

Bug #2534

closed

util::dns::asyncResolve timeouts are not "real"

Added by Alex Afanasyev almost 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Utils
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
0.50 h

Description

This is not an issue or feature, rather a report for util::dns::asyncResolve (= boost::asio::basic_resolver) "feature". Specifically, the timeouts that one can specify inside asyncResolve call are effective, but the asynchronous operation may not be finished after the timeout is fired and if io_service is still running, may fire at some point later (even with success, which may cause segfaults in some cases...).

The documentation for basic_resolver says that it has cancel method that will cancel all pending async operations and we use this method inside the timeout event. However, this cancel does not work as we intended it to work (I actually, have no idea whether it does anything at all). In 2012 there was a related ticket with boost.asio 6138, which authors of asio considered not a bug but feature.

The impact of this "problem" should not be great, it is just applications needs to be aware that in order to abort io_service::run() when asynchronous resolution times out, it is necessary to explicitly call io_service::stop().

Actions #1

Updated by Junxiao Shi almost 10 years ago

  • Tracker changed from Feature to Bug

This shall be a Bug because it might violate the assumption of certain applications.

To solve this Bug, add a \warning to asyncResolve function.

Actions #2

Updated by Junxiao Shi about 9 years ago

  • Description updated (diff)
  • Category set to Utils
Actions #3

Updated by Junxiao Shi about 9 years ago

20150901 conference call approves note-1 solution.

Actions #4

Updated by Junxiao Shi about 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi
  • Target version set to v0.4
  • Estimated time set to 0.50 h
Actions #5

Updated by Junxiao Shi about 9 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100
Actions #6

Updated by Junxiao Shi about 9 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF