)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"25348a5c44bb4a03796239a6e78598f76c7c7fd7","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Since we allocate the result buffer in hex_encode_string, we\u0027re"},{"line_number":10,"context_line":"responsible for freeing it later."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Why didn\u0027t we catch it before? Turns out, our tests didn\u0027t"},{"line_number":13,"context_line":"loop enough. I wasn\u0027t reliably seeing a test failure at 200k"},{"line_number":14,"context_line":"iterations, but 400k seems to be enough?"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1634006"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a71b18c_954c85c9","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":40},"updated":"2016-12-06 06:20:12.000000000","message":"Exactly! I didn\u0027t catch why we need 400k for this. I\u0027m thinking some changes in python environment because python 2.7.6 in my trusty can cause memory leak around 1k in existing code but xenial (probably python 2.7.12) needs more iterations.","commit_id":"288d1e07de0f3b525ea7ae5b7c7fd67d6187756f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f227f06c467a29035fb477b74d4511cbebe15ecc","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Why didn\u0027t we catch it before? Turns out, our tests didn\u0027t"},{"line_number":13,"context_line":"loop enough. I wasn\u0027t reliably seeing a test failure at 200k"},{"line_number":14,"context_line":"iterations, but 400k seems to be enough?"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1634006"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a71b18c_e12bdf92","line":14,"in_reply_to":"3a71b18c_954c85c9","updated":"2016-12-07 21:49:45.000000000","message":"there\u0027s probably some other bug lurking at 40M iterations - but ain\u0027t no body got time for that.","commit_id":"288d1e07de0f3b525ea7ae5b7c7fd67d6187756f"}],"src/c/pyeclib_c/pyeclib_c.c":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"25348a5c44bb4a03796239a6e78598f76c7c7fd7","unresolved":false,"context_lines":[{"line_number":1044,"context_line":"    \"chksum_mismatch\", fragment_metadata-\u003echksum_mismatch,"},{"line_number":1045,"context_line":"    \"backend_id\", backend_id_str,"},{"line_number":1046,"context_line":"    \"backend_version\", fragment_metadata-\u003ebackend_version);"},{"line_number":1047,"context_line":"  encoded_chksum \u003d check_and_free_buffer(encoded_chksum);"},{"line_number":1048,"context_line":"  if (metadata_dict \u003d\u003d NULL) {"},{"line_number":1049,"context_line":"    pyeclib_c_seterr(-ENOMEM, \"fragment_metadata_to_dict ERROR: \");"},{"line_number":1050,"context_line":"    return NULL;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"3a71b18c_5504ad48","line":1047,"updated":"2016-12-06 06:20:12.000000000","message":"As I point out the python c api docs in the bug report, Py_BuildValue will copy the buffer from the malloc-ed memory spaces and it can be responsible for free-ing after building, i.e. we need to free the buffer here to avoid memory leak.\n\nThat makes me sense.","commit_id":"288d1e07de0f3b525ea7ae5b7c7fd67d6187756f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f227f06c467a29035fb477b74d4511cbebe15ecc","unresolved":false,"context_lines":[{"line_number":1044,"context_line":"    \"chksum_mismatch\", fragment_metadata-\u003echksum_mismatch,"},{"line_number":1045,"context_line":"    \"backend_id\", backend_id_str,"},{"line_number":1046,"context_line":"    \"backend_version\", fragment_metadata-\u003ebackend_version);"},{"line_number":1047,"context_line":"  encoded_chksum \u003d check_and_free_buffer(encoded_chksum);"},{"line_number":1048,"context_line":"  if (metadata_dict \u003d\u003d NULL) {"},{"line_number":1049,"context_line":"    pyeclib_c_seterr(-ENOMEM, \"fragment_metadata_to_dict ERROR: \");"},{"line_number":1050,"context_line":"    return NULL;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"3a71b18c_815dcb4a","line":1047,"in_reply_to":"3a71b18c_5504ad48","updated":"2016-12-07 21:49:45.000000000","message":"yeah, pretty sure that\u0027s how this works","commit_id":"288d1e07de0f3b525ea7ae5b7c7fd67d6187756f"}],"test/test_pyeclib_api.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f227f06c467a29035fb477b74d4511cbebe15ecc","unresolved":false,"context_lines":[{"line_number":692,"context_line":"        # 1. Prepare the expected memory allocation"},{"line_number":693,"context_line":"        encoded \u003d ec_driver.encode(b\u0027aaa\u0027)"},{"line_number":694,"context_line":"        ec_driver.get_metadata(encoded[0], formatted\u003dTrue)"},{"line_number":695,"context_line":"        loop_range \u003d range(400000)"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"        # 2. Get current memory usage"},{"line_number":698,"context_line":"        baseline_usage \u003d resource.getrusage(resource.RUSAGE_SELF)[2]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_e102ff0a","line":695,"updated":"2016-12-07 21:49:45.000000000","message":"couple orders of magnitude normally does the trick!  this seems stable for me.","commit_id":"288d1e07de0f3b525ea7ae5b7c7fd67d6187756f"}]}
