[CDRIVER-582] Indirect loss' in SDAM Created: 17/Mar/15  Updated: 07/Oct/15  Resolved: 23/Mar/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.2.0
Fix Version/s: 1.2-beta0

Type: Bug Priority: Major - P3
Reporter: Hannes Magnusson Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to PHPC-182 Memory leaks in BulkWrite tests Closed

 Description   

==8287== 768 bytes in 3 blocks are indirectly lost in loss record 69 of 108
==8287==    at 0x4C2ABA0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8287==    by 0x80F94F: _emalloc (zend_alloc.c:2427)
==8287==    by 0x7569947: php_phongo_malloc (php_phongo.c:1526)
==8287==    by 0x75248D1: bson_malloc (bson-memory.c:67)
==8287==    by 0x751898F: bson_copy_to (bson.c:2052)
==8287==    by 0x7550723: mongoc_server_description_handle_ismaster (mongoc-server-description.c:319)
==8287==    by 0x75510C6: mongoc_server_description_new_copy (mongoc-server-description.c:444)
==8287==    by 0x7556A02: mongoc_topology_server_by_id (mongoc-topology.c:379)
==8287==    by 0x7536169: mongoc_cluster_node_max_wire_version (mongoc-cluster.c:1934)
==8287==    by 0x755E9D1: _mongoc_write_command_execute (mongoc-write-command.c:816)
==8287==    by 0x752D4BF: mongoc_bulk_operation_execute (mongoc-bulk-operation.c:364)
==8287==    by 0x7565E60: phongo_execute_write (php_phongo.c:508)
==8287== 
==8287== 1,408 (1,152 direct, 256 indirect) bytes in 1 blocks are definitely lost in loss record 86 of 108
==8287==    at 0x4C2ABA0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8287==    by 0x80F94F: _emalloc (zend_alloc.c:2427)
==8287==    by 0x80FB9D: _safe_emalloc (zend_alloc.c:2583)
==8287==    by 0x80FCF0: _ecalloc (zend_alloc.c:2610)
==8287==    by 0x7569981: php_phongo_calloc (php_phongo.c:1531)
==8287==    by 0x7524920: bson_malloc0 (bson-memory.c:103)
==8287==    by 0x7550F88: mongoc_server_description_new_copy (mongoc-server-description.c:425)
==8287==    by 0x7556A02: mongoc_topology_server_by_id (mongoc-topology.c:379)
==8287==    by 0x75361F5: mongoc_cluster_node_min_wire_version (mongoc-cluster.c:1967)
==8287==    by 0x755DCB6: _mongoc_write_command_insert (mongoc-write-command.c:600)
==8287==    by 0x755EA81: _mongoc_write_command_execute (mongoc-write-command.c:825)
==8287==    by 0x752D4BF: mongoc_bulk_operation_execute (mongoc-bulk-operation.c:364)



 Comments   
Comment by Githook User [ 07/Oct/15 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey (hanumantmk)', u'email': u'jcarey@argv.me'}

Message: CDRIVER-582 Fix mongoc_server_description_leaks

Don't bother with topology_server_by_id in cluster for single threaded
mode. We can safely look directly into the description and skip the
copy / leak.

Close #206
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/94aa18d21ea03472609e0a0b22cd0f807e60b954

Comment by Githook User [ 19/Mar/15 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey (hanumantmk)', u'email': u'jcarey@argv.me'}

Message: CDRIVER-582 Fix mongoc_server_description_leaks

Don't bother with topology_server_by_id in cluster for single threaded
mode. We can safely look directly into the description and skip the
copy / leak.

Close #206
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/94aa18d21ea03472609e0a0b22cd0f807e60b954

Comment by Hannes Magnusson [ 18/Mar/15 ]

https://github.com/mongodb/mongo-c-driver/pull/206

Generated at Wed Feb 07 21:09:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.