{"action":"created","issue":{"url":"https://api.github.com/repos/wiredtiger/wiredtiger/issues/1530","labels_url":"https://api.github.com/repos/wiredtiger/wiredtiger/issues/1530/labels{/name}","comments_url":"https://api.github.com/repos/wiredtiger/wiredtiger/issues/1530/comments","events_url":"https://api.github.com/repos/wiredtiger/wiredtiger/issues/1530/events","html_url":"https://github.com/wiredtiger/wiredtiger/issues/1530","id":53407070,"number":1530,"title":"log cursor needs support in Python, Java","user":{"login":"ddanderson","id":591610,"avatar_url":"https://avatars.githubusercontent.com/u/591610?v=3","gravatar_id":"","url":"https://api.github.com/users/ddanderson","html_url":"https://github.com/ddanderson","followers_url":"https://api.github.com/users/ddanderson/followers","following_url":"https://api.github.com/users/ddanderson/following{/other_user}","gists_url":"https://api.github.com/users/ddanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ddanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddanderson/subscriptions","organizations_url":"https://api.github.com/users/ddanderson/orgs","repos_url":"https://api.github.com/users/ddanderson/repos","events_url":"https://api.github.com/users/ddanderson/events{/privacy}","received_events_url":"https://api.github.com/users/ddanderson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"ddanderson","id":591610,"avatar_url":"https://avatars.githubusercontent.com/u/591610?v=3","gravatar_id":"","url":"https://api.github.com/users/ddanderson","html_url":"https://github.com/ddanderson","followers_url":"https://api.github.com/users/ddanderson/followers","following_url":"https://api.github.com/users/ddanderson/following{/other_user}","gists_url":"https://api.github.com/users/ddanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ddanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddanderson/subscriptions","organizations_url":"https://api.github.com/users/ddanderson/orgs","repos_url":"https://api.github.com/users/ddanderson/repos","events_url":"https://api.github.com/users/ddanderson/events{/privacy}","received_events_url":"https://api.github.com/users/ddanderson/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/wiredtiger/wiredtiger/milestones/35","labels_url":"https://api.github.com/repos/wiredtiger/wiredtiger/milestones/35/labels","id":913861,"number":35,"title":"2.5.1","description":"2.5.1 release","creator":{"login":"agorrod","id":1930121,"avatar_url":"https://avatars.githubusercontent.com/u/1930121?v=3","gravatar_id":"","url":"https://api.github.com/users/agorrod","html_url":"https://github.com/agorrod","followers_url":"https://api.github.com/users/agorrod/followers","following_url":"https://api.github.com/users/agorrod/following{/other_user}","gists_url":"https://api.github.com/users/agorrod/gists{/gist_id}","starred_url":"https://api.github.com/users/agorrod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agorrod/subscriptions","organizations_url":"https://api.github.com/users/agorrod/orgs","repos_url":"https://api.github.com/users/agorrod/repos","events_url":"https://api.github.com/users/agorrod/events{/privacy}","received_events_url":"https://api.github.com/users/agorrod/received_events","type":"User","site_admin":false},"open_issues":79,"closed_issues":68,"state":"open","created_at":"2014-12-24T01:42:41Z","updated_at":"2015-02-05T19:01:18Z","due_on":"2015-03-03T05:00:00Z","closed_at":null},"comments":2,"created_at":"2015-01-05T15:28:05Z","updated_at":"2015-02-05T19:01:18Z","closed_at":"2015-02-05T19:01:18Z","body":"Two problems:\r\n\r\n1) The ex_log.java example has a SEGV:\r\n```\r\n* thread #4: tid = 0x43b3a6, 0x0000000123e1d52b libwiredtiger-2.5.1.dylib`__wt_cursor_set_keyv(cursor=0x000000010020ff40, flags=1792, ap=0x0000000100600540) + 1259 at cur_std.c:293, stop reason = signal SIGSEGV\r\n    frame #0: 0x0000000123e1d52b libwiredtiger-2.5.1.dylib`__wt_cursor_set_keyv(cursor=0x000000010020ff40, flags=1792, ap=0x0000000100600540) + 1259 at cur_std.c:293\r\n   290 \t\t\tif (LF_ISSET(WT_CURSOR_RAW_OK | WT_CURSTD_DUMP_JSON) ||\r\n   291 \t\t\t    WT_STREQ(fmt, \"u\")) {\r\n   292 \t\t\t\titem = va_arg(ap, WT_ITEM *);\r\n-> 293 \t\t\t\tsz = item->size;\r\n   294 \t\t\t\tbuf->data = item->data;\r\n   295 \t\t\t} else if (WT_STREQ(fmt, \"S\")) {\r\n   296 \t\t\t\tstr = va_arg(ap, const char *);\r\n```\r\nThe `WT_CURSOR_RAW` flag is set for all cursors in the Java and Python interface code.  But this SEGV occurs as a result of an internal call to set_key in cur_log.c:183:\r\n```\r\n\t__wt_cursor_set_key(cursor, cl->cur_lsn->file, cl->cur_lsn->offset, key_count);\r\n```\r\nwhere RAW is not appropriate.  Maybe turning the RAW flag off temporarily for such internal calls will fix this?\r\n\r\n2) The Python interface does not use `WT_CURSOR_RAW` if the cursor is a JSON dump cursor.  There's no corresponding code for Java, so likely JSON dump is broken in Java.\r\n\r\nThere is no python test case for log cursors, and no java test case for log cursors or JSON dump."},"comment":{"url":"https://api.github.com/repos/wiredtiger/wiredtiger/issues/comments/73105109","html_url":"https://github.com/wiredtiger/wiredtiger/issues/1530#issuecomment-73105109","issue_url":"https://api.github.com/repos/wiredtiger/wiredtiger/issues/1530","id":73105109,"user":{"login":"ddanderson","id":591610,"avatar_url":"https://avatars.githubusercontent.com/u/591610?v=3","gravatar_id":"","url":"https://api.github.com/users/ddanderson","html_url":"https://github.com/ddanderson","followers_url":"https://api.github.com/users/ddanderson/followers","following_url":"https://api.github.com/users/ddanderson/following{/other_user}","gists_url":"https://api.github.com/users/ddanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ddanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddanderson/subscriptions","organizations_url":"https://api.github.com/users/ddanderson/orgs","repos_url":"https://api.github.com/users/ddanderson/repos","events_url":"https://api.github.com/users/ddanderson/events{/privacy}","received_events_url":"https://api.github.com/users/ddanderson/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T19:01:18Z","updated_at":"2015-02-05T19:01:18Z","body":"We now have a python test for log cursors, so all issues are addressed."}}