Skip to content
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

Intermittent SIGSEGV in RocksDB jnilib #268

Closed
agarman opened this issue Mar 2, 2017 · 3 comments
Closed

Intermittent SIGSEGV in RocksDB jnilib #268

agarman opened this issue Mar 2, 2017 · 3 comments

Comments

@agarman
Copy link

agarman commented Mar 2, 2017

Expected behavior

mvn test completes successfully in about 10-15 minutes.

Actual behavior

The JVM blew up:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000014afb3b80, pid=77149, tid=0x0000000000059b0b
#
# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [librocksdbjni2577203176943896148.jnilib+0x10b80]  Java_org_rocksdb_RocksDB_getLongProperty__JLjava_lang_String_2I+0x50
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/agarman/src/pulsar/pulsar-broker/hs_err_pid77149.log
2017-03-01 22:40:03,065 - INFO  - [main:TestListener@29] - %%%%%%%%%%%% Before configuration - com.yahoo.pulsar.broker.loadbalance.LoadBalancerTest / setup -- attrs: []
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/bin/sh: line 1: 77149 Abort trap: 6           /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java -Xmx2G -XX:MaxDirectMemorySize=8G -Dio.netty.leakDetectionLevel=advanced -jar /Users/agarman/src/pulsar/pulsar-broker/target/surefire/surefirebooter1269992674620327305.jar /Users/agarman/src/pulsar/pulsar-broker/target/surefire/surefire2614902326644746145tmp /Users/agarman/src/pulsar/pulsar-broker/target/surefire/surefire_7380098213255121419tmp

Steps to reproduce

Intermittent error.

System configuration

Pulsar version: 17630b9

@merlimat
Copy link
Contributor

merlimat commented Mar 2, 2017

This looks like a problem in the JNI wrapper of RocksDB.. even if we were using the API in the wrong way it shouldn't blow up the JVM.

I haven't seen this error locally or on Travis yet. Can you try by updating rocksdbjni dependency to latest version (5.1.2)?

We want to upgrade RocksDB anyway to take advantage of some new features introduced lately.

I think that to fix the new version, it should be enough to add the new dependency in the <dependencyManagement> section of the top level pom.xml:

<dependency>
    <groupId>org.rocksdb</groupId>
    <artifactId>rocksdbjni</artifactId>
    <version>5.1.2</version>
</dependency>

@agarman
Copy link
Author

agarman commented Mar 2, 2017

The error has only occurred once. If I don't see it again for a few weeks, I'll close this issue (or of course you can).

sijie added a commit to sijie/pulsar that referenced this issue Mar 4, 2018
- downloader is writing the package to a temp location
- after a package is downloaded, a hardlink is created to link to the temp file. hardlink will ensure one createLink succeed.
- after the hardlink is created, the temp files can be deleted.

After this change, it allows concurrent downloading without interleaving with each other.
@sijie
Copy link
Member

sijie commented Aug 22, 2018

the rocksdb version has been upgraded to latest rocksdb stable release. so close the issue for now. if it occurs, please open a new issue.

@sijie sijie closed this as completed Aug 22, 2018
hangc0276 pushed a commit to hangc0276/pulsar that referenced this issue May 26, 2021
fixes apache#220

 if using `computeIfAbsent `, `consumerManagerFuture.complete(null)` will store in `consumerTopicManagers`, and `getTopicConsumerManager ` will always get future null cache for key which should getTopic again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants