[CDRIVER-2576] segmentation fault occurred at _mongoc_cluster_run_ismaster() Created: 29/Mar/18 Updated: 28/Oct/23 Resolved: 30/Mar/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.9.0 |
| Fix Version/s: | 1.9.4 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Yuichi Ogino | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Bug | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS : Red Hat Enterprise Linux Server release 7.1 (Maipo) |
||
| Issue Links: |
|
||||||||||||
| Description |
|
file "mongoc-cluster.c"
This code stores some value in the variable "sd", and uses "sd->type" in the if statement. At v1.9.3, some decisions are added to the function "_mongoc_stream_run_ismaster", back trace log:
|
| Comments |
| Comment by Yuichi Ogino [ 12/Apr/18 ] | ||
|
Thank you for fixing the problem.
| ||
| Comment by Githook User [ 10/Apr/18 ] | ||
|
Author: {'name': 'Kevin Albertson', 'username': 'kevinAlbs', 'email': 'kevin.albertson@10gen.com'}Message: | ||
| Comment by Githook User [ 10/Apr/18 ] | ||
|
Author: {'email': 'kevin.albertson@10gen.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}Message: | ||
| Comment by Kevin Albertson [ 30/Mar/18 ] | ||
|
Hi Yuichi, this has been fixed on master and will be released as part of 1.9.4 sometime next week. | ||
| Comment by Githook User [ 30/Mar/18 ] | ||
|
Author: {'email': 'kevin.albertson@10gen.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}Message: | ||
| Comment by Yuichi Ogino [ 30/Mar/18 ] | ||
|
Thank you for the reply.
Yes, I'm using it. | ||
| Comment by Githook User [ 29/Mar/18 ] | ||
|
Author: {'email': 'kevin.albertson@10gen.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}Message: | ||
| Comment by A. Jesse Jiryu Davis [ 29/Mar/18 ] | ||
|
Thanks for the superb bug report and stack trace. You're using a mongoc_client_pool_t, is that correct? I think the bug only happens in mongoc_cluster_fetch_stream_pooled. The bug was introduced in version 1.9.0 while implementing mongoc_client_session_t in Before this commit, if the server description had been removed from the topology description, then the next time the client opened a new connection to the server it didn't care that the server wasn't in the topology description. After this commit, if the server description had been removed, then the client short-circuited from _mongoc_stream_run_ismaster, and returned NULL. I should have updated that function's caller, _mongoc_cluster_run_ismaster, to expect the NULL return but I didn't. |