- Aug 24, 2023
-
-
Sergey Bronnikov authored
Module API documentation is described in Doxygen comments in C/C++ files in src/ directory. No sense to run this job for other changes. The patch changes paths in workflow accordingly. NO_CHANGELOG=ci NO_DOC=ci NO_TEST=ci (cherry picked from commit 9af36ae1)
-
Sergey Bronnikov authored
Fuzzing is a heavyweight job, we can reduce a set of paths used for triggering this job and therefore reduce an overall time of testing in some cases. The patch replaces `.github/workflows/**` to `.github/workflows/fuzzing.yml` because workflows are independent and changes in other workflows does not affect fuzzing at all and patch adds Lua files (`**.lua`) to ignores because fuzzing focused on C/C++ code. NO_CHANGELOG=ci NO_DOC=ci NO_TEST=ci (cherry picked from commit f14cb97d)
-
Ilya Verbin authored
Memory is leaked in the following scenario: - MP_ERROR_STACK with 2 errors is passed to error_unpack_unsafe(): 1. A correct MP_MAP with MP_ERROR_* fields; 2. Something unexpected, e.g. MP_INT; - This first call to mp_decode_error_one() allocates memory for the first error in error_build_xc() -> `new ClientError()`; - The second call to mp_decode_error_one() returns NULL, and error_unpack_unsafe() returns NULL too. Memory from the previous step is leaked. Closes #8921 NO_DOC=bugfix (cherry picked from commit b367fb98)
-
Ilya Verbin authored
part_count was checked in index_def_check(), which was called too late. Before that check: 1. `malloc(sizeof(*part_def) * part_count)` can fail for huge part_count; 2. key_def_new() can crash for zero part_count because of out of bound access in: NO_WRAP - #1 key_def_contains_sequential_parts (def=0x5555561a2ef0) at src/box/tuple_extract_key.cc:26 - #2 key_def_set_extract_func (key_def=0x5555561a2ef0) at src/box/tuple_extract_key.cc:442 - #3 key_def_set_func (def=0x5555561a2ef0) at src/box/key_def.c:162 - #4 key_def_new (parts=0x7fffc4001350, part_count=0, for_func_index=false) at src/box/key_def.c:320 NO_WRAP Closes #8688 NO_DOC=bugfix (cherry picked from commit ef9e3320)
-
- Aug 22, 2023
-
-
Timur Safin authored
This reverts commit ace88542. That commit disabled repl in tarantool for debugger console session because debugger console wasn't compatible with Tarantool console, i.e. this code hang in terminal: ```lua tarantool> dbg = require 'luadebug' tarantool> dbg() ``` With the previous patch in the patchset, full readline support and console compatibility was introduced. Thus, no need to disable repl. Part of #7738 NO_TEST=internal NO_DOC=internal, revert unpublished NO_CHANGELOG=internal (cherry picked from commit 3774e85d)
-
Timur Safin authored
Implemented readline history and autocomplete by reusing readline facilities of Tarantool console. They used to be being hidden once Lua 'console' module is loaded. With c432e9e9 (lua: don't use public module name as internal one), now they are available as 'console.lib'. Closes #7738 NO_TEST=covered by refactored console_debugger_session_test.lua @TarantoolBot document Title: proper readline support in readline Similar to tarantool interactive console, tdbg now uses readline for its shell. It enables handier input editing, command history and so on. (cherry picked from commit 92222451)
-
Gleb Kashkin authored
`console_debugger_session_test.lua` can be simplified and made more stable with interactive_tarantool helper. With the new `read_untill_prompt()` helper function, dbgr prompt can be used as end-of-output marker instead of '...' in yaml-outputting main console. This way, popen results are unambiguous and no retries are required. At the same time, dbgr prompt is now expected with every result, thus there is no need for an extra check. But `continue` command usually reaches the end of the script and exits debugger, thus '<END_OF_EXECUTION>' marker was introduced. Empty stderr and header check were moved to interactive_tarantool helper. This patch breaks the test without debugger readline support patch, that is next in the patchset. Part of #7738 NO_CHANGELOG=test refactoring NO_DOC=test refactoring (cherry picked from commit 72008443)
-
Gleb Kashkin authored
The following changes were applied to `interactive_tarantool` helper to adapt it for debugger tests: * compared commands are now stripped from tabs and color codes too * now each command independent of control symbols is being stripped before comparison in `execute_command()` * created internal new function that is called from both `new()` and `new_debugger()` * now user defined prompt can be set up from `new` and `new_debugger()` * now there are several less typos in comments Part of #7738 NO_CHANGELOG=test helper update NO_DOC=test helper update NO_TEST=test helper update (cherry picked from commit 11dddb65)
-
Timur Safin authored
Refactor the way how we run various debugger scenarios, getting rid of external static file, and producing debuggee scripts on the fly. The idea is to have everything in the single source: both source script to be used for debugging, and corresponding debugger commands. NO_DOC=internal NO_CHANGELOG=internal (cherry picked from commit 7314a1bd)
-
Timur Safin authored
It's frequently needed to see interaction of a luatest script and its chield launched via popen. Now we display extra debugging information received from children pipes directly to the parent screen. It's hidden by default by luatest (if everything goes well), but could be displayed with `luatest -c` option. ``` luatest -c -v app-luatest/console_debugger_session_test.lua ``` NO_DOC=internal NO_CHANGELOG=internal (cherry picked from commit 7a813f43)
-
Yaroslav Lobankov authored
Remove hard-coded compiler version for the `test-release-asan` target in the .test.mk file. NO_DOC=make NO_TEST=make NO_CHANGELOG=make (cherry picked from commit ed35713e)
-
- Aug 21, 2023
-
-
Ilya Verbin authored
test/unit/guard.cc calls stack_break_f() recursively until the stack overflows and a signal is fired, however it relies on undefined behavior when compares pointers to local variables. Fixed by comparing __builtin_frame_address() instead. One of the examples of this UB is when ASAN allocates local variables on fake stacks, in that case the test completes without the stack overflow. Also this patch disables ASAN for stack_break_f() to keep the array on the fiber stack (see the corresponding comment) and marks it as volatile to avoid optimizing it away by the compiler. Closes tarantool/tarantool-qa#323 NO_DOC=test fix NO_CHANGELOG=test fix (cherry picked from commit 05b696c7)
-
Kirill Yukhin authored
Also, remove RC-related changelog and unreleased/ entries. NO_DOC=no code changes NO_TEST=no code changes NO_CHANGELOG=no code changes
-
- Aug 17, 2023
-
-
Vladimir Davydov authored
Runtime tuple formats are reusable, which means that a tuple format returned by runtime_tuple_format_new may not be brand new, but actually be used by a Lua object. As a result, if we call any function that may trigger Lua GC between runtime_tuple_format_new and tuple_format_ref, the tuple format may be deleted, leading to a use-after-free bug. This is what happens in lbox_tuple_format_new. Fix this issue by taking a reference to the format before pushing a cdata object to the Lua stack in lbox_push_tuple_format. The issue was fixed in the master branch by commit 28ec245d ("lua: fix heap-use-after-free bug in tuple format constructor"). This isn't a clean cherry-pick because the code changed quite a bit. Closes #8889 NO_DOC=bug fix NO_TEST=difficult to reproduce, found by ASAN
-
- Aug 16, 2023
-
-
Igor Munkin authored
* ci: support coveralls * cmake: add code coverage support * test: run flake8 static analysis via CMake * test: fix E741 errors by pycodestyle * test: fix E722 errors by pycodestyle * test: fix E711 errors by pycodestyle * test: fix E502 errors by pycodestyle * test: fix E501 errors by pycodestyle * test: fix E305 errors by pycodestyle * test: fix E303 errors by pycodestyle * test: fix E302 errors by pycodestyle * test: fix E301 errors by pycodestyle * test: fix E275 errors by pycodestyle * test: fix E251 errors by pycodestyle * test: fix E231 errors by pycodestyle * test: fix E203 errors by pycodestyle * test: fix E201 and E202 errors by pycodestyle * test: suppress E131 errors by pycodestyle * test: fix E128 errors by pycodestyle * test: fix E122 errors by pycodestyle * gdb: fix Python <assert> statement usage NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump NO_CHANGELOG=LuaJIT submodule bump
-
Sergey Bronnikov authored
NO_DOC=seed corpus NO_CHANGELOG=seed corpus NO_TEST=seed corpus (cherry picked from commit 4894863e)
-
Sergey Bronnikov authored
NO_DOC=testing NO_CHANGELOG=testing (cherry picked from commit 4deadeb8)
-
Sergey Bronnikov authored
NO_DOC=seed corpus NO_CHANGELOG=seed corpus NO_TEST=seed corpus (cherry picked from commit 4b5fb953)
-
Sergey Bronnikov authored
Examples of IPROTO decoding issues: #3900, #1928, #6781. Patch adds a number of fuzzing tests that covers IPROTO decoding: - xrow_decode_auth - xrow_decode_begin - xrow_decode_call - xrow_decode_dml - xrow_decode_id - xrow_decode_raft - xrow_decode_sql - xrow_decode_watch - xrow_greeting_decode NO_DOC=testing NO_CHANGELOG=testing (cherry picked from commit 46cacf35)
-
- Aug 15, 2023
-
-
Ilya Verbin authored
The checks in box.schema.index.create() and box.schema.index.alter() were case sensitive, also it was possible to insert incorrect index options directly into `box.space._index`. Fixed by adding checks to memtx_space_check_index_def() and vinyl_space_check_index_def(). Closes #8937 NO_DOC=bugfix (cherry picked from commit 4e25384b)
-
Ilya Verbin authored
And remove unused index_def_check_xc(). As index_def_dup() never returns NULL anymore, change index_create() and index_read_view_create() return type to `void` and update their callers. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit f6d61754)
-
Sergey Bronnikov authored
Fuzzing test for LuaJIT generates random Lua programs and executes them. We want to build a fuzzing test that will produce Lua programs that will not contain semantic errors and will trigger as much as possible components in LuaJIT. This proposed patch introduces metrics that gathered after running the test. LuaJIT metrics gathered using LuaJIT getmetrics module [1]. All gathered metrics test will output after running with a finite number of runs or finite duration of time (options `-runs` and `-max_total_time`) or after sending SIGUSR1 to a test process. ``` $ ./build/test/fuzz/luaL_loadbuffer/luaL_loadbuffer_fuzzer -runs=1000 <snipped> Done 1000 runs in 1 second(s) Total number of samples: 1000 Total number of samples with errors: 438 (43%) Total number of samples with recorded traces: 87 (8%) Total number of samples with snap restores: 30 (3%) Total number of samples with abort traces: 55 (5%) ``` 1. https://www.tarantool.io/en/doc/latest/reference/tooling/luajit_getmetrics/#getmetrics-c-api NO_CHANGELOG=testing NO_DOC=testing
-
Ilya Verbin authored
The `__sanitizer_start_switch_fiber()` function takes a pointer as the first argument to store the current fake stack if there is one (it is necessary when stack-use-after-return detection is enabled). When leaving a fiber definitely, NULL must be passed so that the fake stack is destroyed. Before this patch, NULL was passed for dead fibers, however this is wrong for dead fibers that are recycled and resumed. In such cases ASAN destroys the fake stack, and the fiber crashes trying to use it in `fiber_yield()` upon return from `coro_transfer()`. Closes tarantool/tarantool-qa#321 NO_DOC=bugfix NO_TEST=tested by test-release-asan workflow (cherry picked from commit 72a6abee)
-
- Aug 14, 2023
-
-
Vladimir Davydov authored
The function can't be called on an unconfigured instance because it needs IPROTO threads up and running. Let's raise an error to avoid a crash. Since we have two other places where we need to raise the same error (box.session.su and box.__index), let's introduce the new code ER_UNCONFIGURED for this error. Closes #8975 NO_DOC=bug fix (cherry picked from commit 4fd2686e)
-
- Aug 10, 2023
-
-
Ilya Verbin authored
Pin in cache the collation identifiers that are referenced by space format and/or indexes, so that they can't be deleted. Closes #4544 NO_DOC=bugfix (cherry picked from commit d69aa687)
-
Ilya Verbin authored
It was possible to delete a collation, which is in use by a key_def. Part of #4544 NO_DOC=bugfix NO_CHANGELOG=next commit (cherry picked from commit 07beb340)
-
Magomed Kostoev authored
Since number type was introduced we can not assume if tuples are equal by comparison then their sizes are equal too. So the place the assumption is used is fixed. Closes #8899 NO_DOC=bugfix (cherry picked from commit f4de9faf)
-
- Aug 08, 2023
-
-
Oleg Chaplashkin authored
Bump test-run to new version with the following improvements: - luatest: fix detect tarantool crash at exit [1] - Fix bug when lua script name truncated by dot [2] - Raise an error and log it if test timeouts are set incorrectly [3] - Pin PyYAML version to 5.3.1 [4] - Add ability to set path to executable file [5] - Migrate tarantoolctl from tarantool repository [6] - Fix test-run crash when default server is crashed [7] - Disable reproduce content printing [8] [1] tarantool/test-run@be693d1 [2] tarantool/test-run@a6405f1 [3] tarantool/test-run@d34ecb0 [4] tarantool/test-run@704420e [5] tarantool/test-run@0a70001 [6] tarantool/test-run@ad43d8f [7] tarantool/test-run@b31329e [8] tarantool/test-run@31f0ced NO_DOC=test NO_TEST=test NO_CHANGELOG=test (cherry picked from commit f4511948)
-
Yaroslav Lobankov authored
Run release build LTO testing inside a Docker container created from the `tarantool/testing:ubuntu-jammy-clang16` image with Clang 16 installed. Closes #318 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci (cherry picked from commit 9d0cb54f)
-
Yaroslav Lobankov authored
Run release build testing inside a Docker container created from the `tarantool/testing:ubuntu-jammy-clang16` image with Clang 16 installed. Closes #317 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci (cherry picked from commit 9134dabd)
-
Sergey Vorontsov authored
NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit bb74d6c9)
-
Kirill Yukhin authored
Add code owners for CI-related script and for github automation directory. NO_CHANGELOG=no code changes NO_TEST=no code changes NO_DOC=no code changes (cherry picked from commit 9234763a)
-
Kirill Yukhin authored
In order to improve tests of Tarantool core assign dedicated team to perform review of each and every change. NO_CHANGELOG=no code changes NO_TEST=no code changes NO_DOC=no code changes (cherry picked from commit 532bada7)
-
Kirill Yukhin authored
To make changelog preparation less stressful let's pass each and every change to changelogs/ directly through the doc team. NO_CHANGELOG=no code changes NO_TEST=no code changes NO_DOC=no code changes (cherry picked from commit 2970bd57)
-
Aleksandr Lyapunov authored
There must be a couple of rules: * foreign key from non-temporary space to temporary space must be forbidden since after restart all existing links will be broken. * foreign key from non-local space to local space must be forbidden on any replica all existing can be broken. This patch implements the rules. Closes #8936 NO_DOC=bugfix (cherry picked from commit 7d23b339)
-
- Aug 07, 2023
-
-
Aleksandr Lyapunov authored
In #7309 a truncation of a space that was referenced by foreign key from some other space was prohibited. It appeared that this solution is too bothering since a user can't truncate a space even if he truncated referring space before that. Fix it by allowing space truncate if referring spaces are empty. Also allow drop of the primary index in the same case with the same reason: logically the index along with all space data is not needed for consistency if there's no referring data. Note that by design space truncate is implemented quite similar to space drop. Both delete all indexes, from secondary to primary. Since this patch allows deletion of the primary index (which is the action that actually deletes all data from the space), this patch changes the result of space drop too: the space remains alive with no indexes, while before this patch it remained alive with no secondary indexes but with present primary. In both cases the behaviour is quite strange and must be fixed in #4348. To make tests pass I had to perform drop in box.atomic manually. Closes #8946 NO_DOC=bugfix (cherry picked from commit 983a7ec2)
-
Vladimir Davydov authored
The test fails on osx_debug quite frequently with the following error: NO_WRAP > box/before_replace.test.lua [ fail ] > > Test failed! Result content mismatch: > --- box/before_replace.result Mon Aug 7 10:36:06 2023 > +++ /tmp/t/rejects/box/before_replace.reject Mon Aug 7 10:42:03 2023 > @@ -899,6 +899,7 @@ > ... > for i = 1,17 do gen_inserts() end > --- > +- error: fiber slice is exceeded > ... > test_run:cmd('restart server test') > s = box.space.test_on_schema_init > @@ -906,7 +907,7 @@ > ... > s:count() > --- > -- 1 > +- 0 > ... > -- For this test the number of invocations of the before_replace > -- trigger during recovery multiplied by the amount of return values > @@ -921,7 +922,8 @@ > -- the value is only increased by 1, and this change is visible only in memory. > s:get{1}[2] == 1 + 16999 + 17000 + 1 or s:get{1}[2] > --- > -- true > +- error: '[string "return s:get{1}[2] == 1 + 16999 + 17000 + 1 o..."]:1: attempt to > + index a nil value' > ... > test_run:cmd('switch default') > --- NO_WRAP Let's try to increase the max fiber slice up to 15 seconds to avoid that, like we do in other potentially long tests. (The default value is 1 second.) NO_DOC=test fix NO_CHANGELOG=test fix (cherry picked from commit 371d4110)
-
Vladimir Davydov authored
This should suppress the following coverity issues: https://scan7.scan.coverity.com/reports.htm#v39198/p13437/fileInstanceId=146712118&defectInstanceId=18978766&mergedDefectId=1563095 https://scan7.scan.coverity.com/reports.htm#v39198/p13437/fileInstanceId=146712113&defectInstanceId=18978750&mergedDefectId=1563094 While we are at it, let's use space_by_id instead of space_cache_find because read view creation is a rare operation affecting all spaces so caching the last space by id doesn't make any sense. NO_DOC=code health NO_TEST=code health NO_CHANGELOG=code health (cherry picked from commit f2886dd0)
-
- Aug 04, 2023
-
-
Igor Munkin authored
All LuaJIT related LSan warnings were suppressed in the scope of the commit 985548e4 ("asan: suppress all LSAN warnings related to LuaJIT"), since all compiler flags tweaks were enclosed in LuaJIT CMake machinery. As a result of the commit in LuaJIT submodule tarantool/luajit@a86e376 ("build: introduce LUAJIT_USE_ASAN option") ASan and LSan support has been finally added to LuaJIT runtime, so it was decided to remove LSan suppressions for LuaJIT functions. Unfortunately, it was not so easy as it looked like. At first, Lua global state is not closed properly at Tarantool instance exit (see <tarantool_free> in src/main.cc and <tarantool_lua_free> in src/lua/init.c for more info), so LSan false-positive leaks are detected (for more info, see #3071). Hence, the original LSan suppression for lj_BC_FUNCC is returned back (temporarily) until the aforementioned issue is not resolved. Furthermore, the internal LuaJIT memory allocator is not instrumented yet, so to find any memory faults it's worth building LuaJIT with system provided memory allocator (i.e. enable LUAJIT_USE_SYSMALLOC option). However, again, since Tarantool doesn't finalize Lua universe the right way, so running Tarantool testing routine with LUAJIT_USE_SYSMALLOC enabled generates false-positive LSan leaks. Return back here to enable LUAJIT_USE_SYSMALLOC, when #3071 is resolved. Last but not least, the default value of fiber stack size is 512Kb, but several tests in test/PUC-Rio-Lua-5.1-test suite in LuaJIT submodule (e.g. some cases with deep recursion in errors.lua or pm.lua) have already been tweaked according to the limitations mentioned in #5782, but the crashes still occur while running LuaJIT tests with ASan support enabled. Experiments once again confirm the notorious quote that "640 Kb ought to be enough for anybody". Anyway, LuaJIT tests are added to <test-release-asan> target in .test.mk and LUAJIT_TEST_ENV is extended with required ASan and LSan options. Follows up #5878 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci (cherry picked from commit bacf4e56)
-
- Aug 02, 2023
-
-
Igor Munkin authored
* ci: introduce testing workflow with sanitizers * build: introduce LUAJIT_USE_ASAN option * test: introduce test:done TAP helper * memprof: remove invalid assertions * ci: clean up workflow for exotic builds Closes #5878 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump NO_CHANGELOG=LuaJIT submodule bump
-