Commit Briefs

85ac34693c Sergey Bronnikov

cmake: fix build with GCC's AddressSanitizer (ligurio/gh-xxxx-fix-asan-gcc-3.2, origin/ligurio/gh-xxxx-fix-asan-gcc-3.2)

GNU GCC compiler has AddressSanitizer support since 4.8.0 [1], but it was unsupported in tarantool's build. The patch fixes a build by GNU GCC with enabled AddressSanitizer. 1. https://gcc.gnu.org/gcc-4.8/changes.html NO_CHANGELOG=build NO_DOC=build NO_TEST=build (cherry picked from commit ef91f92a22c6d7910ecdd00ab14da359343a2ec2)


7ec19d2985 Alexander Turenko

config: simplify acquiring of instance config

No functional changes, just a little refactoring. The `iconfig` value is already passed into the `validate_names` function and we don't need to calculate it once again. NO_DOC=no functionality added or changed NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC (cherry picked from commit c9a5b74f9f002d77c57d3bb50e58d5dd41dbb72e)


98a2ec27f2 Alexander Turenko

config: simplify acquiring of configured UUIDs

No functional changes, just a little refactoring. We don't need to spin a loop to look up instance/replicaset UUIDs for the given instance. In fact, these values are already acquired in the same function above, reuse them. NO_DOC=no functionality added or changed NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC (cherry picked from commit 4a237bc26c536c50c63fa859b4a279c1f5915f56)


94be5c18ae Alexander Turenko

build: update libcurl to curl-8_10_1-241-g461ce6c61

The reason is that the previous libcurl submodule update in commit 0919f390802f146852b462215327ef03e2730cfc ("third_party: update libcurl from 8.8.0 to 8.10.1") reveals the following regression: NOWRAP ```c $ tarantool -e "require('http.client').new():get('https://google.com') collectgarbage()" tarantool: ./third_party/curl/lib/multi.c:3691: curl_multi_assign: Assertion `!(multi)' failed. Aborted (core dumped) ``` NOWRAP The stacktrace is the following: NOWRAP ```c <...> #4 __assert_fail #5 curl_multi_assign // <- called by us #6 curl_multi_sock_cb // <- this is our callback #7 Curl_multi_pollset_ev #8 cpool_update_shutdown_ev #9 cpool_discard_conn #10 cpool_close_and_destroy_all #11 Curl_cpool_destroy #12 curl_multi_cleanup #13 curl_env_finish // <- destroy the multi handle #14 httpc_env_finish #15 luaT_httpc_cleanup #16 lj_BC_FUNCC #17 gc_call_finalizer #18 gc_finalize #19 gc_onestep #20 lj_gc_fullgc #21 lua_gc #22 lj_cf_collectgarbage #23 lj_BC_FUNCC #24 lua_pcall #25 luaT_call #26 lua_main #27 run_script_f #28 fiber_cxx_invoke #29 fiber_loop #30 coro_init ``` NOWRAP The multi handle is during the destroy, but our `CURLMOPT_SOCKETFUNCTION` callback is invoked and the `curl_multi_assign()` call (invoked to associate a libev watcher to the given file descriptor) fails on the assertion. Everything is as described in https://github.com/curl/curl/issues/15201. The first bad libcurl's commit is [curl-8_10_0-4-g48f61e781][1], but later it was fixed in [curl-8_10_1-241-g461ce6c61][2]. This commit updates libcurl to this revision to fix the regression. Adjusted build options in our build script: * Added `CURL_DISABLE_IPFS=ON`: [curl-8_10_1-57-gce7d0d413][3] * Added `CURL_TEST_BUNDLES=OFF`: [curl-8_10_1-67-g71cf0d1fc][4] * Changed `ENABLE_WEBSOCKETS=OFF` to `CURL_DISABLE_WEBSOCKETS=ON`: [curl-8_10_1-130-gd78e129d5][5] [1]: https://github.com/curl/curl/commit/48f61e781a01e6a8dbc4a347e280644b1c68ab6a [2]: https://github.com/curl/curl/commit/461ce6c6160b86439ddd74c59541231ec9e8558e [3]: https://github.com/curl/curl/commit/ce7d0d41378007eda676c83ad6b86c59870cc9f1 [4]: https://github.com/curl/curl/commit/71cf0d1fca9e1f53524e1545ef0c08d174458d80 [5]: https://github.com/curl/curl/commit/d78e129d50b2d190f1c1bde2ad1f62f02f152db0 NO_DOC=bugfix NO_CHANGELOG=fixes an unreleased commit NO_TEST=can't reproduce without https to add a test case, verified locally (cherry picked from commit fbe6d0a0a40945c42609f5119a007b5c3980c232)


bc5559821a Vladimir Davydov

box: fix UBSan error regarding misaligned store in field_map.c

The type cast is unnecessary and causes false-positive errors: NO_WRAP ``` ./src/box/field_map.c:110:10: runtime error: store to misaligned address 0x507000071082 for type 'uint32_t *' (aka 'unsigned int *'), which requires 4 byte alignment 0x507000071082: note: pointer points here 01 00 00 00 be be be be f0 ff ff ff 02 00 00 00 be be be be be be be be 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ./src/box/field_map.c:110:10 ``` NO_WRAP Closes #10631 NO_DOC=bugfix NO_CHANGELOG=minor NO_TEST=tested by debug_asan_clang workflow (cherry picked from commit 5ddbd85cc377a29dc27d01ad06acdc6acc24cc5b)


52a50b639c Vladimir Davydov

small: bump version

New commits: * mempool: fix UBSan errors regarding misaligned stores NO_DOC=submodule bump NO_TEST=submodule bump NO_CHANGELOG=submodule bump (cherry picked from commit 9dd56f49be85dc8a1fe874629711a828835f740c)


3f555eb550 Vladimir Davydov

box: fix SIGSEGV on unaligned access to a struct with extended alignment

All structures with a non-default alignment (set by `alignas()`) must be allocated by `aligned_alloc()`, otherwise an access to such a structure member fill crash, e.g. if compiled with AVX-512 support. Closes #10215 Part of #10631 NO_DOC=bugfix NO_TEST=tested by debug_asan_clang workflow NO_CHANGELOG=fix is actually not user-visible, because tarantool still doesn't work with enabled AVX-512 (#10671) (cherry picked from commit a60ec82d4f07720148b0724e5feff31f76291b56)


50f29a7281 Vladimir Davydov

Revert "hotfix: change aligned_alloc to posix_memalign"

This reverts commit 3c25c667352ec4f9c733c514a1b8c15264c6ad88. `aligned_alloc()` is supported by macOS since 10.15. I believe that we do not support older versions now. NO_DOC=internal NO_TEST=internal NO_CHANGELOG=internal (cherry picked from commit 2f4594f748cff99d15f8f6d603797a308793de86)


0a493100c4 Alexander Turenko

ci: fix Coverity workflow

It doesn't work since 2023-11-18. The uploading succeeds, but the website says: > The Coverity Build tool version is no longer supported. Please > download the latest version for your platform from > https://scan.coverity.com/download... It seems, some specific toolset is installed in the `tarantool/testing:debian-buster` image and it was deprecated 11 months ago. Recently the CI workflow starts to fail due to use of the old image with an old CMake in it: > [ 2%] Performing configure step for 'bundled-nanoarrow-project' > -- Building using CMake version: 3.13.4 > -- Configuring incomplete, errors occurred! > CMake Error at CMakeLists.txt:19 (cmake_minimum_required): > CMake 3.14 or higher is required. You are running version 3.13.4 It is likely due to commit 49c160c28c97 ("third_party: initial import of nanoarrow"). Here I refine the workflow file: * Get rid of the custom docker image with preinstalled Coverity toolset. * Use a nice unofficial-coverity-scan GitHub Action ([1]). * Add the `libreadline-dev` dependency installation, because it is needed to build tarantool on Ubuntu 24.04. * Drop related `.test.mk` rules, because it looks more readable to invoke a few commands from the workflow file directly. * Drop testing artifacts uploading that seems a copy-paste from some workflow that runs the tests and the given directory unlikely has any file in our case. * Drop unused step that adds a comment to the pull request. And things seems to start working. At least, after a testing run of the workflow now I see the following status on the website: > Last Build Status: Running. Your build is currently being analyzed [1]: https://github.com/marketplace/actions/unofficial-coverity-scan See also #10651. NO_DOC=developer tools NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC (cherry picked from commit f5daacfac84fbea3bb67991fa71ea4e789184ec8)


f6de3eda52 Alexander Turenko

build: don't depend on libidn2

The recent libcurl update in commit 0919f390802f ("third_party: update libcurl from 8.8.0 to 8.10.1") reveals an old problem in our libcurl's build script: it attempts to disable the libidn2 dependency using the `-DHAVE_LIBIDN2=OFF` option instead of `-DUSE_LIBIDN2=OFF`. It doesn't work after a recent curl building machinery change, see https://github.com/curl/curl/pull/14555 This commit fixes the problem by using `-DUSE_LIBIDN2=OFF`. Reported in #10621 NO_DOC=build mechanics fixup NO_CHANGELOG=fixes a non-released commit NO_TEST=verified locally, seems to need an extra work on a separate CI workflow with a particular building environment; no time for that tonight, sorry (cherry picked from commit a4b4158f2196442308aba7df8f8e21b98b5319fc)


Branches



























































































Tags

Tree

.editorconfigcommits | blame
.gdbinitcommits | blame
.gitattributescommits | blame
.github/
.gitignorecommits | blame
.gitmodulescommits | blame
.luacheckrccommits | blame
.pack.mkcommits | blame
.test.mkcommits | blame
AUTHORScommits | blame
CMakeLists.txtcommits | blame
CONTRIBUTING.mdcommits | blame
Doxyfilecommits | blame
Doxyfile.API.incommits | blame
FreeBSD/
LICENSEcommits | blame
README.FreeBSDcommits | blame
README.MacOSXcommits | blame
README.OpenBSDcommits | blame
README.mdcommits | blame
TODOcommits | blame
apk/
asan/
changelogs/
cmake/
debian/
doc/
docker/
extra/
patches/
perf/
rpm/
rump/
src/
static-build/
test/
test-run$commits | blame
third_party/
tools/

README.md

# Tarantool

[![Actions Status][actions-badge]][actions-url]
[![Code Coverage][coverage-badge]][coverage-url]
[![OSS Fuzz][oss-fuzz-badge]][oss-fuzz-url]
[![Telegram][telegram-badge]][telegram-url]
[![GitHub Discussions][discussions-badge]][discussions-url]
[![Stack Overflow][stackoverflow-badge]][stackoverflow-url]

[Tarantool][tarantool-url] is an in-memory computing platform consisting of a
database and an application server.

It is distributed under [BSD 2-Clause][license] terms.

Key features of the application server:

* Heavily optimized Lua interpreter with incredibly fast tracing JIT compiler,
  based on LuaJIT 2.1.
* Cooperative multitasking, non-blocking IO.
* [Persistent queues][queue].
* [Sharding][vshard].
* [Cluster and application management framework][cartridge].
* Access to external databases such as [MySQL][mysql] and [PostgreSQL][pg].
* A rich set of built-in and standalone [modules][modules].

Key features of the database:

* MessagePack data format and MessagePack based client-server protocol.
* Two data engines: 100% in-memory with complete WAL-based persistence and an
  own implementation of LSM-tree, to use with large data sets.
* Multiple index types: HASH, TREE, RTREE, BITSET.
* Document oriented JSON path indexes.
* Asynchronous master-master replication.
* Synchronous quorum-based replication.
* RAFT-based automatic leader election for the single-leader configuration.
* Authentication and access control.
* ANSI SQL, including views, joins, referential and check constraints.
* [Connectors][connectors] for many programming languages.
* The database is a C extension of the application server and can be turned
  off.

Supported platforms are Linux (x86_64, aarch64), Mac OS X (x86_64, M1), FreeBSD
(x86_64).

Tarantool is ideal for data-enriched components of scalable Web architecture:
queue servers, caches, stateful Web applications.

To download and install Tarantool as a binary package for your OS or using
Docker, please see the [download instructions][download].

To build Tarantool from source, see detailed [instructions][building] in the
Tarantool documentation.

To find modules, connectors and tools for Tarantool, check out our [Awesome
Tarantool][awesome-list] list.

Please report bugs to our [issue tracker][issue-tracker]. We also warmly
welcome your feedback on the [discussions][discussions-url] page and questions
on [Stack Overflow][stackoverflow-url].

We accept contributions via pull requests. Check out our [contributing
guide][contributing].

Thank you for your interest in Tarantool!

[actions-badge]: https://github.com/tarantool/tarantool/workflows/release/badge.svg
[actions-url]: https://github.com/tarantool/tarantool/actions
[coverage-badge]: https://coveralls.io/repos/github/tarantool/tarantool/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/tarantool/tarantool?branch=master
[telegram-badge]: https://img.shields.io/badge/Telegram-join%20chat-blue.svg
[telegram-url]: http://telegram.me/tarantool
[discussions-badge]: https://img.shields.io/github/discussions/tarantool/tarantool
[discussions-url]: https://github.com/tarantool/tarantool/discussions
[stackoverflow-badge]: https://img.shields.io/badge/stackoverflow-tarantool-orange.svg
[stackoverflow-url]: https://stackoverflow.com/questions/tagged/tarantool
[oss-fuzz-badge]: https://oss-fuzz-build-logs.storage.googleapis.com/badges/tarantool.svg
[oss-fuzz-url]: https://oss-fuzz.com/coverage-report/job/libfuzzer_asan_tarantool/latest
[tarantool-url]: https://www.tarantool.io/en/
[license]: LICENSE
[modules]: https://www.tarantool.io/en/download/rocks
[queue]: https://github.com/tarantool/queue
[vshard]: https://github.com/tarantool/vshard
[cartridge]: https://github.com/tarantool/cartridge
[mysql]: https://github.com/tarantool/mysql
[pg]: https://github.com/tarantool/pg
[connectors]: https://www.tarantool.io/en/download/connectors
[download]: https://www.tarantool.io/en/download/
[building]: https://www.tarantool.io/en/doc/latest/dev_guide/building_from_source/
[issue-tracker]: https://github.com/tarantool/tarantool/issues
[contributing]: CONTRIBUTING.md
[awesome-list]: https://github.com/tarantool/awesome-tarantool/