{"action":"opened","issue":{"url":"https://api.github.com/repos/lericson/pylibmc/issues/206","repository_url":"https://api.github.com/repos/lericson/pylibmc","labels_url":"https://api.github.com/repos/lericson/pylibmc/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/lericson/pylibmc/issues/206/comments","events_url":"https://api.github.com/repos/lericson/pylibmc/issues/206/events","html_url":"https://github.com/lericson/pylibmc/issues/206","id":133368234,"number":206,"title":"double free or corruption (out)","user":{"login":"cwaeland","id":5233049,"avatar_url":"https://avatars.githubusercontent.com/u/5233049?v=3","gravatar_id":"","url":"https://api.github.com/users/cwaeland","html_url":"https://github.com/cwaeland","followers_url":"https://api.github.com/users/cwaeland/followers","following_url":"https://api.github.com/users/cwaeland/following{/other_user}","gists_url":"https://api.github.com/users/cwaeland/gists{/gist_id}","starred_url":"https://api.github.com/users/cwaeland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwaeland/subscriptions","organizations_url":"https://api.github.com/users/cwaeland/orgs","repos_url":"https://api.github.com/users/cwaeland/repos","events_url":"https://api.github.com/users/cwaeland/events{/privacy}","received_events_url":"https://api.github.com/users/cwaeland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-12T23:24:45Z","updated_at":"2016-02-12T23:24:45Z","closed_at":null,"body":"Our setup:\r\n\r\n* OS: Ubuntu 12.04\r\n* Python: 2.7\r\n* pylibmc: 1.3.0\r\n* libmemcached-devel-1.4.13\r\n\r\nGDB trace (only a few symbols unfortunately): \r\n```\r\ncat README\r\ngot _pylibmc.so from a frontend:\r\nscp production-frontend-721ad59d.managed.compass.com:/home/urbancompass/.pex/install/pylibmc-1.3.0-cp27-none-linux_x86_64.whl.d8b8feefa7058b4e65dafa31ab1d091bfd04117a/pylibmc-1.3.0-cp27-none-linux_x86_64.whl/_pylibmc.so ./\r\nAlso copied the stacktrace from chat.\r\nDownloaded gdb binaries:\r\nsudo apt-get install gdb\r\n$ gdb\r\nGNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04\r\nCopyright (C) 2012 Free Software Foundation, Inc.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\nand \"show warranty\" for details.\r\nThis GDB was configured as \"x86_64-linux-gnu\".\r\nFor bug reporting instructions, please see:\r\n<http://bugs.launchpad.net/gdb-linaro/>.\r\n(gdb) file ./_pylibmc.so\r\nReading symbols from /home/ugo/tmp/pylibmc_debug/_pylibmc.so...done.\r\n(gdb) info symbol 0x4304\r\n_PylibMC_Inflate + 180 in section .text\r\n(gdb) info symbol 0x7072\r\n_PylibMC_parse_memcached_value + 434 in section .text\r\n(gdb) info symbol 0x760c\r\nPylibMC_Client_get + 268 in section .text\r\n(gdb) quit\r\n```\r\n\r\nSeems to be in `_PylibMC_Inflate`.  So possibly related to: https://github.com/lericson/pylibmc/issues/205\r\n\r\nNote we are pushing some payloads that are over 500K to memached.\r\n\r\nI've looked into a possible version upgrade to 1.5.0, but after diffing the code there doesn't seem to be any change in that function.\r\n\r\nIt seems like it probably gets to the `error:` label which frees `out` and somehow `out` is already freed.  Perhaps it's an issue with `realloc` or in zlib?\r\n\r\nAny help would be appreciated.\r\n\r\n"}}