influxdata / influxdata/influxdb

influxdb3 start failed

Open
#26,775 0 comments 0 reactions 0 assignees View on GitHub
v3
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Background: When i using docker to deploy influxdb:3-core but influxdb3 process always exited and create a dump file

I have already troubleshoot and found that my CPU does not support the `pclmulqdq` instruction set. However, due to the addition of target_feature during compilation, the use of `is_x86_feature_detected` in `crc32fast` always returns true, even if `pclmulqdq` is not supported on the target host

**I want to know when `target_feature=pclmulqdq` has been add?**

__Steps to reproduce:__

- Build Machine: with pclmulqdq cpu flag(Intel I7-13700K)
- Runtime Machine: without pclmulqdq cpu flag(Hygon Genuine x64)

PS: Building & Run both in `influxdb:3-core` image on different machine

1. i get same version source(commit `7617104990a8e2ca4944571cb1dc75bf3e229eba`), change `Cargo.toml` and rebuild it using command: `PYO3_CONFIG_FILE=/root/influxdb/pyo3 cargo build --profile quick-bench`
```toml
[profile.quick-bench]
inherits = "quick-release"
debug = "full"
split-debuginfo = "packed"
strip = "debuginfo"
opt-level = 0
```
2. upload builded file `influxdb3` and `influxdb3.dwp`
3. manural run command `./influxdb3 serve -v --node-id=node0 --object-store=file --data-dir=/var/lib/influxdb3/data --plugin-dir=/var/lib/influxdb3/plugins --verbose` to start debug influxdb3
4. using gdb to analysis dump file `gdb influxdb3 -s influxdb3.dwp -c core-influxdb3-4285-1756986671.dmp`

Image

Image

Image

Image

Image

5. This is content of `target/.rustc_info.json` after build influxdb3
```
{"rustc_fingerprint":142783050804198419,"outputs":{"7135727322766414626":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/root/.rustup/toolchains/1.89-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"avx\"\ntarget_feature=\"avx2\"\ntarget_feature=\"bmi1\"\ntarget_feature=\"bmi2\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"f16c\"\ntarget_feature=\"fma\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"lzcnt\"\ntarget_feature=\"movbe\"\ntarget_feature=\"pclmulqdq\"\ntarget_feature=\"popcnt\"\ntarget_feature=\"rdrand\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"sse4.1\"\ntarget_feature=\"sse4.2\"\ntarget_feature=\"ssse3\"\ntarget_feature=\"xsave\"\ntarget_feature=\"xsaveopt\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\ntokio_unstable\nunix\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.89.0 (29483883e 2025-08-04)\nbinary: rustc\ncommit-hash: 29483883eed69d5fb4db01964cdf2af4d86e9cb2\ncommit-date: 2025-08-04\nhost: x86_64-unknown-linux-gnu\nrelease: 1.89.0\nLLVM version: 20.1.7\n","stderr":""},"16488640319298594179":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/root/.rustup/toolchains/1.89-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
```
6. When i retry build with `target-feature=-pclmulqdq`, influxdb3 will normal started.
`RUSTFLAGS="-C target-feature=-pclmulqdq" PYO3_CONFIG_FILE=/root/influxdb/pyo3 cargo build --profile release`

so i want to know why?

Contributor guide

Open the contributing guide

Research direction

Start with Cargo.toml and the crc32fast dependency, then inspect target/.rustc_info.json from the reported builds and compare the compiler target features. Reproduce with the provided cargo commands on CPUs with and without pclmulqdq, including the -C target-feature=-pclmulqdq workaround. Done means identifying where pclmulqdq enters the build and documenting or correcting the portable build behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, rust
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.