{"action":"created","issue":{"url":"https://api.github.com/repos/eliben/pycparser/issues/72","labels_url":"https://api.github.com/repos/eliben/pycparser/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/eliben/pycparser/issues/72/comments","events_url":"https://api.github.com/repos/eliben/pycparser/issues/72/events","html_url":"https://github.com/eliben/pycparser/issues/72","id":65320585,"number":72,"title":"pycparser increases memory usage of pyOpenSSL by an order of magnitue","user":{"login":"ianw","id":108448,"avatar_url":"https://avatars.githubusercontent.com/u/108448?v=3","gravatar_id":"","url":"https://api.github.com/users/ianw","html_url":"https://github.com/ianw","followers_url":"https://api.github.com/users/ianw/followers","following_url":"https://api.github.com/users/ianw/following{/other_user}","gists_url":"https://api.github.com/users/ianw/gists{/gist_id}","starred_url":"https://api.github.com/users/ianw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianw/subscriptions","organizations_url":"https://api.github.com/users/ianw/orgs","repos_url":"https://api.github.com/users/ianw/repos","events_url":"https://api.github.com/users/ianw/events{/privacy}","received_events_url":"https://api.github.com/users/ianw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eliben/pycparser/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/eliben/pycparser/labels/pending-user-input","name":"pending-user-input","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-30T22:47:35Z","updated_at":"2015-05-10T14:58:23Z","closed_at":"2015-05-10T14:58:23Z","body":"I have opened https://github.com/pyca/pyopenssl/issues/202 which shows the rewrite of pyOpenSSL from C bindings to it's current usage of \"cryptography\" (the package) between 0.13 & 0.14 has increased memory usage by an order of magnitude from ~2mb to ~20mb\r\n\r\nThe issue was debugged from issues with openstack ci jobs running out of memory in [1]\r\n\r\nAs described there, heapy showed the top heap usage as\r\n\r\n```\r\nPartition of a set of 205366 objects. Total size = 30969040 bytes.\r\n Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)\r\n     0  67041  33  5712560  18   5712560  18 str\r\n     1  10260   5  2872800   9   8585360  28 dict of pycparser.plyparser.Coord\r\n     2  27765  14  2367552   8  10952912  35 tuple\r\n     3   1215   1  2246760   7  13199672  43 dict (no owner)\r\n     4   1882   1  1972336   6  15172008  49 dict of pycparser.c_ast.Decl\r\n     5  16085   8  1736232   6  16908240  55 list\r\n     6    360   0  1135296   4  18043536  58 dict of module\r\n     7   4041   2  1131480   4  19175016  62 dict of pycparser.c_ast.TypeDecl\r\n     8   4021   2  1125880   4  20300896  66 dict of pycparser.c_ast.IdentifierType\r\n     9   6984   3   893952   3  21194848  68 types.CodeType\r\n<413 more rows. Type e.g. '_.more' to view.>\r\n```\r\n\r\nwhich seems to indicate pycparser as pretty uch the top consumer.  Of course there are many layers here -- pyOpenSSL -> cryptography -> cffi -> pycparser\r\n\r\nI am not sure if something is tickling a bug in pycparser and causing leakage, or if this is just expected usage.  The increase is rather dramatic however.\r\n\r\nI understand this isn't a great bug report.  I haven't a regression point where things suddenly started using more memory and it may be something one of the upper layers is doing wrong.\r\n\r\n[1] https://etherpad.openstack.org/p/oom-in-rax-centos7-CI-job"},"comment":{"url":"https://api.github.com/repos/eliben/pycparser/issues/comments/100653015","html_url":"https://github.com/eliben/pycparser/issues/72#issuecomment-100653015","issue_url":"https://api.github.com/repos/eliben/pycparser/issues/72","id":100653015,"user":{"login":"eliben","id":1130906,"avatar_url":"https://avatars.githubusercontent.com/u/1130906?v=3","gravatar_id":"","url":"https://api.github.com/users/eliben","html_url":"https://github.com/eliben","followers_url":"https://api.github.com/users/eliben/followers","following_url":"https://api.github.com/users/eliben/following{/other_user}","gists_url":"https://api.github.com/users/eliben/gists{/gist_id}","starred_url":"https://api.github.com/users/eliben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliben/subscriptions","organizations_url":"https://api.github.com/users/eliben/orgs","repos_url":"https://api.github.com/users/eliben/repos","events_url":"https://api.github.com/users/eliben/events{/privacy}","received_events_url":"https://api.github.com/users/eliben/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T14:58:22Z","updated_at":"2015-05-10T14:58:22Z","body":"Closing this - the recent changes should have reduced pycparser's memory usage considerably."}}