Rocksdb: segfault error when use rockdb on alpline container

Created on 14 May 2018  路  8Comments  路  Source: facebook/rocksdb

Expected behavior

run correctly

Actual behavior

fail with segfault

Steps to reproduce the behavior

I'm trying to use java kafka stream client on an alpine distribution.
When I try to create a feed using this line kStreamBuilder.stream the application fails with error :

Exception in thread "PointOfPresenceService-7a313255-d2d9-4ee1-90f9-8461a6a1af6c-StreamThread-1" java.lang.UnsatisfiedLinkError: /tmp/librocksdbjni3677549492462775026.so: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/librocksdbjni3677549492462775026.so

to fix that, I added this line on my docker file : RUN apk add --update --no-cache gcompat

And now I have thid error :
A fatal error has been detected by the Java Runtime Environment.

see the complete log file. hs_err_pid1.log

Seems there's an issue with the method rocksdb::ParseColumnFamilyOption method.

I don't know if error is on ld-linux-x86-64.so.2 lib or on rockdb.

Can you help?

Most helpful comment

In my testing RocksJava works fine with OpenJDK, Oracle JDK, and IBM JDK. The RocksJava releases we make gave the native libraries compiled against glibc and are not compatible with musl libc.

If you want to run RocksJavs on Alpine (muslc) you will need to build your own binaries.

All 8 comments

It seem that other users has same issue : https://issues.apache.org/jira/browse/KAFKA-4988

This issue seems to occur only when using openjdk 8, with an oracle jdk it's work fine.

According to the call stack, the crash might have to do with option parsing:

C [librocksdbjni7975096892796805077.so+0x3588e5] rocksdb::ParseColumnFamilyOption(std::string const&, std::string const&, rocksdb::ColumnFamilyOptions, bool)+0xc65
C [librocksdbjni7975096892796805077.so+0x3597f5] rocksdb::GetColumnFamilyOptionsFromMapInternal(rocksdb::ColumnFamilyOptions const&, std::unordered_map, std::equal_to, std::allocator > > const&, rocksdb::ColumnFamilyOptions
, bool, std::vector >)+0x5d5
C [librocksdbjni7975096892796805077.so+0x359e98] rocksdb::GetColumnFamilyOptionsFromMap(rocksdb::ColumnFamilyOptions const&, std::unordered_map, std::equal_to, std::allocator > > const&, rocksdb::ColumnFamilyOptions
, bool)+0x18

Alpine uses musl libc, and RocksDB doesn't support musl libc (yet). See #3143 .

CC: @adamretter and @double16, as they seem to have spent some time with RockDB builds on alpine linux.

I get the impression that this can work with an alpine, using the docker image anapsix/alpine-java:8 it works fine. but it uses an oracle jdk.

In my testing RocksJava works fine with OpenJDK, Oracle JDK, and IBM JDK. The RocksJava releases we make gave the native libraries compiled against glibc and are not compatible with musl libc.

If you want to run RocksJavs on Alpine (muslc) you will need to build your own binaries.

@adamretter Should we merge #3143 and provide binaries in our releases? In the meantime I'll close this as it looks like the answer is it's known to be unsupported and #3143 is the followup. Let me know if I misunderstood.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mdcallag picture mdcallag  路  9Comments

mdcallag picture mdcallag  路  3Comments

Kangmo picture Kangmo  路  10Comments

cooljiansir picture cooljiansir  路  4Comments

redmeadowman picture redmeadowman  路  8Comments