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

Testing opening a transaction when the DB is deleted crashes in spectacular fashion in 2.0 #96

Open
alexjpwalker opened this issue Aug 11, 2020 · 1 comment

Comments

@alexjpwalker
Copy link
Member

alexjpwalker commented Aug 11, 2020

The affected test is Scenario: delete a database causes open sessions to fail in database.feature.

In Grakn 1.8, attempting to open a transaction throws an exception if the DB is deleted.

In Grakn 2.0, it fails spectacularly, crashing and killing the entire JVM with a segfault:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000000000000, pid=99594, tid=0x0000000000001003
#
# JRE version: OpenJDK Runtime Environment (8.0_252-b09) (build 1.8.0_252-b09)
# Java VM: OpenJDK 64-Bit Server VM (25.252-b09 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  0x0000000000000000
#
# 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:
# /private/var/tmp/_bazel_aw/5782084d1ce012ddde90f3bc6bd3ed03/execroot/graknlabs_grakn_core/bazel-out/darwin-fastbuild/bin/test/behaviour/connection/database/test.runfiles/graknlabs_grakn_core/hs_err_pid99594.log
#
# 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.
#

The issue appears to be caused by RocksDB cleaning up and removing objects from memory when the DB is deleted, and then attempting to access invalid memory when opening a tx.

We should either fix the test (which seems unlikely) or delete it.

@alexjpwalker
Copy link
Member Author

The test scenario is still named delete a database causes open sessions to fail, and it is still @ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants