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

LevelDB Connection Crash #31

Open
sqwk opened this Issue Mar 16, 2018 · 14 comments

Comments

Projects
None yet
2 participants
@sqwk
Copy link

sqwk commented Mar 16, 2018

When connecting to a LevelDB database, the app crashes. Running 4.0.2 on Mac OS 10.13.3.

default	14:08:54.820353 +0100	kernel	AGC:: [Keylord pid 90796 non-mux-aware] exiting, non-mux-aware app count 2, runtime: 0:00:05.028
default	14:08:54.820523 +0100	kernel	AGC:: [Keylord pid 90796 mux-aware] exiting, non-mux-aware app count 2, runtime: 0:00:05.033
@maxd

This comment has been minimized.

Copy link
Contributor

maxd commented Mar 16, 2018

Could you please provide crash-logs files of Keylord application? You can find them in "Console" application into "User Reports" section:

crashlog

Please, don't insert them to the comment. Just attache them as file.

@maxd maxd added the bug label Mar 16, 2018

@sqwk

This comment has been minimized.

Copy link

sqwk commented Mar 16, 2018

Oddly enough, there isn't one. However, system.log lists this:

Mar 16 14:24:11 Kiwi Keylord[94137]: Keylord(94137,0x700009921000) malloc: *** error for object 0x1334d6000: pointer being freed was not allocated
    *** set a breakpoint in malloc_error_break to debug
Mar 16 14:24:13 Kiwi com.apple.xpc.launchd[1] (com.apple.ReportCrash): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
Mar 16 14:24:13 Kiwi com.apple.xpc.launchd[1] (com.apple.ReportCrash.Root): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
@maxd

This comment has been minimized.

Copy link
Contributor

maxd commented Mar 16, 2018

Yes, it is very strange. It looks like the google/leveldb#199 problem in LevelDB database.

How do you think can you create test database for reproduce problem?

@sqwk

This comment has been minimized.

Copy link

sqwk commented Mar 16, 2018

Same problem when creating a db through Keylord. (See attached test db)
test.zip

@maxd

This comment has been minimized.

Copy link
Contributor

maxd commented Mar 16, 2018

I can open test database use Keylord 4.0.2 downloaded from site without any problems. It display empty database.

Looks like this is environment specific problem. I will try to update my Mac OS up to 10.13.3 and try to reproduce problem.

For any case could you please reboot OS and try to reproduce problem?

@sqwk

This comment has been minimized.

Copy link

sqwk commented Mar 16, 2018

A restart did not help. I also tried clearing system and user caches.

@maxd

This comment has been minimized.

Copy link
Contributor

maxd commented Mar 17, 2018

Update of Mac OS did't help too. Keylord can open test database without problems.

I am going to provide development version of Keylord next week. It is using latest version of LevelDB adapter. Maybe it fixed the problem.

@sqwk

This comment has been minimized.

Copy link

sqwk commented Mar 20, 2018

Sounds good. Alternatively, do you have a download link for an older version that I could test?

@maxd

This comment has been minimized.

Copy link
Contributor

maxd commented Mar 22, 2018

Let's try to check latest version first because I don't think that old version will work better.

Here you can download development version of Keylord application: https://protonail.com/keylord/download/development

@sqwk

This comment has been minimized.

Copy link

sqwk commented Mar 22, 2018

Still the same issue. The app quits without any errors or a crash log.

@maxd

This comment has been minimized.

Copy link
Contributor

maxd commented Mar 22, 2018

I have simulated unhandled exception (not related to this problem) and in my case the OS show the following dialog:

unhandled-exception-dialog

It have "Report..." button which can open other dialog with detail information about problem (after click by "Show Details" button).

Do you see such dialog after application crash?

@sqwk

This comment has been minimized.

Copy link

sqwk commented Mar 23, 2018

No, unfortunately there is no dialogue. It almost looks like the app simply quits, although this was not triggered by me. Not sure what could be causing this. I have SIP disabled and am using the NVIDIA WebDriver, but I don't think that should affect the app in any way. Also FileVault is enabled.

@maxd

This comment has been minimized.

Copy link
Contributor

maxd commented Mar 26, 2018

I am agree, these things should not affect to this problem.

I have yet one idea how to collect more information about problem. The Keylord application are using leveldb-jna adapter to work with LevelDB databases. It have several unit tests. Let's try to run them and maybe they fail too. It this case we will have information about crashed tests and probably error or crash logs in Console applicaion.

To run tests need to do the following steps.

  1. Install utilities required to build Snappy & LevelDB. I am using Homebrew to install them:

    brew install automake libtool pkg-config
    
  2. Clone leveldb-jna repository and sub-modules with Snappy & LevelDB:

    git clone git://github.com/protonail/leveldb-jna.git
    cd leveldb-jna
    git submodule init
    git submodule update
    
  3. Build Snappy & LevelDB.

    bin/build_leveldb.sh clean
    

    This script apply patches, build and put *.dylib to leveldb-jna-native/src/main/resources/darwin directory.

  4. Install Oracle JDK 8. It can be downloaded here. Then select it:

    export JAVA_HOME=$(/usr/libexec/java_home --version 1.8)
    

    check JDK version for any case:

    java -version
    

    it should print Java version equal to 1.8.0 (it is JDK 8):

    java version "1.8.0_162"
    Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
    
  5. Install Maven:

    brew install maven
    
  6. Now you are ready to run tests:

    mvn test -pl leveldb-jna-core
    

    In case of success this command should print the following result:

    ...
    
    
    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    Running com.protonail.leveldb.jna.LevelDBOptionsTest
    Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.134 sec
    Running com.protonail.leveldb.jna.LevelDBWriteOptionsTest
    Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
    Running com.protonail.leveldb.jna.LevelDBKeyValueIteratorTest
    Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec
    Running com.protonail.leveldb.jna.LevelDBWriteBatchTest
    Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
    Running com.protonail.leveldb.jna.LevelDBKeyIteratorTest
    Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 sec
    Running com.protonail.leveldb.jna.LevelDBReadOptionsTest
    Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
    Running com.protonail.leveldb.jna.LevelDBTest
    Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.824 sec
    
    Results :
    
    Tests run: 58, Failures: 0, Errors: 0, Skipped: 0
    
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 4.962 s
    [INFO] Finished at: 2018-03-26T20:09:50+03:00
    [INFO] ------------------------------------------------------------------------
    

If it doesn't help I don't have more ideas how to investigate this problem but I hope it can help to find something useful.

@sqwk

This comment has been minimized.

Copy link

sqwk commented Mar 26, 2018

All tests ran successfully. I think I will wait for the next OS update and see if that changes anything. Still no logs or crash reports.

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