- Oct 13, 2023
-
-
Gleb Kashkin authored
User password is stored in a system space is a form of hash when 'chap-sha1' auth type is set, and in a form of hash with salt when 'pap-sha256' is set. Now, if a user is set inside config, and the current auth type is different from the type the users password is stored in, the password hash will be regenerated. Part of #8967 NO_DOC=documentation request will be filed manually for the whole credentials
-
Gleb Kashkin authored
With #8906 the object types mentioned above were introduced. They control access to code execution over IPROTO. This patch adds such object types support to credentials applier. Now 'execute' can be granted to a user or role for 'lua_eval', 'lua_call' and 'sql'. Note that similar to 'universe', objects can't be specified in the config, only 'all' is allowed. Part of #8967 NO_DOC=documentation request will be filed manually for the whole credentials
-
Vladimir Davydov authored
The new parameters will be implemented in Tarantool Enterprise Edition. This commit just adds configuration stubs. Needed for tarantool/tarantool-ee#502 Needed for tarantool/tarantool-ee#503 NO_DOC=stubs for enterprise edition NO_CHANGELOG=stubs for enterprise edition
-
Vladimir Davydov authored
Let's obtain box.cfg parameters from audit_log_init with cfg_get instead of passing them as arguments, like we do with the security module, for example. This simplifies addition of new audit log parameters. Needed for tarantool/tarantool-ee#502 Needed for tarantool/tarantool-ee#503 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Ilya Verbin authored
During building an index in background, some transaction can perform a dml request that affects space size (e.g. a replace), but the size will remain the same, because bsize is moved from the old space to the new space in memtx_space_prepare_alter() prior to space_execute_dml(). Fix this issue by calling space_finish_alter() in alter_space_do(). In fact, this patch partially reverts commit 9ec3b1a4 ("alter: zap space_vtab::commit_alter"). NO_DOC=bugfix Closes #9247
-
Ilya Verbin authored
Consider the following example: ``` tarantool -e "box.cfg{} require('console').start()" ``` When a local console is exited by pressing Ctrl+D, Tarantool seemingly freezes - console stops to work, typed characters are not echoed. But the event loop is not stopped because there are background fibers running. This patch adds a message that Ctrl+C should be pressed in such a case. Closes #7017 NO_DOC=minor
-
- Oct 12, 2023
-
-
Andrey Saranchin authored
Attaching triggers to space id instead of space object is a significant pitfall. The users who haven't discovered new triggers may not expect the triggers of a dropped space will be fired by a new one. So let's drop triggers that were set with old API along with the space. All the tests, changed because of described above breaking change, are restored. Closes #9223 NO_DOC=later
-
Andrey Saranchin authored
The patch provides event triggers with flags and introduces the first one - EVENT_TRIGGER_IS_TEMPORARY. When the new event_remove_temporary_triggers method is called, all the temporary triggers are removed from the event. Part of #9223 NO_CHANGELOG=internal NO_DOC=internal
-
Nikolay Shirokovskiy authored
This patch also includes: - misc trivial fixes for ASAN discovered issues - minor adaptations for ASAN friendly allocators Closes #7327 NO_DOC=internal NO_CHANGELOG=internal
-
Nikolay Shirokovskiy authored
With new ASAN-friendly small implementation unit/fiber_stack.c test start to fail. The issue is leak sanitizer reports a leak. This is an expected leak of test for mprotect failure on fiber stack destruction. Let's tell sanitizer to ignore this case. By the way let's drop test code for temporary redirecting stderr. It is outdated as test is TAP-compatible. It was a PITA as due to this redirection there was no leak report only error exit code. Part of #7327 NO_CHANGELOG=internal NO_DOC=internal
-
Nikolay Shirokovskiy authored
With ASAN-friendly small allocators there are a lot test failures due to leak reports which are gone if JIT is off. Fortunately all the reports related to a few functions. Let's suppress temporarily such reports. Part of #7327 NO_TEST=internal NO_CHANGELOG=internal NO_DOC=internal
-
Nikolay Shirokovskiy authored
When SMALL_MALLOC_IMPL is defined and ASAN-friendly allocators are used the arena allocator is not used at all as we not allocate memory directly from there. And other ASAN-friendly allocators are not allocate from it too. Thus box.slab.info().arena_size == 0. Same for usage of runtime arena box.runtime.info().used. Also usage with ASAN-friendly lsregion is a bit different as it does not account for size of alignment padding. Thus we need to adapt box.stat.vinyl().memory.level0 tests. Approach is to check for lower and upper limit instead of checking for exact values. Part of #7327 NO_DOC=test changes NO_CHANGELOG=test changes
-
Nikolay Shirokovskiy authored
ASAN-friendly implementation poisons memory after allocation with ibuf_alloc so we need to fix existing places in code where we access memory after allocation. Part of ibuf implementation is inline functions in headers. Thus ibuf implementation in Lua reimplement this parts. We add poison to these inline functions in ASAN-friedly implementation so we need add same poison in Lua implementation. Part of #7327 NO_CHANGELOG=internal NO_DOC=internal
-
Nikolay Shirokovskiy authored
We are going to include generated small_config.h into small allocator headers (currently it is only included in small source files). core/memory.h depends on small headers and salad/heap.h depends on core/memory.h. As a result we need to provide a way for salad/heap.h users to find small_config.h header. Instead let's drop dependency from core/memory.h as we only use it for typeof definition. Part of #7327 NO_CHANGELOG=code cleanup NO_DOC=code cleanup
-
Nikolay Shirokovskiy authored
If leak sanitizer reaches the memory protected from read with mprotect it exhibits all sorts of odd behaviour. It can hang, can crash, can return errors with no leak backtraces. We use mprotect to create guard zones at the end of fiber stack so if stack is overflowed we get a signal and crash. We take protection off when fiber is destroyed. Unfortunately we do not destroy cords (and its fibers) which cancelled through cord_cancel_and_join. This is going to be addressed in patch for issue #8423 ("Get rid of pthread_cancel()"). Until that moment let's disable protection for ASAN builds. Note that we did not hit this behaviour before because LSAN only scans memory allocated using malloc and regular slab cache uses mmap to get memory. Part of #7327 NO_CHANGELOG=internal NO_DOC=internal
-
Nikolay Shirokovskiy authored
Regularly fiber stack slab is page aligned. So upper stack border is page aligned too when stack grows down. But with ASAN friendly slab cache implementation this border is not page aligned. As a result madvise call on stack may zero memory beyond stack slab which will cause heap corruption. In debug build corruption is detected by assertion: NO_WRAP > Fatal glibc error: malloc.c:2593 (sysmalloc): assertion failed: (old_top > == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= > MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize > - 1)) == 0) NO_WRAP Interestingly enough the issue can not be investigated using ASAN. The memory is zeroed by kernel code which is not instrumented so it is invisible for sanitizer. Looks like non-ASAN builds are not affected. Even if stack_size is not page aligned the slab allocated for stack is page aligned. Thus memory zeroing will be inside the slab and there will be no memory corruption. Also when stack grows up lower stack border in not aligned even with regular small implementation. So madvise call will fail with EINVAL as it is required that start address is page aligned. We ignore the error though. Let's fix this issue too while we at it. Let's introduce fiber_madvise_aligned to align madvise range with proper direction before calling madvise(2). To justify its usage note that besides fixing the issues described above, in case of stack growing down fiber->stack is page aligned and in case of stack growing up fiber->stack + fiber->stack_size is page aligned. Part of #7327 NO_TEST=tested by ASAN (debug build) NO_CHANGELOG=has effect only with newly introduced ASAN friendly slab cache NO_DOC=has effect only with newly introduced ASAN friendly slab cache
-
Nikolay Shirokovskiy authored
The unpoison was added in the initial commit 1.7.2-68-gafd229393 that supported ASAN. It is not clear why do we need it as we don't poison stack memory manually. Part of #7327 NO_TEST=removing unfunctional code NO_CHANGELOG=removing unfunctional code NO_DOC=removing unfunctional code
-
Nikolay Shirokovskiy authored
ASAN small object allocator implementation has a bit different pattern on quota leasing on allocating memory. So we may need to allocate more objects to hit the quota etc. Part of #7327 NO_CHANGELOG=test tuning NO_DOC=test tuning
-
Nikolay Shirokovskiy authored
The reason check is different for ASAN and regular versions of obuf. Part of #7327 NO_DOC=internal NO_CHANGELOG=internal NO_TEST=<will be tested by asan-debug CI>
-
- Oct 11, 2023
-
-
Oleg Chaplashkin authored
These tests fail after the commit [1] has been added to the Luatest: - app-luatest/gh_8083_fatal_signal_handler_test.lua - app-luatest/gh_8445_crash_during_crash_report_test.lua - box-luatest/gh_7434_yield_in_on_shutdown_trigger_test.lua The issue is due to lack of necessary directories: sh: 1: cd: can't cd to /tmp/t/001_app-luatest/server-XXX Just update tests on the simple `fio` module instead `luatest.server`. [1] tarantool/luatest@7d1358c NO_CHANGELOG=internal NO_DOC=internal
-
Oleg Chaplashkin authored
Bump test-run to new version with the following improvements: - luatest: bump luatest to 0.5.7-48-g18859f6 [1] - Adapt use luatest with new --no-clean option [2] - luatest: bump luatest to 0.5.7-49-g9c7710e [3] [1] tarantool/test-run@aa3b34d [2] tarantool/test-run@8ebb3aa [3] tarantool/test-run@82542d3 NO_DOC=test NO_TEST=test NO_CHANGELOG=test
-
Andrey Saranchin authored
The commit moves on_shutdown triggers to the trigger registry. The triggers set by C API and internal triggers remain unchanged - only Lua user triggers are affected. Changelog entry of #8657 is populated with box.ctl triggers and is slightly improved. Closes #8657 NO_DOC=later
-
Andrey Saranchin authored
Function trigger_fiber_run is used only for on_shutdown triggers and uses internal structure run_list. This structure is another list but all the triggers are popped from run_list instead of iteration because this approach is safe when triggers are deleted from the list that is being run. Also, new triggers are not inserted to run_list. Since we are running only on_shutdown triggers, which won't be used after they are fired, we can move all the triggers to an internal trigger list (so that no new triggers will appear) and pop them instead of iteration. So let's remove function trigger_fiber_run and run on_shutdown core triggers in a new special function. Later, this new function will run triggers from on_shutdown event as well. Part of #8657 NO_TEST=no behavior changes NO_CHANGELOG=later NO_DOC=later
-
Andrey Saranchin authored
The patch moves all triggers from box.ctl to module trigger instead of on_shutdown trigger - they are run in separate fibers, which makes it more difficult to move it to the event subsystem, so it will be moved there in a separate commit. Also, box_raft_on_broadcast triggers are renamed to box_raft_on_election. Despite they are fired on broadcast, the only place they are installed along the whole tarantool organization is box.ctl.on_election. NO_DOC=later NO_CHANGELOG=later Part of #8657
-
Nikolay Shirokovskiy authored
The test start to fail in CI on osx_debug (x86_64) workflow ``` [033] *** test_buffer_foreach_copy_number *** [033] -ok 13 - prbuf(size=256, payload=16, iterations=16) has been validated [033] -ok 14 - prbuf(size=256, payload=16, iterations=32) has been validated [033] -ok 15 - prbuf(size=256, payload=16, iterations=64) has been validated [033] +ok 13 - prbuf(size=256, payload=4294967312, iterations=16) has been validated [033] +ok 14 - prbuf(size=256, payload=4294967312, iterations=32) has been validated [033] +ok 15 - prbuf(size=256, payload=4294967312, iterations=64) has been validated [033] *** test_buffer_foreach_copy_number: done *** ``` NO_CHANGELOG=test fix NO_DOC=test fix
-
- Oct 10, 2023
-
-
Yaroslav Lobankov authored
Tarantool packages don't provide `tarantoolctl` since series 3. So there is nothing to test. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Pavel Balaev authored
This patch fixes issue: $ tarantoolctl rocks --version 1>/dev/null Warning: failed to load command module luarocks.cmd.help NO_DOC=bugfix NO_CHANGELOG=not released yet
-
Mergen Imeev authored
Before this patch, if an index was created due to a column's UNIQUE constraint or a column's PRIMARY KEY constraint before adding a collation, and if the column's fieldno was not equal to the index's position in space->index, the collation would not be assigned to the index. Also, this patch fixes an assertion in debug build for the case when an index with more that one field was created before a collation was added. Closes #9229 NO_DOC=bugfix
-
Magomed Kostoev authored
Because of inlining rules some parts of comparators aren't optimized properly by the gcc compiler, this causes a regression introduced by the sort order implementation. This patch introduces inline hints for the compiler in order to mitigate the regression. perf/tuple.cc test results (RelWithDebInfo, time in nanoseconds): Tiger Lake gcc 11.4.0: Base After #8915 Patched tuple_tuple_compare 40.5 41.5 (+2.5%) 39.4 (-2.7%) tuple_tuple_compare_hint 43.0 33.5 (-22.1%) 35.9 (-16.5%) clang 14.0.0: Base After #8915 Patched tuple_tuple_compare 25.7 25.1 (-2.3%) 25.7 tuple_tuple_compare_hint 33.1 32.5 (-1.8%) 33.1 Zen 3 gcc 11.4.0: Base After #8915 Patched tuple_tuple_compare 18.9 22.85 (+20.9%) 19.4 (+2.6%) tuple_tuple_compare_hint 24.25 22.95 (-5.4%) 23.5 (-3.1%) clang 14.0.0: Base After #8915 Patched tuple_tuple_compare 17.3 17.0 (-1.7%) 17.0 (-1.7%) tuple_tuple_compare_hint 20.3 20.1 (-1.0%) 20.1 (-1.0%) Closes #9216 NO_DOC=no code modification NO_TEST=no code modification NO_CHANGELOG=no code modification
-
Vladimir Davydov authored
The new option is backed by `box.cfg.secure_erasing`. It is available only in Enterprise Edition builds. Needed for tarantool/tarantool-ee#540 NO_DOC=will be added to Enterprise Edition NO_CHANGELOG=will be added to Enterprise Edition
-
Vladimir Davydov authored
We call xdir_collect_inprogress() at startup to clean up the xlog directory of files left from the previous run. Let's rename it to xdir_remove_temporary_files() and make it delete all files for which the new callback function xlog_file_is_temporary() returns true. By default, the callback returns true only for .inprogress files but it can be overridden to make xdir_remove_temporary_files() delete other kinds of files. This is required for thorough file deletion. Needed for tarantool/tarantool-ee#540 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
This commit introduces the xlog_remove_file() function that removes a file by name and logs the error on failure. We use this function everywhere we delete xlog files so that there's a single place where we call unlink(). We also factor out the core functionality to a callback function that can be overridden. This will help us implement thorough file deletion. Needed for tarantool/tarantool-ee#540 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
Currently, vy_run_remove_files calls coio several times under the hood - once per each run file and data directory. Apart from being inefficient, this also prevents us from adding some extra logic for thorough file deletion. So let's perform all the operations in a single coio call. Needed for tarantool/tarantool-ee#540 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
- Oct 09, 2023
-
-
Mergen Imeev authored
The structure is no longer used, so it is dropped. Follow-up #9112 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Mergen Imeev authored
This patch introduces variations of DROP CONSTRAINT with a declared constraint type. Closes #9112 @TarantoolBot document Title: upgrade of DROP CONSTRAINT Now, instead of just `ALTER TABLE table DROP CONSTRAINT constraint;` we have 8 operator variants: 1) Statement to drop PRIMARY KEY, UNIQUE, tuple FOREIGN NEY or tuple CHECK constraints: ``` ALTER TABLE tab_name DROP CONSTRAINT constr_name; ``` This statement cannot drop a constraint if `constr_name` matches more than one constraint. 2) Statement to drop field FOREIGN NEY or field CHECK constraints: ``` ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name; ``` This statement cannot drop a constraint if `constr_name` matches more than one constraint for the `field_name` field. 3) Statement to drop PRIMARY KEY constraint: ``` ALTER TABLE tab_name DROP CONSTRAINT constr_name PRIMARY KEY; ``` 4) Statement to drop UNIQUE constraint: ``` ALTER TABLE tab_name DROP CONSTRAINT constr_name UNIQUE; ``` 5) Statement to drop tuple FOREIGN KEY constraint: ``` ALTER TABLE tab_name DROP CONSTRAINT constr_name FOREIGN KEY; ``` 6) Statement to drop tuple CHECK constraint: ``` ALTER TABLE tab_name DROP CONSTRAINT constr_name CHECK; ``` 7) Statement to drop field FOREIGN KEY constraint: ``` ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name FOREIGN KEY; ``` 8) Statement to drop field CHECK constraint: ``` ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name CHECK; ```
-
Mergen Imeev authored
This patch prohibits DROP CONSTRAINT if more than one constraint matches a given name. Part of #9112 NO_DOC=will be added later NO_CHANGELOG=will be added later
-
Mergen Imeev authored
This patch introduces "ALTER TABLE table_name DROP CONSTRAINT field_name.constraint_name" which can be used to drop field constraints. Also, after this patch, field constraints cannot be dropped using "ALTER TABLE table_name DROP CONSTRAINT constraint_name;". Part of #9112 NO_DOC=will be added later NO_CHANGELOG=will be added later
-
Mergen Imeev authored
This patch replaces region_alloc() by xregion_alloc() in mp_vformat_on_region(). NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Nikolay Shirokovskiy authored
Similarly to release_asan_clang but to test debug build. It is also run only under `asan-ci` and `full-ci` labels. Fiber stack size is 2 times bigger than in the release workflow for luajit tests to pass. Note that this factor is a wild guess. Part of #7327 NO_TEST=ci NO_CHANGELOG=ci NO_DOC=ci
-
Nikolay Shirokovskiy authored
This test is quite a flaky in debug ASAN build. Let's fix it before turning debug ASAN on in CI. The issue is due to heavy load popen.read may return nil with 'TimedOut: timed out' error. Just read again as in the other cases of this test. Part of #7327 NO_CHANGELOG=internal NO_DOC=internal
-