{"action":"opened","issue":{"url":"https://api.github.com/repos/google/cayley/issues/198","labels_url":"https://api.github.com/repos/google/cayley/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/google/cayley/issues/198/comments","events_url":"https://api.github.com/repos/google/cayley/issues/198/events","html_url":"https://github.com/google/cayley/issues/198","id":54285618,"number":198,"title":"fatal error: stack overflow","user":{"login":"david-schor","id":3722948,"avatar_url":"https://avatars.githubusercontent.com/u/3722948?v=3","gravatar_id":"","url":"https://api.github.com/users/david-schor","html_url":"https://github.com/david-schor","followers_url":"https://api.github.com/users/david-schor/followers","following_url":"https://api.github.com/users/david-schor/following{/other_user}","gists_url":"https://api.github.com/users/david-schor/gists{/gist_id}","starred_url":"https://api.github.com/users/david-schor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-schor/subscriptions","organizations_url":"https://api.github.com/users/david-schor/orgs","repos_url":"https://api.github.com/users/david-schor/repos","events_url":"https://api.github.com/users/david-schor/events{/privacy}","received_events_url":"https://api.github.com/users/david-schor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-14T05:28:12Z","updated_at":"2015-01-14T05:28:12Z","closed_at":null,"body":"I'm not quite sure what's at fault here. I have not had the time to dig much deeper. Basically Cayley crashes with a stack overflow after attempting to retrieve nodes that used to link to a deleted node. I was able to reproduce it on a clean build using the following steps:\r\n\r\n    $ cat cayley.cfg\r\n    {\r\n    \"database\": \"leveldb\",\r\n    \"db_path\": \"/tmp/test001\",\r\n    \"read_only\": false\r\n    }\r\n\r\n    $ ./cayley init -config=cayley.cfg\r\n\r\n    $ ./cayley http -config=cayley.cfg &\r\n    Cayley now listening on 127.0.0.1:64210\r\n\r\n    $ curl http://127.0.0.1:64210/api/v1/write --data '[{\"subject\": \"David\",\"predicate\": \"isA\",\"object\": \"human\"},{\"subject\": \"Lisa\",\"predicate\": \"isA\",\"object\": \"human\"},{\"subject\": \"David\",\"predicate\": \"nickname\",\"object\": \"Dave\"}]'\r\n    {\"result\": \"Successfully wrote 3 quads.\"}\r\n\r\n    $ curl http://127.0.0.1:64210/api/v1/query/gremlin --data 'g.V().All()'\r\n    {\"result\":[{\"id\":\"isA\"},{\"id\":\"Lisa\"},{\"id\":\"Dave\"},{\"id\":\"nickname\"},{\"id\":\"David\"},{\"id\":\"human\"}]}\r\n\r\n    $ curl http://127.0.0.1:64210/api/v1/delete --data '[{\"subject\": \"David\",\"predicate\": \"nickname\",\"object\": \"Dave\"}]'\r\n    {\"result\": \"Successfully deleted 1 quads.\"}\r\n\r\n    $ curl http://127.0.0.1:64210/api/v1/query/gremlin --data 'g.V(\"David\").Out().All()'\r\n    runtime: goroutine stack exceeds 2500000000-byte limit\r\n    fatal error: stack overflow\r\n    \r\n    runtime stack:\r\n    runtime.throw(0xfbde0e)\r\n            /usr/lib/golang/src/pkg/runtime/panic.c:520 +0x69\r\n    runtime.newstack()\r\n            /usr/lib/golang/src/pkg/runtime/stack.c:770 +0x486\r\n    runtime.morestack()\r\n            /usr/lib/golang/src/pkg/runtime/asm_amd64.s:228 +0x61\r\n    \r\n    goroutine 70 [stack growth]:\r\n    \r\n    ...\r\n"}}