Bug #78858 SERVER ROUTING: ROUTER CRASH WHEN NO SERVERS RUNNING
Submitted: 16 Oct 2015 10:13 Modified: 20 Oct 2015 20:56
Reporter: Jorge Jordao Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Router Severity:S2 (Serious)
Version:2.0.2 OS:Any
Assigned to: CPU Architecture:Any

[16 Oct 2015 10:13] Jorge Jordao
Description:
Note: This was initially thought to be a Bug#21962350 scenario, however an ongoing patch appears to fix the original Bug#21962350 issue but not this

When starting the router without starting the destination servers and performing several connection requests, the router crashes

2015-10-16 11:11:25 INFO    [7efcd9c55700] routing:modeReadOnly started: listening on 0.0.0.0:7001; read-only
2015-10-16 11:11:27 INFO    [7efcd8c53700] Quarantine destination server jorge-latitude-e6430:30002
2015-10-16 11:11:27 INFO    [7efcd8c53700] Quarantine destination server jorge-latitude-e6430:30004
2015-10-16 11:11:27 INFO    [7efcd8c53700] Quarantine destination server jorge-latitude-e6430:30006
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check

How to repeat:
[routing:modeReadOnly]
bind_address = 0.0.0.0:7001
destinations = jorge-latitude-e6430:30002,jorge-latitude-e6430:30004,jorge-latitude-e6430:30006
mode = read-only
[16 Oct 2015 15:55] Jorge Jordao
Posted by developer:
 
After the latest BUG21962350 push, the assertion failure is gone. But now it hangs in the connection request.

2015-10-16 16:48:54 INFO    [7f43c8934700] routing:modeReadOnly started: listening on 0.0.0.0:7001; read-only
2015-10-16 16:48:56 DEBUG   [7f43c37fe700] Trying server jorge-latitude-e6430:30002 (index 0)
2015-10-16 16:48:56 DEBUG   [7f43c37fe700] MySQL Server jorge-latitude-e6430:30002: Connection refused (111)
2015-10-16 16:48:56 DEBUG   [7f43c37fe700] Quarantine destination server jorge-latitude-e6430:30002 (index 0)
2015-10-16 16:48:56 DEBUG   [7f43c37fe700] Trying server jorge-latitude-e6430:30004 (index 1)
2015-10-16 16:48:56 DEBUG   [7f43c37fe700] MySQL Server jorge-latitude-e6430:30004: Connection refused (111)
2015-10-16 16:48:56 DEBUG   [7f43c37fe700] Quarantine destination server jorge-latitude-e6430:30004 (index 1)
2015-10-16 16:48:56 DEBUG   [7f43c37fe700] Trying server jorge-latitude-e6430:30006 (index 2)
2015-10-16 16:48:56 DEBUG   [7f43c37fe700] MySQL Server jorge-latitude-e6430:30006: Connection refused (111)
[20 Oct 2015 20:56] Philip Olson
Fixed as of the upcoming MySQL Router 2.0.2 release, and here's the changelog entry:

Starting connection routing without an available destination server would
quarantine the destination server and Router would incorrectly exit on the
next connection.

Thank you for the bug report.