-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Segmentation Fault Error at indexing blocks [180001..182000] #1061
Comments
error running with gdb: [2024-07-12T16:55:11.385Z INFO electrs::index] indexing 2000 blocks: [180001..182000] Thread 8 "rocksdb:high" received signal SIGSEGV, Segmentation fault. |
Did you link dynamically or statically? |
I linked statically. |
That's really weird, probably has something to do with C++ compilation. Makes me rethink my previous claim that maybe pure Rust impl isn't that interesting. |
When I try to link dynamically i get these errors:
|
Yes, Ubuntu has a different rocksdb version than Debian. I wish they didn't break the API so much. |
Is there anything I could do? |
I don't have many ideas either. Maybe try switching compiler to clang? (If you used g++, or vice-versa). |
@adriankae Does the error reproduce if the index DB is rebuilt from scratch? |
I have the exact same issue. For me it did not help to rebuild the DB from scratch. |
Found the issue for me, I was missing the build-essential package. After installing it and rebuilding electrs it works like a charm. |
How come it even compiled without it?! That's super weird. |
Is this a rocksdb issue? I think somewhere a compile time error should be introduced. |
Confirming the same issue (at same block height) and the same fix OS: Ubuntu 24.04.1 LTS x86_64 |
Just confirming as well that I was seeing the same issue at the same block height on Ubuntu 24.04. Installed "build-essential" and rebuilt electrs (static linking). After that I was able to run it and get past the previously failing block height point. |
I don't think we need more reports, but new people coming to the issue can just thumbs up this comment: #1061 (comment) What would be really helpful is to abort compilation if this is happening but that requires some serious digging and will likely need an issue filed against the If someone figures out more information about this that would explain why this happens that'd be great. Sadly I don't have that much time for this kind of thing lately. |
On Ubuntu 24.04 installing
If I then install
Also, mempool/electrs#106 also stopped using Clang 18. |
Reproduced using a Ubuntu 24.04 Docker container:
with the following diff: diff --git a/Dockerfile b/Dockerfile
index c8ec506e..a6f1dba8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,19 +2,18 @@
# The maintainers of electrs are not deeply familiar with Docker, so you should DYOR.
# If you are not familiar with Docker either it's probably be safer to NOT use it.
-FROM debian:bookworm-slim AS base
+FROM ubuntu:24.04 AS base
RUN apt-get update -qqy
-RUN apt-get install -qqy librocksdb-dev curl
+RUN apt-get install -qqy curl gdb bash
### Electrum Rust Server ###
FROM base AS electrs-build
RUN apt-get install -qqy cargo clang cmake
# Install electrs
WORKDIR /build/electrs
COPY . .
-ENV ROCKSDB_INCLUDE_DIR=/usr/include
-ENV ROCKSDB_LIB_DIR=/usr/lib
RUN cargo install --locked --path .
FROM base AS result |
I can confirm that on FreeBSD, installing
|
Describe the bug
Everytime I start electrs I get a seg fault error at indexing the blocks. Specifically at blocks [180001..182000]. It's always in the same spot.
Any help would be appreciated.
Electrs version
v.0.10.5
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Indexing throws no errors.
Configuration
electrs.toml
Didn't find it in the directory.running with gdb:
Environment variables:
ELECTRS_X=Y;...
Arguments:
--foo
System running electrs
Electrum client
Client name (if not upstream desktop Electrum) and version: no electrum installed
Additional context
n/a
The text was updated successfully, but these errors were encountered: