From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 C84C7445320 for ; Fri, 17 Jul 2020 13:46:57 +0300 (MSK) Date: Fri, 17 Jul 2020 13:36:39 +0300 From: Igor Munkin Message-ID: <20200717103639.GF18920@tarantool.org> References: <20200716181639.1683-1-i.kosarev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200716181639.1683-1-i.kosarev@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] lua: panic on lua_gettop() negative return value List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ilya Kosarev Cc: tarantool-patches@dev.tarantool.org Ilya, Thanks for the patch! The patch itself is OK, but I see no reason to apply it to stable branches. Yes, it can be freely applied for a custom branch to be tested under the particular workload. But this assumption is simply crazy and I've seen nothing confirming it. If returns a negative value, it means the internal state of the given Lua coroutine (i.e. port->L) is completely broken (e.g. as a result of manual manipulation with L->base and L->top). If such breakage occurs *its root cause* definitely has to be fixed ASAP. What I want to say is that assert is more than enough here for stable branches. However, I'm totally for such experimental build to check your assumption and reproduce the possible failure. On 16.07.20, Ilya Kosarev wrote: > According to gh-4649 report it seems to be possible that we are getting > segfault on empty diag in iproto_reply_error() due to negative count of > dumped entries returned from port_lua_do_dump() in tx_process_call(). > It can only happen due to lua_gettop() returning negative value in > encode_lua_call(). This should not happen at all, so it is the reason > to panic. > > Closes #4649 > --- > Branch: https://github.com/tarantool/tarantool/tree/i.kosarev/gh-4649-empty-diag-from-tx_process_call > Issue: https://github.com/tarantool/tarantool/issues/4649 > > -- Best regards, IM