{"action":"created","comment":{"url":"https://api.github.com/repos/Zimbra/packages/pulls/comments/243742835","pull_request_review_id":187599108,"id":243742835,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mzc0MjgzNQ==","diff_hunk":"@@ -1763,6 +1770,13 @@ ngx_mail_proxy_internal_server_error(ngx_mail_session_t *s)\n         ngx_log_debug1(NGX_LOG_DEBUG_MAIL, s->connection->log, 0,\n                        \"close mail proxy connection: %d\",\n                        s->proxy->upstream.connection->fd);\n+#if (NGX_MAIL_SSL)\n+\n+        if (s->proxy->upstream.connection->ssl) {\n+            s->proxy->upstream.connection->ssl->no_wait_shutdown = 1;\n+            ngx_ssl_shutdown(s->proxy->upstream.connection);","path":"thirdparty/nginx/nginx-1.7.1-zimbra/src/mail/ngx_mail_proxy_module.c","position":22,"original_position":22,"commit_id":"954240a84dd992fb31824518e57f6420a59c9b5c","original_commit_id":"954240a84dd992fb31824518e57f6420a59c9b5c","user":{"login":"thefoolwhocodes","id":12743767,"node_id":"MDQ6VXNlcjEyNzQzNzY3","avatar_url":"https://avatars3.githubusercontent.com/u/12743767?v=4","gravatar_id":"","url":"https://api.github.com/users/thefoolwhocodes","html_url":"https://github.com/thefoolwhocodes","followers_url":"https://api.github.com/users/thefoolwhocodes/followers","following_url":"https://api.github.com/users/thefoolwhocodes/following{/other_user}","gists_url":"https://api.github.com/users/thefoolwhocodes/gists{/gist_id}","starred_url":"https://api.github.com/users/thefoolwhocodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefoolwhocodes/subscriptions","organizations_url":"https://api.github.com/users/thefoolwhocodes/orgs","repos_url":"https://api.github.com/users/thefoolwhocodes/repos","events_url":"https://api.github.com/users/thefoolwhocodes/events{/privacy}","received_events_url":"https://api.github.com/users/thefoolwhocodes/received_events","type":"User","site_admin":false},"body":"Appropriate action should be taken based on the return value of ngx_ssl_shutdown.","created_at":"2018-12-22T18:06:02Z","updated_at":"2018-12-22T18:06:02Z","html_url":"https://github.com/Zimbra/packages/pull/96#discussion_r243742835","pull_request_url":"https://api.github.com/repos/Zimbra/packages/pulls/96","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Zimbra/packages/pulls/comments/243742835"},"html":{"href":"https://github.com/Zimbra/packages/pull/96#discussion_r243742835"},"pull_request":{"href":"https://api.github.com/repos/Zimbra/packages/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/Zimbra/packages/pulls/96","id":240117827,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMTE3ODI3","html_url":"https://github.com/Zimbra/packages/pull/96","diff_url":"https://github.com/Zimbra/packages/pull/96.diff","patch_url":"https://github.com/Zimbra/packages/pull/96.patch","issue_url":"https://api.github.com/repos/Zimbra/packages/issues/96","number":96,"state":"open","locked":false,"title":"Nginx memory leak fix","user":{"login":"zx-fulvio","id":30527365,"node_id":"MDQ6VXNlcjMwNTI3MzY1","avatar_url":"https://avatars3.githubusercontent.com/u/30527365?v=4","gravatar_id":"","url":"https://api.github.com/users/zx-fulvio","html_url":"https://github.com/zx-fulvio","followers_url":"https://api.github.com/users/zx-fulvio/followers","following_url":"https://api.github.com/users/zx-fulvio/following{/other_user}","gists_url":"https://api.github.com/users/zx-fulvio/gists{/gist_id}","starred_url":"https://api.github.com/users/zx-fulvio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zx-fulvio/subscriptions","organizations_url":"https://api.github.com/users/zx-fulvio/orgs","repos_url":"https://api.github.com/users/zx-fulvio/repos","events_url":"https://api.github.com/users/zx-fulvio/events{/privacy}","received_events_url":"https://api.github.com/users/zx-fulvio/received_events","type":"User","site_admin":false},"body":"The current nginx code alterations introduce a memory leak concerning the tearing down of SSL connections from the proxy to the upstream mailbox servers in the case of IMAP/POP3 connections.\r\n\r\nThe SSL data structures in memory related to the upstream connections are not freed when the upstream connection is brought down leading to a memory leak which grows over time in the worker processes.\r\n\r\nThe fix is to address that bit in the connection closing process, code which was already there in the code path used for successfully established connections to the upstream server but not for connections failing because of wrong credentials or other situations.\r\n\r\nAlso added is an additional compilation switch for the OpenSSL compilation which disables the freelist buffers, a concept introduced to mitigate slow malloc implementations once upon a time and which has since been removed from other SSL implementations and from the 1.1.x branch of OpenSSL.\r\nThose buffers are used to recycle chunks of memory already allocated through malloc, chunks which are never actually release back to the OS, so their amount can grow over time, especially under load.\r\nThe switch added to the compilation options reverts to direct invocations to malloc/free.\r\n\r\nThis PR should address the bug at https://bugzilla.zimbra.com/show_bug.cgi?id=108015","created_at":"2018-12-20T10:18:53Z","updated_at":"2018-12-22T18:06:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00a33cb82ab1195ed84d58fb8110f3d1cc41727a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gordyt","id":503635,"node_id":"MDQ6VXNlcjUwMzYzNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/503635?v=4","gravatar_id":"","url":"https://api.github.com/users/gordyt","html_url":"https://github.com/gordyt","followers_url":"https://api.github.com/users/gordyt/followers","following_url":"https://api.github.com/users/gordyt/following{/other_user}","gists_url":"https://api.github.com/users/gordyt/gists{/gist_id}","starred_url":"https://api.github.com/users/gordyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gordyt/subscriptions","organizations_url":"https://api.github.com/users/gordyt/orgs","repos_url":"https://api.github.com/users/gordyt/repos","events_url":"https://api.github.com/users/gordyt/events{/privacy}","received_events_url":"https://api.github.com/users/gordyt/received_events","type":"User","site_admin":false},{"login":"tmclane","id":511975,"node_id":"MDQ6VXNlcjUxMTk3NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/511975?v=4","gravatar_id":"","url":"https://api.github.com/users/tmclane","html_url":"https://github.com/tmclane","followers_url":"https://api.github.com/users/tmclane/followers","following_url":"https://api.github.com/users/tmclane/following{/other_user}","gists_url":"https://api.github.com/users/tmclane/gists{/gist_id}","starred_url":"https://api.github.com/users/tmclane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmclane/subscriptions","organizations_url":"https://api.github.com/users/tmclane/orgs","repos_url":"https://api.github.com/users/tmclane/repos","events_url":"https://api.github.com/users/tmclane/events{/privacy}","received_events_url":"https://api.github.com/users/tmclane/received_events","type":"User","site_admin":false},{"login":"log2akshat","id":3608604,"node_id":"MDQ6VXNlcjM2MDg2MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3608604?v=4","gravatar_id":"","url":"https://api.github.com/users/log2akshat","html_url":"https://github.com/log2akshat","followers_url":"https://api.github.com/users/log2akshat/followers","following_url":"https://api.github.com/users/log2akshat/following{/other_user}","gists_url":"https://api.github.com/users/log2akshat/gists{/gist_id}","starred_url":"https://api.github.com/users/log2akshat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/log2akshat/subscriptions","organizations_url":"https://api.github.com/users/log2akshat/orgs","repos_url":"https://api.github.com/users/log2akshat/repos","events_url":"https://api.github.com/users/log2akshat/events{/privacy}","received_events_url":"https://api.github.com/users/log2akshat/received_events","type":"User","site_admin":false},{"login":"fatkudu","id":3739542,"node_id":"MDQ6VXNlcjM3Mzk1NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/3739542?v=4","gravatar_id":"","url":"https://api.github.com/users/fatkudu","html_url":"https://github.com/fatkudu","followers_url":"https://api.github.com/users/fatkudu/followers","following_url":"https://api.github.com/users/fatkudu/following{/other_user}","gists_url":"https://api.github.com/users/fatkudu/gists{/gist_id}","starred_url":"https://api.github.com/users/fatkudu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatkudu/subscriptions","organizations_url":"https://api.github.com/users/fatkudu/orgs","repos_url":"https://api.github.com/users/fatkudu/repos","events_url":"https://api.github.com/users/fatkudu/events{/privacy}","received_events_url":"https://api.github.com/users/fatkudu/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Zimbra/packages/pulls/96/commits","review_comments_url":"https://api.github.com/repos/Zimbra/packages/pulls/96/comments","review_comment_url":"https://api.github.com/repos/Zimbra/packages/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Zimbra/packages/issues/96/comments","statuses_url":"https://api.github.com/repos/Zimbra/packages/statuses/954240a84dd992fb31824518e57f6420a59c9b5c","head":{"label":"zx-fulvio:nginx-memory-leak-fix","ref":"nginx-memory-leak-fix","sha":"954240a84dd992fb31824518e57f6420a59c9b5c","user":{"login":"zx-fulvio","id":30527365,"node_id":"MDQ6VXNlcjMwNTI3MzY1","avatar_url":"https://avatars3.githubusercontent.com/u/30527365?v=4","gravatar_id":"","url":"https://api.github.com/users/zx-fulvio","html_url":"https://github.com/zx-fulvio","followers_url":"https://api.github.com/users/zx-fulvio/followers","following_url":"https://api.github.com/users/zx-fulvio/following{/other_user}","gists_url":"https://api.github.com/users/zx-fulvio/gists{/gist_id}","starred_url":"https://api.github.com/users/zx-fulvio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zx-fulvio/subscriptions","organizations_url":"https://api.github.com/users/zx-fulvio/orgs","repos_url":"https://api.github.com/users/zx-fulvio/repos","events_url":"https://api.github.com/users/zx-fulvio/events{/privacy}","received_events_url":"https://api.github.com/users/zx-fulvio/received_events","type":"User","site_admin":false},"repo":{"id":161078423,"node_id":"MDEwOlJlcG9zaXRvcnkxNjEwNzg0MjM=","name":"packages","full_name":"zx-fulvio/packages","private":false,"owner":{"login":"zx-fulvio","id":30527365,"node_id":"MDQ6VXNlcjMwNTI3MzY1","avatar_url":"https://avatars3.githubusercontent.com/u/30527365?v=4","gravatar_id":"","url":"https://api.github.com/users/zx-fulvio","html_url":"https://github.com/zx-fulvio","followers_url":"https://api.github.com/users/zx-fulvio/followers","following_url":"https://api.github.com/users/zx-fulvio/following{/other_user}","gists_url":"https://api.github.com/users/zx-fulvio/gists{/gist_id}","starred_url":"https://api.github.com/users/zx-fulvio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zx-fulvio/subscriptions","organizations_url":"https://api.github.com/users/zx-fulvio/orgs","repos_url":"https://api.github.com/users/zx-fulvio/repos","events_url":"https://api.github.com/users/zx-fulvio/events{/privacy}","received_events_url":"https://api.github.com/users/zx-fulvio/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zx-fulvio/packages","description":"ZCS Third Party Dependency Build System","fork":true,"url":"https://api.github.com/repos/zx-fulvio/packages","forks_url":"https://api.github.com/repos/zx-fulvio/packages/forks","keys_url":"https://api.github.com/repos/zx-fulvio/packages/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zx-fulvio/packages/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zx-fulvio/packages/teams","hooks_url":"https://api.github.com/repos/zx-fulvio/packages/hooks","issue_events_url":"https://api.github.com/repos/zx-fulvio/packages/issues/events{/number}","events_url":"https://api.github.com/repos/zx-fulvio/packages/events","assignees_url":"https://api.github.com/repos/zx-fulvio/packages/assignees{/user}","branches_url":"https://api.github.com/repos/zx-fulvio/packages/branches{/branch}","tags_url":"https://api.github.com/repos/zx-fulvio/packages/tags","blobs_url":"https://api.github.com/repos/zx-fulvio/packages/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zx-fulvio/packages/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zx-fulvio/packages/git/refs{/sha}","trees_url":"https://api.github.com/repos/zx-fulvio/packages/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zx-fulvio/packages/statuses/{sha}","languages_url":"https://api.github.com/repos/zx-fulvio/packages/languages","stargazers_url":"https://api.github.com/repos/zx-fulvio/packages/stargazers","contributors_url":"https://api.github.com/repos/zx-fulvio/packages/contributors","subscribers_url":"https://api.github.com/repos/zx-fulvio/packages/subscribers","subscription_url":"https://api.github.com/repos/zx-fulvio/packages/subscription","commits_url":"https://api.github.com/repos/zx-fulvio/packages/commits{/sha}","git_commits_url":"https://api.github.com/repos/zx-fulvio/packages/git/commits{/sha}","comments_url":"https://api.github.com/repos/zx-fulvio/packages/comments{/number}","issue_comment_url":"https://api.github.com/repos/zx-fulvio/packages/issues/comments{/number}","contents_url":"https://api.github.com/repos/zx-fulvio/packages/contents/{+path}","compare_url":"https://api.github.com/repos/zx-fulvio/packages/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zx-fulvio/packages/merges","archive_url":"https://api.github.com/repos/zx-fulvio/packages/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zx-fulvio/packages/downloads","issues_url":"https://api.github.com/repos/zx-fulvio/packages/issues{/number}","pulls_url":"https://api.github.com/repos/zx-fulvio/packages/pulls{/number}","milestones_url":"https://api.github.com/repos/zx-fulvio/packages/milestones{/number}","notifications_url":"https://api.github.com/repos/zx-fulvio/packages/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zx-fulvio/packages/labels{/name}","releases_url":"https://api.github.com/repos/zx-fulvio/packages/releases{/id}","deployments_url":"https://api.github.com/repos/zx-fulvio/packages/deployments","created_at":"2018-12-09T20:27:08Z","updated_at":"2018-12-09T20:27:10Z","pushed_at":"2018-12-20T10:04:01Z","git_url":"git://github.com/zx-fulvio/packages.git","ssh_url":"git@github.com:zx-fulvio/packages.git","clone_url":"https://github.com/zx-fulvio/packages.git","svn_url":"https://github.com/zx-fulvio/packages","homepage":null,"size":3766,"stargazers_count":0,"watchers_count":0,"language":"Makefile","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"Zimbra:develop","ref":"develop","sha":"42c19f9bd20e097f63d2e6f050ac8d35a44a05f9","user":{"login":"Zimbra","id":8135764,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgxMzU3NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8135764?v=4","gravatar_id":"","url":"https://api.github.com/users/Zimbra","html_url":"https://github.com/Zimbra","followers_url":"https://api.github.com/users/Zimbra/followers","following_url":"https://api.github.com/users/Zimbra/following{/other_user}","gists_url":"https://api.github.com/users/Zimbra/gists{/gist_id}","starred_url":"https://api.github.com/users/Zimbra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zimbra/subscriptions","organizations_url":"https://api.github.com/users/Zimbra/orgs","repos_url":"https://api.github.com/users/Zimbra/repos","events_url":"https://api.github.com/users/Zimbra/events{/privacy}","received_events_url":"https://api.github.com/users/Zimbra/received_events","type":"Organization","site_admin":false},"repo":{"id":45702537,"node_id":"MDEwOlJlcG9zaXRvcnk0NTcwMjUzNw==","name":"packages","full_name":"Zimbra/packages","private":false,"owner":{"login":"Zimbra","id":8135764,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgxMzU3NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8135764?v=4","gravatar_id":"","url":"https://api.github.com/users/Zimbra","html_url":"https://github.com/Zimbra","followers_url":"https://api.github.com/users/Zimbra/followers","following_url":"https://api.github.com/users/Zimbra/following{/other_user}","gists_url":"https://api.github.com/users/Zimbra/gists{/gist_id}","starred_url":"https://api.github.com/users/Zimbra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zimbra/subscriptions","organizations_url":"https://api.github.com/users/Zimbra/orgs","repos_url":"https://api.github.com/users/Zimbra/repos","events_url":"https://api.github.com/users/Zimbra/events{/privacy}","received_events_url":"https://api.github.com/users/Zimbra/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Zimbra/packages","description":"ZCS Third Party Dependency Build System","fork":false,"url":"https://api.github.com/repos/Zimbra/packages","forks_url":"https://api.github.com/repos/Zimbra/packages/forks","keys_url":"https://api.github.com/repos/Zimbra/packages/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zimbra/packages/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zimbra/packages/teams","hooks_url":"https://api.github.com/repos/Zimbra/packages/hooks","issue_events_url":"https://api.github.com/repos/Zimbra/packages/issues/events{/number}","events_url":"https://api.github.com/repos/Zimbra/packages/events","assignees_url":"https://api.github.com/repos/Zimbra/packages/assignees{/user}","branches_url":"https://api.github.com/repos/Zimbra/packages/branches{/branch}","tags_url":"https://api.github.com/repos/Zimbra/packages/tags","blobs_url":"https://api.github.com/repos/Zimbra/packages/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zimbra/packages/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zimbra/packages/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zimbra/packages/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zimbra/packages/statuses/{sha}","languages_url":"https://api.github.com/repos/Zimbra/packages/languages","stargazers_url":"https://api.github.com/repos/Zimbra/packages/stargazers","contributors_url":"https://api.github.com/repos/Zimbra/packages/contributors","subscribers_url":"https://api.github.com/repos/Zimbra/packages/subscribers","subscription_url":"https://api.github.com/repos/Zimbra/packages/subscription","commits_url":"https://api.github.com/repos/Zimbra/packages/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zimbra/packages/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zimbra/packages/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zimbra/packages/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zimbra/packages/contents/{+path}","compare_url":"https://api.github.com/repos/Zimbra/packages/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zimbra/packages/merges","archive_url":"https://api.github.com/repos/Zimbra/packages/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zimbra/packages/downloads","issues_url":"https://api.github.com/repos/Zimbra/packages/issues{/number}","pulls_url":"https://api.github.com/repos/Zimbra/packages/pulls{/number}","milestones_url":"https://api.github.com/repos/Zimbra/packages/milestones{/number}","notifications_url":"https://api.github.com/repos/Zimbra/packages/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zimbra/packages/labels{/name}","releases_url":"https://api.github.com/repos/Zimbra/packages/releases{/id}","deployments_url":"https://api.github.com/repos/Zimbra/packages/deployments","created_at":"2015-11-06T19:24:58Z","updated_at":"2018-11-27T15:50:07Z","pushed_at":"2018-12-20T10:18:54Z","git_url":"git://github.com/Zimbra/packages.git","ssh_url":"git@github.com:Zimbra/packages.git","clone_url":"https://github.com/Zimbra/packages.git","svn_url":"https://github.com/Zimbra/packages","homepage":null,"size":3754,"stargazers_count":8,"watchers_count":8,"language":"Makefile","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":16,"open_issues":13,"watchers":8,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Zimbra/packages/pulls/96"},"html":{"href":"https://github.com/Zimbra/packages/pull/96"},"issue":{"href":"https://api.github.com/repos/Zimbra/packages/issues/96"},"comments":{"href":"https://api.github.com/repos/Zimbra/packages/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/Zimbra/packages/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/Zimbra/packages/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Zimbra/packages/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/Zimbra/packages/statuses/954240a84dd992fb31824518e57f6420a59c9b5c"}},"author_association":"NONE"}}
{"actor":{"display_login":"thefoolwhocodes"}}