[SERVER-28079] Secondary mongod crashes when removed from replicaset using rs.remove() Created: 23/Feb/17 Updated: 06/Dec/22 Resolved: 19/Dec/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 3.2.11, 3.4.2, 3.5.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Manoj Vivek | Assignee: | Backlog - Replication Team |
| Resolution: | Incomplete | Votes: | 1 |
| Labels: | former-quick-wins, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v3.6, v3.4, v3.2
|
||||||||||||||||
| Steps To Reproduce: | Just running rs.remove crashed the removed node. |
||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
Hi,
|
| Comments |
| Comment by Steven Vannelli [ 19/Dec/19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The known crash has been fixed and the team did not have enough details to identify a separate bug. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by He Lei [ 27/Apr/18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for your prompt response. Since rs.remove() caused the crash to have no effect on the existing nodes in the production environment, it was decided not to go further into this issue. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 24/Apr/18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I think this ticket was actually fixed as part of https://github.com/mongodb/mongo/commit/c88c4809c2440d286ed0fc29e1e8d684f015e563#diff-cbf616dcf2a6cf9c877fbdd057c8a1c4R2769 per this comment above. Someone can run the repro and see if it has been fixed. dbapower, since it appears your failure has a different cause, and thus likely a different fix, can you please file a new ticket with a script or steps we can follow to reproduce the issue? Can you please include the config before and after the rs.remove call, and the exact rs.remove call you ran? Thanks! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by He Lei [ 23/Apr/18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Judah Schvimer,We found the problem maybe is not the no-vote member,when the mongod crash the information is : and we find the repl_set_config.cpp line 620,show us : according to this ,we think is the "_id" cause this problem? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 19/Apr/18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by He Lei [ 19/Apr/18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi @Judah Schvimer,could you please show how to reproduce this issue? Our mongo instance problem is the same.I try to reproduce ,but nothing happen. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Agam Dua [ 21/Mar/18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can confirm this happens when I did an `rs.remove()` on a node which is non-voting.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 03/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Also, I have confirmed that this has not been fixed in more recent versions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 03/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The easiest fix for this is probably to check if a node's _selfIndex is -1 at the beginning of TopologyCoordinator::shouldChangeSyncSource, however I'm not sure if any other uses of _selfConfig() are also a problem. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Manoj Vivek [ 03/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
hi judah.schvimer, Thanks so much for checking this. PS: Sorry for the misleading rs.conf I posted earlier. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 02/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you vivek_jonam for providing the replica set configuration. I was able to reproduce the issue, but only using non-voting nodes, and your configuration does not include any non-voting nodes. What was the configuration of the nodes that were removed? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 02/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reproduction script attached in server-28079.diff. This applies on top of https://github.com/mongodb/mongo/commit/16cb9f02cb69427a6ebbe67bfa76d566000804e8. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Manoj Vivek [ 28/Feb/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Judah , Below is the output of rs.conf() command:
Interestingly, rs.conf() didn't print the field protocolVersion. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 27/Feb/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi vivek_jonam, Thank you for bringing this to our attention. Can you please provide information on the configuration of your replica set? Specifically how many nodes you have, the replication protocolVersion, and any arbiters or priorities? Additionally, do you have any more specific steps I can try to reproduce this issue? I have been unable to reproduce it myself. Thank you, |