From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 59CB446971A for ; Sun, 8 Dec 2019 22:28:37 +0300 (MSK) From: Vladislav Shpilevoy Date: Sun, 8 Dec 2019 20:28:31 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 0/2] Fiber storage leak List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, kostja.osipov@gmail.com, imun@tarantool.org The patchset makes fiber.storage be always deleted. Regardless of where was it created - in a fiber born in the Lua land, or in a fiber serving IProto requests and accessing Lua. That removes - a leak occurred each time when fiber storage was created for an IProto request; - a possibility to see previous request's artifacts left in fiber.storage; And makes possible to use fiber.storage as request-local data. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4662-fiber-storage-leak Issue: https://github.com/tarantool/tarantool/issues/4662 Issue: https://github.com/tarantool/tarantool/issues/3462 Vladislav Shpilevoy (2): fiber: unref fiber.storage via global Lua state fiber: destroy fiber.storage created by iproto src/box/session.cc | 11 ++- src/box/session.h | 7 +- src/box/txn.c | 13 +-- src/box/txn.h | 7 +- src/lib/core/fiber.c | 23 +++-- src/lib/core/fiber.h | 13 ++- src/lib/core/fiber_pool.c | 6 ++ src/lua/fiber.c | 35 ++++++-- test/app/gh-4662-fiber-storage-leak.result | 88 ++++++++++++++++++++ test/app/gh-4662-fiber-storage-leak.test.lua | 43 ++++++++++ 10 files changed, 217 insertions(+), 29 deletions(-) create mode 100644 test/app/gh-4662-fiber-storage-leak.result create mode 100644 test/app/gh-4662-fiber-storage-leak.test.lua -- 2.21.0 (Apple Git-122.2)