- Nov 01, 2022
-
-
Nikolay Shirokovskiy authored
It is same as luaL_dosting but also sets fiber diag. Part of #7447 NO_DOC=internal NO_CHANGELOG=internal
-
Ilya Verbin authored
If a complex (tuple) foreign key is added along with a new field name that participates in that foreign key, the foreign key does not work correctly. This happens because the new name of a local field is added to new_space->def->dict only in ModifySpace::alter, while before that, new_space->def->dict points to the old dictionary with old names (see ModifySpace::alter_def). So when local_field_no is initialized earlier in alter_space_do -> space_create -> tuple_constraint_fkey_init, it's unable to find the new field number in the old dictionary. Fix this by moving `new_def->dict = alter->old_space->def->dict;` from ModifySpace::alter_def() to ModifySpace::alter(). Note that, as before, we refer to the old dictionary from the new space (just put new names into it), because that dict is referenced by existing tuple formats. Closes #7652 NO_DOC=bugfix
-
- Oct 31, 2022
-
-
Sergey Ostanevich authored
The test is expected the replication is broken by the time of the server switch. Apparently, switch won the race, so the expectation is changed for waiting. Closes https://github.com/tarantool/tarantool-qa/issues/271 NO_CHANGELOG=testing NO_DOC=testing NO_TEST=testing
-
Nikolay Shirokovskiy authored
It was disabled in the commit ccfef5fd ("memtx: ignore slab_alloc_granularity < machine word size") to postpone addressing unaligned objects issues. Add PACKED attribute to inform compiler of unaligned objects. We also need to introduce `struct stailq_entry_ptr` to be able to inform compiler that `last` pointer unaligned too. Closes #7422 NO_DOC=internal NO_CHANGELOG=internal
-
Nikolay Shirokovskiy authored
`say_logrotate` does not rotate logs synchronously. It posts tasks to coio which executes them in it's pool thread. On application exit we destroy logs calling `log_destroy`. This function waits for rotate task to finish because if it will free resources immediately then unfinished rotate task can have use-after-free issues. Waiting crashes because at this moment event loop is not running which is required for `fiber_cond_wait` to work. Note that if there is no crash then we will hang forever waiting in `log_destroy` because event loop is not running and `log_rotate_async_cb` will never be executed. Let's use mutexes and conditions instead. It solves both problems with crash and hang. Thanks Vladimir Davydov for idea. Fixes #4450 NO_DOC=bugfix
-
Yaroslav Lobankov authored
Fixes tarantool/tarantool-qa#282 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Nick Volynkin authored
Fixes tarantool/tarantool-qa#281 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
- Oct 28, 2022
-
-
Yaroslav Lobankov authored
Fix the following warning: NO_WRAP Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout NO_WRAP Fixes tarantool/tarantool-qa#279 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Yaroslav Lobankov authored
Fix the following warning: NO_WRAP Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/upload-artifact NO_WRAP Fixes tarantool/tarantool-qa#280 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Vladimir Davydov authored
This commit fixes BEGIN, COMMIT, and ROLLBACK counters in the box.stat() output. Before this commit, they always showed 0. Now, they report the number of started, committed, and rolled back transactions, respectively. Closes #7583 NO_DOC=bug fix
-
Ilya Verbin authored
Currently, if a snapshot contains some correct entries, but doesn't include system spaces, Tarantool crashes with segmentation fault, or for Debug build: void diag_raise(): Assertion `e != NULL' failed. This happens because memtx_engine_recover_snapshot returns -1, while diag is not set. Let's panic instead of a crash. Closes #7800 NO_DOC=bugfix
-
- Oct 27, 2022
-
-
Vladimir Davydov authored
We need this option to implement a basic MT-safe read view C API in the EE repository. Closes #7815 NO_DOC=internal NO_CHANGELOG=internal NO_TEST=will be added to the EE repository
-
Vladimir Davydov authored
We need the options to optionally disable tuple decompression in memtx. Needed for #7815 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
memtx_read_view_opts contains the only flag include_temporary_tuples, which is set to read_view_opts.enable_temporary_spaces. Let's drop this intermediary structure and pass read_view_opts to the allocator instead. NO_DOC=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
needs_FOO looks awkward for a flag name. Let's rename the flags to enable_FOO. The new names will also look better in conjunction with the disable_decompression flag that will be added in the scope of #7815. NO_DOC=internal NO_TEST=internal NO_CHANGELOG=internal
-
- Oct 26, 2022
-
-
Vladimir Davydov authored
0xc1 isn't a valid MsgPack header, but it was allowed by mp_check. As a result, msgpack.decode crashed while trying to decode it. This commit updates the msgpuck library to fix this issue. Closes #7818 NO_DOC=bug fix
-
- Oct 25, 2022
-
-
Nikolay Shirokovskiy authored
So one can easily check current box status. NO_DOC=minor change Closes #7255
-
Vladimir Davydov authored
cord() can't be NULL anymore - it's created on demand if not created explicitly with cord_create(). Follow-up #7814 NO_DOC=code cleanup NO_TEST=code cleanup NO_CHANGELOG=code cleanup
-
Vladimir Davydov authored
We're planning to introduce a basic C API for user read views (EE-only). Like all other box C API functions, the new API functions will use the existing box error C API for reporting errors. The problem is that a read view created using C API should be usable from user threads (started with the pthread lib) while the box error C API doesn't work in user threads, because those threads don't have the cord pointer initialized (a diagnostic area is stored in a cord object). To address this issue, let's create a new cord object automatically on first use of cord() if it wasn't created explicitly. Automatically created object is destroyed at thread exit (to achieve that, we use the C++ RAII concept). Closes #7814 NO_DOC=The C API documentation doesn't say anything about threads. Let's keep it this way for now. We're planning to introduce a new C API to work with threads in C modules. We'll update the doc when it's ready.
-
Serge Petrenko authored
Closes #7797 NO_DOC=security fix NO_TEST=security fix
-
Serge Petrenko authored
getenv() return values cannot be trusted, because an attacker might set them. For instance, we shouldn't expect, that getenv() returns a value of some sane size. Another problem is that getenv() returns a pointer to one of `char **environ` members, which might change upon next setenv(). Introduce a wrapper, getenv_safe(), which returns the value only when it fits in a buffer of a specified size, and copies the value onto the buffer. Use this wrapper everywhere in our code. Below's a slightly decorated output of `grep -rwn getenv ./src --include *.c --include *.h --include *.cc --include *.cpp --include *.hpp --exclude *.lua.c` as of 2022-10-14. `-` marks invalid occurences (comments, for example), `*` marks the places that are already guarded before this patch, `X` mars the places guarded in this patch, and `^` marks places fixed in the next commit: NO_WRAP ``` * ./src/lib/core/coio_file.c:509: const char *tmpdir = getenv("TMPDIR"); X ./src/lib/core/errinj.c:75: const char *env_value = getenv(inj->name); - ./src/proc_title.c:202: * that might try to hang onto a getenv() result.) - ./src/proc_title.c:241: * is mandatory to flush internal libc caches on getenv/setenv X ./src/systemd.c:54: sd_unix_path = getenv("NOTIFY_SOCKET"); * ./src/box/module_cache.c:300: const char *tmpdir = getenv("TMPDIR"); X ./src/box/sql/os_unix.c:1441: azDirs[0] = getenv("SQL_TMPDIR"); X ./src/box/sql/os_unix.c:1446: azDirs[1] = getenv("TMPDIR"); * ./src/box/lua/console.c:394: const char *envvar = getenv("TT_CONSOLE_HIDE_SHOW_PROMPT"); ^ ./src/box/lua/console.lua:771: local home_dir = os.getenv('HOME') ^ ./src/box/lua/load_cfg.lua:1007: local raw_value = os.getenv(env_var_name) X ./src/lua/init.c:575: const char *path = getenv(envname); X ./src/lua/init.c:592: const char *home = getenv("HOME"); * ./src/find_path.c:77: snprintf(buf, sizeof(buf) - 1, "%s", getenv("_")); ``` NO_WRAP Part-of #7797 NO_DOC=security
-
- Oct 24, 2022
-
-
Mergen Imeev authored
This patch fixes the issue described in issue #5310 when the tuple format has more fields than the space format. This solution is more general than the solution in 89057a21. Follow-up #5310 Closes #4666 NO_DOC=bugfix
-
- Oct 21, 2022
-
-
Georgiy Lebedev authored
Since our diagnostics use the `__FILE__` macro, they provide absolute paths, which is kind of redundant and inconsistent: replace them with relative ones. As for debugging information, replacing absolute paths with relative ones also requires an extra command to tell the debugger where to find the source files, which is not convenient for developers: provide a new `DEV_BUILD` option (turned off by default), which replaces absolute paths with relative ones in debugging information if turned off. Strip the prefix map flags from compiler flags exported to tarantool via `src/trvia/config.h`. Closes #7808 NO_DOC=<verbosity> NO_TEST=<verbosity>
-
Georgiy Lebedev authored
Fixes bug with determination of debug build (tarantool/test-run#352). NO_CHANGELOG=<internal submodule version update> NO_TEST=<submodule version update> NO_DOC=<submodule version update>
-
Georgiy Lebedev authored
Setting hardening compiler flags is used in three places: default build, static build and enterprise build — refactor it into a separate module. Follow-up e6abe1c9 NO_CHANGELOG=refactoring NO_DOC=refactoring NO_TEST=refactoring
-
Georgiy Lebedev authored
e6abe1c9 passes compiler flags to dependencies via a `<project>_build` macro parameter, which is, firstly, inconvenient, and, secondly, as a result, not all dependencies got the required compiler flags passed: use global variables instead and pass these flags to skipped dependencies. Follow-up e6abe1c9 NO_CHANGELOG=refactoring NO_DOC=refactoring NO_TEST=refactoring
-
Georgiy Lebedev authored
`add_compile_flags` macro relied on undefined behaviour: instead of unsetting the `_lang` and `_flag` variables, it tried to unset their values — fix this. NO_CHANGELOG=build NO_DOC=build NO_TEST=build
-
- Oct 20, 2022
-
-
Igor Munkin authored
Add missing .gitignore entry for autogenerated .lua.c translation units located in <third_party/lua> directory. Follows up #7593 NO_DOC=.gitignore NO_TEST=.gitignore NO_CHANGELOG=.gitignore Signed-off-by:
Igor Munkin <imun@tarantool.org>
-
Andrey Saranchin authored
If we raise different errors in case of entering an invalid password and entering the login of a non-existent user during authorization, it will open the door for an unauthorized person to enumerate users. So let's unify raised errors in the cases described above. Closes #tarantool/security#16 NO_DOC=security fix
-
- Oct 19, 2022
-
-
Sergey Bronnokov authored
Information about test code coverage is useful on code review. This patch enables code coverage job in default ci. NO_CHANGELOG=not a user-visible change NO_DOC=not a user-visible change NO_TEST=ci
-
Vladimir Davydov authored
This is a straightforward patch that makes the read view iterator struct fixed-size so that it can be allocated on stack. This is a pre-requisite for the raw C API for read views: the function that creates an iterator should allocate no memory. Closes #7813 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Timur Safin authored
At the moment we are not yet compatible with readline support inside of Tarantool console. Diagnose that situation at the moment debugger started and bail out. NO_TEST=interactive NO_DOC=Markdown updated
-
Timur Safin authored
NO_TEST=see it elsewhere Part of #7593 @TarantoolBot document Title: Console debugger for Lua Console debugger luadebug.lua ============================== Module `luadebug.lua` is available as console debugger of Lua scripts. It's activated via: ``` local debugger = require 'luadebug' debugger() ``` Originally we have used 3rd-party code from slembcke/debugger.lua but significantly refactored since then. Currently available console shell commands are: ``` c|cont|continue - continue execution d|down - move down the stack by one frame e|eval $expression - execute the statement f|finish|step_out - step forward until exiting the current function h|help|? - print this help message l|locals - print the function arguments, locals and upvalues n|next|step_over - step forward by one line (skipping over functions) p|print $expression - execute the expression and print the result q|quit - exit debugger s|st|step|step_into - step forward by one line (into functions) t|trace|bt - print the stack trace u|up - move up the stack by one frame w|where $linecount - print source code around the current line ``` Console debugger `luadebug.lua` allows to see sources of builtin Tarantool module (e.g. `@builtin/datetime.lua`), and it uses new function introduced for that purpose `tarantool.debug.getsources()`, one could use this function in any external GUI debugger (i.e. vscode or JetBrains) if need to show sources of builtin modules while they have been debugged. > Please see third_party/lua/README-luadebug.md for a fuller description > of an original luadebug.lua implementation.
-
Timur Safin authored
Created luatest test for interactive debugger luadebug.lua. We use separate debug-target.lua for execution under control of debugger session. NO_DOC=test NO_CHANGELOG=test
-
Timur Safin authored
Number of 'call' hook invocations is always greater than number of 'return' hook events. (i.e. ffi functions does use `call` but there is no `return`. Same is for builtin functions like `assert` or `error`). We count number of stack frames available, and stop once level is once again less or equal to the necessary one. Math.huge is used to stop on each line (trace mode). NO_CHANGELOG=internal NO_DOC=internal NO_TEST=internal
-
Timur Safin authored
Do not use non-standard DBG_NOCOLOR, but use NO_COLOR [^1] for disabling color output on terminals. [^1]: https://no-color.org/ NO_DOC=later NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
Show debugger header only when repl is called. NO_TEST=bugfix NO_DOC=bugfix NO_CHANGELOG=bugfix
-
Timur Safin authored
Create command matcher and help map using convenient builder function. Commands described in a form: ``` {'f.inish|step_out', 'step out', cmd_finish}, {'p.rint $expression', 'execute the expression', cmd_print}, ``` where we could introduce multiple aliases, commands with arguments, commands descriptions and function handlers. NO_DOC=internal NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
- refactor setmetatable usage to be more idiomatic; - get rid of hardcode of `luadebug.lua` and use DEBUGGER instead. It will be necessary later for controlling of a name displayed by shell; - refactor colored output facilities. NO_TEST=refactoring NO_DOC=refactoring NO_CHANGELOG=refactoring
-
Timur Safin authored
Get rid of all irrelevant for the Tarantool code: - branches of code for non-LuaJIT interpreter; - LuaJIT, but Windows-specific code; - luadebug.lua (former debugger.lua) readline functions were incompatible with Tarantool console readline, so disable it entirely; - Also fixed multiple luacheck warnings. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-