From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 dev.tarantool.org (Postfix) with ESMTPS id 30AFB41D0BD for ; Thu, 17 Oct 2019 15:55:40 +0300 (MSK) Date: Thu, 17 Oct 2019 15:55:29 +0300 From: Alexander Turenko Message-ID: <20191017125528.4wxdtysp2mgvehag@tkn_work_nb> References: <20191016205157.30836-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191016205157.30836-1-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH 0/2] box/console: Fix hang on remote console enter List-Id: Tarantool development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml , tml On Wed, Oct 16, 2019 at 11:51:55PM +0300, Cyrill Gorcunov wrote: > Alexander pointed that we might require more precise command handling > when setting up eos in remote unix connection. Plain number of > arguments in command strem is not enough. Otherwise one could > call '\set language lua' and hang a connection. > > Sasha could you please test if it fixes the problem for you? > Actually I managed to repeat it without tarantoolctl but still. It fixes tarantoolctl enter and the patchset looks good for me. Pushed to master and 2.2. > > --- > The following changes since commit de9a7b1a37ec34054b062c513fa1bf9357699a8d: > > sql: use name instead of function pointer for UDF (2019-10-16 21:06:48 +0300) > > are available in the Git repository at: > > https://github.com/tarantool/tarantool console-enter > > for you to fetch changes up to 972d23c74fb4bff72889c7b6bd0455d39a4fa688: > > box/console: Test for exact command before setting eos (2019-10-16 23:45:51 +0300) > > ---------------------------------------------------------------- > Cyrill Gorcunov (2): > box/console: Move param handlers into file scope > box/console: Test for exact command before setting eos We usually start a commit header from a small letter when it is next to a prefix; I mean: "box/console: move param handlers into file scope". Changed it before push. > > src/box/lua/console.lua | 36 +++++++++++++++++++++--------------- > 1 file changed, 21 insertions(+), 15 deletions(-) BTW, I suggest to use `luacheck file.lua` to protect youself from some kind of mistakes. I use the following .luacheckrc file to reduce amount of false-positives: | std = { | read_globals = {'box', 'require', 'debug', 'pcall', 'xpcall', 'tostring', | 'tonumber', 'type', 'assert', 'ipairs', 'math', 'error', 'string', | 'table', 'pairs', 'os', 'select', 'unpack', 'dofile', 'next', | 'getmetatable', 'setmetatable', 'rawget', 'print', 'shard_status', | 'loadstring', 'arg', | }, | globals = {'package', '_G'} | } | redefined = False It is not ideal however, just eliminates some false-positive warns I met before. WBR, Alexander Turenko.