{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4900","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4900/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4900/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4900/events","html_url":"https://github.com/orientechnologies/orientdb/issues/4900","id":104231864,"number":4900,"title":"[OrientDB 2.0.x] StackOverflowError / Infinite Recursion","user":{"login":"Alan47","id":8558488,"avatar_url":"https://avatars.githubusercontent.com/u/8558488?v=3","gravatar_id":"","url":"https://api.github.com/users/Alan47","html_url":"https://github.com/Alan47","followers_url":"https://api.github.com/users/Alan47/followers","following_url":"https://api.github.com/users/Alan47/following{/other_user}","gists_url":"https://api.github.com/users/Alan47/gists{/gist_id}","starred_url":"https://api.github.com/users/Alan47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alan47/subscriptions","organizations_url":"https://api.github.com/users/Alan47/orgs","repos_url":"https://api.github.com/users/Alan47/repos","events_url":"https://api.github.com/users/Alan47/events{/privacy}","received_events_url":"https://api.github.com/users/Alan47/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-09-01T10:02:21Z","updated_at":"2015-09-12T06:42:37Z","closed_at":null,"body":"Hello,\r\n\r\nI am currently experiencing a StackOverflowError in OrientDB due to an infinite recursion. It happens when I perform a commit on a graph instance. I've tested this issue on 2.0.12 and 2.0.15, with identical results (except for the line numbers).\r\n\r\nUnfortunately I cannot provide a reproduction example as the error occurs deep inside the business logic of my application, but here is the repetitive part of the stacktrace (from 2.0.15):\r\n\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:1693)\r\n\tat com.orientechnologies.orient.core.tx.OTransactionOptimistic.addRecord(OTransactionOptimistic.java:312)\r\n\tat com.orientechnologies.orient.core.tx.OTransactionOptimistic.saveRecord(OTransactionOptimistic.java:253)\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2316)\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:118)\r\n\tat com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1727)\r\n\tat com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1718)\r\n\tat com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:76)\r\n\tat com.orientechnologies.orient.core.db.record.ridbag.embedded.OEmbeddedRidBag.serialize(OEmbeddedRidBag.java:371)\r\n\tat com.orientechnologies.orient.core.db.record.ridbag.ORidBag.toStream(ORidBag.java:274)\r\n\tat com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.writeSingleValue(ORecordSerializerBinaryV0.java:583)\r\n\tat com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.serialize(ORecordSerializerBinaryV0.java:262)\r\n\tat com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary.toStream(ORecordSerializerBinary.java:105)\r\n\tat com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:2100)\r\n\tat com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:695)\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:1693)\r\n\r\nI can consistently reproduce this issue in my codebase. I would be happy if someone could look into this, perhaps it is possible to reconstruct the issue from the stack trace by analyzing the exact call sequence."},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/139733311","html_url":"https://github.com/orientechnologies/orientdb/issues/4900#issuecomment-139733311","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4900","id":139733311,"user":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"created_at":"2015-09-12T06:42:37Z","updated_at":"2015-09-12T06:42:37Z","body":"Hi Alan,\nBefore OrientDB 2.2 (soon in beta), saving used recursive algorithm, so if\nyou are saving many objects you could incur in this problem. With OrientDB\nv2.2 we avoid recursion, so this problem doesn't exist anymore. What to do\nwith OrientDB v2.0 and v2.1? You have 2 options:\n\n   1. keep the transaction smaller by committing more often or\n   2. increase the Java stack size with the -Xss<RAM> option. You could try\n   with -Xss1m\n\n\nBest Regards,\n\nLuca Garulli\nFounder & CEO\nOrientDB <http://orientdb.com/>\n\n\nOn 11 September 2015 at 09:50, Alan47 <notifications@github.com> wrote:\n\n> No, unfortunately not - I am still facing this problem, and I have no clue\n> how to solve it :(\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/orientechnologies/orientdb/issues/4900#issuecomment-139476651>\n> .\n>\n"}}