From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 72DE7258D6 for ; Wed, 28 Aug 2019 10:32:44 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AdlkmeQcxHe9 for ; Wed, 28 Aug 2019 10:32:44 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C04E82580B for ; Wed, 28 Aug 2019 10:32:43 -0400 (EDT) From: Maria Khaydich Subject: [tarantool-patches] [PATCH] Iproto call won't leak if transaction isn't committed Date: Wed, 28 Aug 2019 17:32:35 +0300 Message-Id: <20190828143235.44805-1-maria.khaydich@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Maria Khaydich In case of throwing client error because of unfinished transaction we did not destroy used port. It could possibly cause huge memory leaks as could be seen with top or its analogues when performing net.box test run in a loop. Closes #4388 --- Issue: https://github.com/tarantool/tarantool/issues/4388 Branch: https://github.com/tarantool/tarantool/tree/eljashm/gh-4388-uncommitted-iproto-leaks-not src/box/call.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/box/call.c b/src/box/call.c index ac2bf3004..169210767 100644 --- a/src/box/call.c +++ b/src/box/call.c @@ -132,6 +132,7 @@ box_process_call(struct call_request *request, struct port *port) if (txn != NULL) { diag_set(ClientError, ER_FUNCTION_TX_ACTIVE); + port_destroy(port); txn_rollback(txn); fiber_gc(); return -1; -- 2.20.1 (Apple Git-117)