- Jul 14, 2022
-
-
Ilya Verbin authored
If MP_ERROR contains an error message with invalid UTF-8 sequences, encode it in Base64 to obtain printable string. Closes #6781 Closes #6934 NO_DOC=bugfix
-
Ilya Verbin authored
Currently the call to internal.format_lua in format_lua_value is covered by pcall only for `status == true`, however the opposite case also can raise an exception. This patch adds the missed exception handling. Part of #6781 Part of #6934 NO_DOC=bugfix NO_CHANGELOG=minor bug NO_TEST=not possible to trigger format_lua failure for !status
-
Ilya Verbin authored
lua_encode can raise an exception (e.g. from luaL_checkfield) or return `nil, err` result. Handle it in lbox_console_format_lua, similar to lbox_console_format_yaml. When fixed, it will expose another issue - nil value can not be serialized: ``` tarantool> \set output lua true; tarantool> 1, nil, 2 1, {error = "console: exception while formatting the output: \"serializer: unexpected data (nd.field.size 0 nd.field.type 5)\""}, 2; tarantool> ``` Fix this too. Part of #6781 Part of #6934 NO_DOC=bugfix NO_TEST=not a visible change NO_CHANGELOG=not a visible change
-
Ilya Verbin authored
Currently the call to internal.format_yaml in output_handlers["yaml"] is covered by pcall only for `status == true`, however the opposite case also can raise an exception. This patch adds the missed exception handling. Two distinct calls are required, because it is not possible to assing variadic arguments (...) to a variable if some of them is nil. If the first call fails, internal.format_yaml will be called for the second time. Hopefully, it will not fail during formatting of the error message received from libyaml. Before: ``` tarantool> require('net.box').self:call('\x80') LuajitError: builtin/box/console.lua:710: expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS fatal error, exiting the event loop ~/test$ echo $? 0 ~/test$ ``` After: ``` tarantool> require('net.box').self:call('\x80') --- - error: 'console: an exception occurred when formatting the output: expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS' ... tarantool> ``` Part of #6781 Part of #6934 NO_DOC=bugfix NO_TEST=see later commits NO_CHANGELOG=see later commits
-
Ilya Verbin authored
This patch adds a missed check for `lua_yaml_encode` return value, similar to the check in `console_dump_plain`. Now Lua error is raised if YAML encoding failed for any reason (e.g. OOM or formatting error). Before: ``` tarantool> box.error.new(box.error.ILLEGAL_PARAMS, '\x80') ~/test$ echo $? 0 ~/test$ ``` After: ``` tarantool> box.error.new(box.error.ILLEGAL_PARAMS, '\x80') --- - error: 'console: an exception occurred when formatting the output: expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS' ... tarantool> ``` Part of #6781 Part of #6934 NO_DOC=bugfix NO_TEST=see later commits NO_CHANGELOG=see later commits
-
Serge Petrenko authored
The upgrade script first tries to determine if the node is booted from old snaps not recoverable on current Tarantool versions. If this is the case, it sets up special triggers so that snaps are automatically converted to a suitable format. This happens before box.cfg{}, so the workdir is not set at this point in time, and the upgrade script should take configured work_dir into account explicitly. Fix this. Closes #7232 NO_DOC=bugfix
-
- Jul 12, 2022
-
-
Mergen Imeev authored
Prior to this patch, some opcodes could use a pointer to struct space that was set during parsing. However, the pointer to struct space is not really something that defines spaces. A space can be identified by its ID or name. In most cases, specifying space by pointer works fine, but truncate() changes the pointer to space, resulting in a sigfault for prepared statements using the above opcodes. To avoid this problem, a new opcode has been introduced. This opcode uses the space ID to determine the pointer to the struct space at runtime and stores it in the MEM, which is later used in the mentioned opcodes. Closes #7358 NO_DOC=bugfix
-
Mergen Imeev authored
Opcode IteratorReopen is not used and should be dropped. Part of #7358 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
We used to use it for allocating functional keys, but now we allocate those as tuples. Let's drop the legacy infrastructure and make alloc and free MemtxAllocator methods private. Follow-up #7376 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
Functional index keys are allocated and freed with MemtxAllocator's alloc and free methods. In contrast to tuples, which are allocated and freed with alloc_tuple and free_tuple, freeing a functional index key happens immediately, irrespective of whether there's a snapshot in progress or not. It's acceptable, because snapshot only uses primary indexes, which can't be functional. However, to reuse the snapshot infrastructure for creating general purpose user read views, we will need to guarantee that functional index keys stay alive until all read views using them are closed. To achieve that, this commit turns functional index keys into tuples, which automatically makes them linger if there's an open read view. We use the same global tuple format for allocating functional keys, because the key format is checked in key_list_iterator_next. Closes #7376 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Alexander Turenko authored
Without CA certificates the HTTP client will unable to verify server's certificate, so the only way to perform an HTTPS request would be use the `verify_peer = false` option -- disable certificate validation at all. The runtime search of system CA bundle/certificates was unintentionally disabled in 2.10.0 (PR #7119). The patch enabled is back. The main motivation behind the runtime search is difference in paths on different systems. Since we ship Tarantool Enterprise Edition as executable with ability to run on different Linux distributions, we can't choose one particular path at build time. See details in #5746. The `CURL_CA_BUNDLE_SET` and `CURL_CA_PATH_SET` options were removed, because they are not 'real' curl configuration options, but rather cached values to don't repeat file/directory search at re-configuration. It looks as internal logic of Curl's CMake script. NO_DOC=Lack of proper HTTPS support is definitely broken behavior, there is no sense to document it or the opposite. NO_TEST=A simple test would require to send a request to external host. It would not work without internet connection or in a sandbox. Such test also would be unstable and would fail from time to time due to network conditions. I verified the patch manually. I have an idea to add more thorough http client testing later. Fixes #7372
-
- Jul 11, 2022
-
-
Ilya Verbin authored
fiber_wakeup has been adapted to spurious wakeups, so this protection is no longer needed. Part of #7166 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Ilya Verbin authored
Currently the latch doesn't guarantee the order in which it is acquired by fibers, which requested it. E.g. it is possible to wake up spuriously a fiber which is yielding in the latch_lock, it will be removed from l->queue by fiber_make_ready, then it will be inserted to l->queue again, but for this time, to the head of the list instead of its original place in the queue. Fix this by using latch_waiter structure, which is linked into l->queue. Part of #7166 @TarantoolBot document Title: Update box_latch_lock description Since: 2.11 Add "Locks are acquired in the strict order as they were requested." to the box_latch_lock description in C API reference - Module latch.
-
- Jul 08, 2022
-
-
Yaroslav Lobankov authored
This patch fixes the following error while tarantool build on FreeBSD 13.1: [100%] Linking CXX executable watcher.test ld: error: undefined symbol: set_sigint_cb >>> referenced by console.c:261 (lua/console.c:261) >>> console.c.o:(lbox_console_readline) in archive ../../src/box/libbox.a >>> referenced by console.c:342 (lua/console.c:342) >>> console.c.o:(lbox_console_readline) in archive ../../src/box/libbox.a >>> referenced by console.c:352 (lua/console.c:352) >>> console.c.o:(lbox_console_readline) in archive ../../src/box/libbox.a >>> referenced 1 more times c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: *** [test/unit/CMakeFiles/watcher.test.dir/build.make:152: test/unit/watcher.test] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:10528: test/unit/CMakeFiles/watcher.test.dir/all] Error 2 gmake: *** [Makefile:156: all] Error 2 NO_DOC=minor changes NO_TEST=minor changes NO_CHANGELOG=minor changes
-
Vladimir Davydov authored
The gh_6565 test doesn't stop the hot standby replica it started, because the replica should fail to initialize and exit eventually anyway. However, if the replica lingers until the next test due to https://github.com/tarantool/test-run/issues/345, the next test may successfully connect to it, which is likely to lead to a failure, because UNIX socket paths used by luatest servers are not randomized. For example, here gh_6568 test fails after gh_6565, because it uses the same alias for the test instance ('replica'): NO_WRAP [008] vinyl-luatest/gh_6565_hot_standby_unsupported_> [ pass ] [008] vinyl-luatest/gh_6568_replica_initial_join_rem> [ fail ] [008] Test failed! Output from reject file /tmp/t/rejects/vinyl-luatest/gh_6568_replica_initial_join_removal_of_compacted_run_files.reject: [008] TAP version 13 [008] 1..1 [008] # Started on Fri Jul 8 15:30:47 2022 [008] # Starting group: gh-6568-replica-initial-join-removal-of-compacted-run-files [008] not ok 1 gh-6568-replica-initial-join-removal-of-compacted-run-files.test_replication_compaction_cleanup [008] # builtin/fio.lua:242: fio.pathjoin(): undefined path part 1 [008] # stack traceback: [008] # builtin/fio.lua:242: in function 'pathjoin' [008] # ...ica_initial_join_removal_of_compacted_run_files_test.lua:43: in function 'gh-6568-replica-initial-join-removal-of-compacted-run-files.test_replication_compaction_cleanup' [008] # ... [008] # [C]: in function 'xpcall' [008] replica | 2022-07-08 15:30:48.311 [832856] main/103/default.lua F> can't initialize storage: unlink, called on fd 30, aka unix/:(socket), peer of unix/:(socket): Address already in use [008] # Ran 1 tests in 0.722 seconds, 0 succeeded, 1 errored NO_WRAP Let's fix this by explicitly killing the hot standby replica. Since it could have exited voluntarily, we need to use pcall, because server.stop fails if the instance is already dead. This issue is similar to the one fixed by commit 85040161 ("test: stop server started by vinyl-luatest/update_optimize test"). NO_DOC=test NO_CHANGELOG=test
-
Nikolay Shirokovskiy authored
Handle status header response like 'HTTP/2 200' with version without dot. Closes #7319 NO_DOC=bugfix
-
Nikolay Shirokovskiy authored
Parser does not change its input data on parsing and it's caller as well. NO_DOC=internal NO_CHANGELOG=internal NO_TEST=refactoring
-
Nikolay Shirokovskiy authored
We use LuaJIT 'bit' module for bitwise operations. Due to platform interoperability it truncates arguments to 32bit and returns signed result. Thus on granting rights using bit.bor to admin user which have 0xffffffff rights (from bootstrap snapshot) we get -1 as a result. This leads to type check error given in issue later in execution. Closes #7226 NO_DOC=minor bugfix
-
Yaroslav Lobankov authored
This patch fixes the following error on OSX systems: autoreconf: error: aclocal failed with exit status: 2 make[3]: *** [build/curl/work/stamp/bundled-libcurl-project-configure] Error 2 make[2]: *** [CMakeFiles/bundled-libcurl-project.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs.... To resolve this issue we need to install the `autoconf`, `automake`, and `libtool` packages before tarantool build. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Yaroslav Lobankov authored
Installing the `autoconf` and `automake` packages is not enough. We need to install the `libtool` package as well to avoid errors like this: configure:7323: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure:7324: error: possibly undefined macro: AC_PROG_LIBTOOL autoreconf: /usr/bin/autoconf failed with exit status: 1 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Yaroslav Lobankov authored
The issue was in the `deps_freebsd` target that installed test-run deps (py38-yaml, py38-six, py38-gevent) via the `pkg` package manager. At some moment these packages were upgraded to 39 version on the mirrors and became not available for installation anymore. Now test-run deps are installed via `pip` package installer to avoid such issues in the future. Installation via `pip` is more robust because we have deps versions pinned in test-run and also we have python version pinned to 3.8. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Vladimir Davydov authored
Passing format->is_temporary to MemtxAllocator::free_tuple complicates the allocator API and the code using it. Let's introduce a per tuple flag for such tuples. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
Currently, we call memtx_enter_delayed_free_mode() per each index, in index::create_snapshot_iterator(), but there's actually no need to bump the snapshot_version more than once per snapshot. Let's move it to the place where we start checkpoint/join and drop memtx wrappers around memtx_allocators functions. This will simplify reworking the memtx read view API, see #7364. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
Let's hide all the logic regarding delayed freeing of memtx tuples to MemtxAllocator and provide memtx_engine with methods for allocating and freeing tuples (not memtx_tuples, just generic tuples). All the tuple and snapshot version manipulation stuff is now done entirely in MemtxAllocator. This is a preparation for implementing a general-purpose tuple read view API in MemtxAllocator, see #7364. Note, since memtx_engine now deals with the size of a regular tuple, which is 4 bytes less than the size of memtx_tuple, this changes the size reported by OOM messages and the meaning of memtx_max_tuple_size, which now limits the size of a tuple, not memtx_tuple. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
It isn't necessary to prefix all static class members with the class name specifier in the class methods. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Sergey Bronnikov authored
Changelog: https://curl.se/changes.html#7_84_0 New release contains fixes for 4 security problems [1]. Patch adds a new option defined in curl build infrastructure with it's default value used in 7.84.0. NOTE: PSL is a Public Suffix List (PSL), it is a list of suffixes used for cookies. 1. https://curl.se/docs/releases.html NO_DOC=libcurl submodule bump NO_TEST=libcurl submodule bump
-
Mergen Imeev authored
This patch fixes a bug where the ANY field type was replaced by the SCALAR field type in the ephemeral space used in ORDER BY. Closes #7345 NO_DOC=bugfix
-
Mergen Imeev authored
After this patch, the result type of arithmetic between two unsigned values will be INTEGER. Closes #7295 NO_DOC=bugfix
-
- Jul 07, 2022
-
-
Yaroslav Lobankov authored
This patch fixes the following error: [ 35%] Performing configure step for 'bundled-libcurl-project' *** Do not use buildconf. Instead, just use: autoreconf -fi ./buildconf: 8: exec: autoreconf: not found To resolve this issue we need to install the `autoconf` and `automake` packages before building. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Ilya Verbin authored
This makes the test more real-life, and allows not to bother in the child process with the memory allocated prior to fork. Closes #7370 NO_DOC=test fix NO_CHANGELOG=test fix
-
Ilya Verbin authored
coio_fill_addrinfo allocates ai_local->ai_addr, which should be freed in case of error. Part of #7370 NO_DOC=bugfix NO_TEST=memory leak NO_CHANGELOG=minor bug
-
Igor Munkin authored
Since "x64/LJ_GC64: Fix fallback case of asm_fuseloadk64()." (42853793ec3e6e36bc0f7dff9d483d64ba0d8d28) is backported into tarantool/luajit trunk, box/bitset.test.lua and box/function1.test.lua tests are no more fragile. Follows up tarantool/tarantool-qa#234 Follows up tarantool/tarantool-qa#235 NO_DOC=test changes NO_CHANGELOG=test changes NO_TEST=test changes
-
- Jul 06, 2022
-
-
Yaroslav Lobankov authored
This patch fixes `box-py/args.test.py` test and allows it to work against tarantool installed from a package. Closes tarantool/tarantool-qa#246 NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Yaroslav Lobankov authored
This patch fixes `app-tap/tarantoolctl.test.lua` test and allows it to work against tarantool installed from a package. Part of tarantool/tarantool-qa#246 NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Yaroslav Lobankov authored
This patch fixes `gh-1700-abort-recording-on-fiber-switch.test.lua` test and allows it to work against tarantool installed from a package. Part of tarantool/tarantool-qa#246 NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Yaroslav Lobankov authored
This patch adds the new `make` test targets to run unit and functional tests independending on each other. In some cases it can be useful. New test targets: * `test-unit` - run unit tests and exit after the first failure * `test-unit-force` - run unit tests * `test-func` - run functional tests and exit after the first failure * `test-func-force` - run functional tests Note, tests for 'small' lib are considered as unit tests as well. Part of tarantool/tarantool-qa#246 NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Yaroslav Lobankov authored
This patch fixes the following issue: Installing collected packages: greenlet, gevent Attempting uninstall: greenlet Found existing installation: greenlet 0.4.15 ERROR: Cannot uninstall 'greenlet'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. make: *** [.travis.mk:86: deps_tests] Error 1 Error: Process completed with exit code 2. This happens because the `python3-gevent` package is installed via the `apt` package manager in some test targets. Let's install test-run deps via `pip` everywhere. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Nikolay Shirokovskiy authored
If readline 'show-mode-in-prompt' is on then test fails because it does not handle prefix added to prompt in this mode. Let's use default (compiled in) readline configuration instead of the one provided by user or system config. NO_DOC=test changes NO_CHANGELOG=test changes NO_TEST=test changes
-
Georgiy Lebedev authored
Current implementation of tracking statements that delete a story has a flaw, consider the following example: tx1('box.space.s:replace{0, 0}') -- statement 1 tx2('box.space.s:replace{0, 1}') -- statement 2 tx2('box.space.s:delete{0}') -- statement 3 tx2('box.space.s:replace{0, 2}') -- statement 4 When statement 1 is prepared, both statements 2 and 4 will be linked to the delete statement list of {0, 0}'s story, though, apparently, statement 4 does not delete {0, 0}. Let us notice the following: statement 4 is "pure" in the sense that, in the transaction's scope, it is guaranteed not to replace any tuple — we can retrieve this information when we check where the insert statement violates replacement rules, use it to determine "pure" insert statements, and skip them later on when, during preparation of insert statements, we handle other insert statements which assume they do not replace anything (i.e., have no visible old tuple). On the contrary, statements 1 and 2 are "dirty": they assume that they replaced nothing (i.e., there was no visible tuple in the index) — when one of them gets prepared — the other one needs to be either aborted or relinked to replace the prepared tuple. We also need to fix relinking of delete statements from the older story (in terms of the history chain) to the new one during preparation of insert statements: a statement needs to be relinked iff it comes from a different transaction (to be precise, there must, actually, be no more than one delete statement from the same transaction). Additionally, add assertions to verify the invariant that the story's add (delete) psn is equal to the psn of the add (delete) statement's transaction psn. Closes #7214 Closes #7217 NO_DOC=bugfix
-
- Jul 05, 2022
-
-
Vladimir Davydov authored
Normally, if a server created by a test isn't stopped it should be forcefully killed by luatest or test-run. For some reason, it doesn't happen sometimes, which may lead to the next test failing to bind, because all test servers that belong to the same luatest suite and have the same alias share the same socket path (although they use different directories). This looks like a test-run or luatest bug. The vinyl-luatest/update_optimize test doesn't stop the test server so because of this test-run/luatest bug, the next vinyl-luatest test fails occasionally: NO_WRAP [001] vinyl-luatest/update_optimize_test.lua [ pass ] [001] vinyl-luatest/gh_6568_replica_initial_join_rem> [ fail ] [001] Test failed! Output from reject file /tmp/t/rejects/vinyl-luatest/gh_6568_replica_initial_join_removal_of_compacted_run_files.reject: [001] TAP version 13 [001] 1..1 [001] # Started on Tue Jul 5 13:30:37 2022 [001] # Starting group: gh-6568-replica-initial-join-removal-of-compacted-run-files [001] master | 2022-07-05 13:30:37.530 [189564] main/103/default.lua F> can't initialize storage: unlink, called on fd 25, aka unix/:(socket), peer of unix/:(socket): Address already in use [001] ok 1 gh-6568-replica-initial-join-removal-of-compacted-run-files.test_replication_compaction_cleanup [001] not ok 1 gh-6568-replica-initial-join-removal-of-compacted-run-files.test_replication_compaction_cleanup [001] # Failure in after_all hook: /home/vlad/.rocks/share/tarantool/luatest/process.lua:100: kill failed: 256 [001] # stack traceback: [001] # .../src/tarantool/tarantool/test/luatest_helpers/server.lua:206: in function 'stop' [001] # ...src/tarantool/tarantool/test/luatest_helpers/cluster.lua:44: in function 'drop' [001] # ...ica_initial_join_removal_of_compacted_run_files_test.lua:34: in function <...ica_initial_join_removal_of_compacted_run_files_test.lua:33> [001] # ... [001] # [C]: in function 'xpcall' [001] # Ran 1 tests in 1.682 seconds, 0 succeeded, 1 errored NO_WRAP Let's fix this by stopping the test server started by the vinyl-luatest/update_optimize test. NO_DOC=test NO_CHANGELOG=test
-