{"action":"created","issue":{"url":"https://api.github.com/repos/deephacks/lmdbjni/issues/78","repository_url":"https://api.github.com/repos/deephacks/lmdbjni","labels_url":"https://api.github.com/repos/deephacks/lmdbjni/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/deephacks/lmdbjni/issues/78/comments","events_url":"https://api.github.com/repos/deephacks/lmdbjni/issues/78/events","html_url":"https://github.com/deephacks/lmdbjni/issues/78","id":190280889,"number":78,"title":"Transaction.close causes coredump","user":{"login":"purplefox","id":701906,"avatar_url":"https://avatars.githubusercontent.com/u/701906?v=3","gravatar_id":"","url":"https://api.github.com/users/purplefox","html_url":"https://github.com/purplefox","followers_url":"https://api.github.com/users/purplefox/followers","following_url":"https://api.github.com/users/purplefox/following{/other_user}","gists_url":"https://api.github.com/users/purplefox/gists{/gist_id}","starred_url":"https://api.github.com/users/purplefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purplefox/subscriptions","organizations_url":"https://api.github.com/users/purplefox/orgs","repos_url":"https://api.github.com/users/purplefox/repos","events_url":"https://api.github.com/users/purplefox/events{/privacy}","received_events_url":"https://api.github.com/users/purplefox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-18T10:07:27Z","updated_at":"2016-11-18T11:18:55Z","closed_at":null,"body":"I've been seeing intermittent core dumps when running our tests with lmdb-jni in a loop:\r\n\r\n~~~~\r\n# A fatal error has been detected by the Java Runtime Environment:\r\n#\r\n#  SIGSEGV (0xb) at pc=0x00007f12047fff5f, pid=28581, tid=0x00007f11febef700\r\n#\r\n# JRE version: Java(TM) SE Runtime Environment (8.0_111-b14) (build 1.8.0_111-b14)\r\n# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.111-b14 mixed mode linux-amd64 compressed oops)\r\n# Problematic frame:\r\n# C  [liblmdbjni-64-0-2873664317511820691.4+0x1ff5f]  mdb_txn_end+0x10f\r\n~~~~\r\n\r\nThis seems to be caused by tx.close() being called in our code here:\r\n\r\nhttps://github.com/Tesco/mewbase/blob/doc_query/src/main/java/com/tesco/mewbase/doc/impl/lmdb/LmdbDocManager.java#L216\r\n\r\nLooking in the log, this seems to be happening in mdb_tx_end native code:\r\n\r\n~~~~\r\nStack: [0x00007f11feaef000,0x00007f11febf0000],  sp=0x00007f11febee2b0,  free space=1020k\r\nNative frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)\r\nC  [liblmdbjni-64-0-2873664317511820691.4+0x1ff5f]  mdb_txn_end+0x10f\r\n\r\nJava frames: (J=compiled Java code, j=interpreted, Vv=VM code)\r\nj  org.fusesource.lmdbjni.JNI.mdb_txn_abort(J)V+0\r\nJ 1207 C1 org.fusesource.lmdbjni.Transaction.close()V (5 bytes) @ 0x00007f12093dd024 [0x00007f12093dcf00+0x124]\r\nj  com.tesco.mewbase.doc.impl.lmdb.LmdbDocManager$LmdbReadStream.close()V+22\r\n~~~~\r\n\r\nHere's the test, if you want to run it yourself:\r\n\r\nhttps://github.com/Tesco/mewbase/blob/doc_query/src/test/java/com/tesco/mewbase/doc/impl/lmdb/LmdbDocManagerTest.java#L47\r\n\r\n(be sure to uncomment the repeat line so it runs in a loop and also uncomment the tx.close line)\r\n\r\nWhen I comment out the tx.close() the tests run fine but I'm not sure that is a wise thing to do (leaking resources?)"},"comment":{"url":"https://api.github.com/repos/deephacks/lmdbjni/issues/comments/261508898","html_url":"https://github.com/deephacks/lmdbjni/issues/78#issuecomment-261508898","issue_url":"https://api.github.com/repos/deephacks/lmdbjni/issues/78","id":261508898,"user":{"login":"krisskross","id":414023,"avatar_url":"https://avatars.githubusercontent.com/u/414023?v=3","gravatar_id":"","url":"https://api.github.com/users/krisskross","html_url":"https://github.com/krisskross","followers_url":"https://api.github.com/users/krisskross/followers","following_url":"https://api.github.com/users/krisskross/following{/other_user}","gists_url":"https://api.github.com/users/krisskross/gists{/gist_id}","starred_url":"https://api.github.com/users/krisskross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krisskross/subscriptions","organizations_url":"https://api.github.com/users/krisskross/orgs","repos_url":"https://api.github.com/users/krisskross/repos","events_url":"https://api.github.com/users/krisskross/events{/privacy}","received_events_url":"https://api.github.com/users/krisskross/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T11:18:55Z","updated_at":"2016-11-18T11:18:55Z","body":"Yes the tx.close is uncommented and the test repeats 1000 times.\r\n\r\nI'm using Arch Linux x86_64."}}
{"actor":{"display_login":"krisskross"}}