[CDRIVER-2048] Memory leak in test_server_removed_during_handshake Created: 13/Feb/17  Updated: 06/Mar/17  Resolved: 03/Mar/17

Status: Closed
Project: C Driver
Component/s: tests
Affects Version/s: 1.6.0
Fix Version/s: 1.6.1

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


 Description   

[2017/01/30 10:29:32.271] ==74751== 1,169 (320 direct, 849 indirect) bytes in 1 blocks are definitely lost in loss record 341 of 350
[2017/01/30 10:29:32.271] ==74751==    at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
[2017/01/30 10:29:32.271] ==74751==    by 0x4E57FDF: bson_malloc0 (bson-memory.c:105)
[2017/01/30 10:29:32.271] ==74751==    by 0x4BB4EA: mongoc_uri_copy (mongoc-uri.c:1258)
[2017/01/30 10:29:32.271] ==74751==    by 0x47175D: _test_server_removed_during_handshake (test-mongoc-topology.c:811)
[2017/01/30 10:29:32.271] ==74751==    by 0x471D06: test_server_removed_during_handshake_single (test-mongoc-topology.c:879)
[2017/01/30 10:29:32.271] ==74751==    by 0x47C114: TestSuite_AddHelper (TestSuite.c:333)
[2017/01/30 10:29:32.271] ==74751==    by 0x47C77F: TestSuite_RunTest (TestSuite.c:602)
[2017/01/30 10:29:32.271] ==74751==    by 0x47D035: TestSuite_RunSerial (TestSuite.c:868)
[2017/01/30 10:29:32.271] ==74751==    by 0x47D39F: TestSuite_Run (TestSuite.c:949)
[2017/01/30 10:29:32.271] ==74751==    by 0x413270: main (test-libmongoc.c:1867)
[2017/01/30 10:29:32.271] ==74751==
[2017/01/30 10:29:32.271] ==74751== 1,169 (320 direct, 849 indirect) bytes in 1 blocks are definitely lost in loss record 342 of 350
[2017/01/30 10:29:32.271] ==74751==    at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
[2017/01/30 10:29:32.271] ==74751==    by 0x4E57FDF: bson_malloc0 (bson-memory.c:105)
[2017/01/30 10:29:32.271] ==74751==    by 0x4BB4EA: mongoc_uri_copy (mongoc-uri.c:1258)
[2017/01/30 10:29:32.271] ==74751==    by 0x47175D: _test_server_removed_during_handshake (test-mongoc-topology.c:811)
[2017/01/30 10:29:32.271] ==74751==    by 0x471D16: test_server_removed_during_handshake_pooled (test-mongoc-topology.c:886)
[2017/01/30 10:29:32.271] ==74751==    by 0x47C114: TestSuite_AddHelper (TestSuite.c:333)
[2017/01/30 10:29:32.271] ==74751==    by 0x47C77F: TestSuite_RunTest (TestSuite.c:602)
[2017/01/30 10:29:32.271] ==74751==    by 0x47D035: TestSuite_RunSerial (TestSuite.c:868)
[2017/01/30 10:29:32.271] ==74751==    by 0x47D39F: TestSuite_Run (TestSuite.c:949)
[2017/01/30 10:29:32.271] ==74751==    by 0x413270: main (test-libmongoc.c:1867)
[2017/01/30 10:29:32.271] ==74751==
[2017/01/30 10:29:32.271] ==74751== 3,965 (640 direct, 3,325 indirect) bytes in 4 blocks are definitely lost in loss record 349 of 350
[2017/01/30 10:29:32.271] ==74751==    at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
[2017/01/30 10:29:32.271] ==74751==    by 0x4E57FDF: bson_malloc0 (bson-memory.c:105)
[2017/01/30 10:29:32.271] ==74751==    by 0x40EEAF: request_new (request.c:53)
[2017/01/30 10:29:32.271] ==74751==    by 0x40D827: worker_thread (mock-server.c:1632)
[2017/01/30 10:29:32.271] ==74751==    by 0x5288183: start_thread (pthread_create.c:312)
[2017/01/30 10:29:32.271] ==74751==    by 0x559837C: clone (clone.S:111)
[2017/01/30 10:29:32.271] ==74751==

See: https://evergreen.mongodb.com/task/mongo_c_driver_release_releng_debug_compile_valgrind_af8a0dcc025648df0fc961ca8c9381c5aa7dcd36_17_01_30_15_02_20



 Comments   
Comment by A. Jesse Jiryu Davis [ 03/Mar/17 ]

https://github.com/mongodb/mongo-c-driver/commit/6ec32cad3de8a6eba02bcc327d7619a7c70d42e1

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