BasicTransport uses std::map::remove incorrectly?

Description

I have been digging in the infinite loop in std::_Rb_tree_increment.

Looks like the Rb_tree_node has wrong value, and found

  • BasicTransport::Session::abort()

  • BasicTransport::Session::cancelRequest(RpcNotifier* notifier)
    removes an iterator and then execute ++ . I think std::map::remove invalidates iterator for the iterator being removed. I think that is why the program was stuck at infinite loop in std::_Rb_tree_iterator<std:air<unsigned long const, RAMCloud::BasicTransport::ClientRpc*> >::operator++

I think the iterator should be advanced first before removal (as you wrote in BasicTransport::Timer::handleTimerEvent()).

It is possible that this caused maybe?

Environment

None

Status

Assignee

John Ousterhout

Reporter

Seo Jin Park

Labels

None

Priority

Medium
Configure