{"action":"created","issue":{"url":"https://api.github.com/repos/turtlecoin/turtlecoin/issues/44","repository_url":"https://api.github.com/repos/turtlecoin/turtlecoin","labels_url":"https://api.github.com/repos/turtlecoin/turtlecoin/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/turtlecoin/turtlecoin/issues/44/comments","events_url":"https://api.github.com/repos/turtlecoin/turtlecoin/issues/44/events","html_url":"https://github.com/turtlecoin/turtlecoin/issues/44","id":294912763,"number":44,"title":"[BlockchainSynchronizer] Failed to query blocks: NodeErrorCategory:5, Internal node error","user":{"login":"khunpoum","id":29778875,"avatar_url":"https://avatars0.githubusercontent.com/u/29778875?v=4","gravatar_id":"","url":"https://api.github.com/users/khunpoum","html_url":"https://github.com/khunpoum","followers_url":"https://api.github.com/users/khunpoum/followers","following_url":"https://api.github.com/users/khunpoum/following{/other_user}","gists_url":"https://api.github.com/users/khunpoum/gists{/gist_id}","starred_url":"https://api.github.com/users/khunpoum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khunpoum/subscriptions","organizations_url":"https://api.github.com/users/khunpoum/orgs","repos_url":"https://api.github.com/users/khunpoum/repos","events_url":"https://api.github.com/users/khunpoum/events{/privacy}","received_events_url":"https://api.github.com/users/khunpoum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-06T21:07:28Z","updated_at":"2018-02-09T18:27:35Z","closed_at":null,"author_association":"NONE","body":"ver relese v 0.3.1\r\n\r\nafter some time run simplewallet iam receiving errors but TurtleCoind is working.\r\nand mee some time need to restart TurtleCoind and simplewallet.\r\n\r\nhow it can be fix?\r\n\r\nsimplewallet stdout:\r\n```\r\n2018-Feb-07 00:02:18.535571 ERROR   [BlockchainSynchronizer] Failed to query blocks: NodeErrorCategory:5, Internal node error\r\n2018-Feb-07 00:02:33.510404 ERROR   [BlockchainSynchronizer] Failed to query blocks: NodeErrorCategory:5, Internal node error\r\n2018-Feb-07 00:02:43.519390 ERROR   [BlockchainSynchronizer] Failed to query blocks: NodeErrorCategory:5, Internal node error\r\n2018-Feb-07 00:02:58.523518 ERROR   [BlockchainSynchronizer] Failed to query blocks: NodeErrorCategory:5, Internal node error\r\n```\r\n\r\n```\r\n$ uname -a\r\nLinux trtl-pool-1 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n$ uname -r\r\n4.4.0-87-generic\r\n\r\n$ cat /etc/*release*\r\nDISTRIB_ID=Ubuntu\r\nDISTRIB_RELEASE=16.04\r\nDISTRIB_CODENAME=xenial\r\nDISTRIB_DESCRIPTION=\"Ubuntu 16.04.3 LTS\"\r\nNAME=\"Ubuntu\"\r\nVERSION=\"16.04.3 LTS (Xenial Xerus)\"\r\nID=ubuntu\r\nID_LIKE=debian\r\nPRETTY_NAME=\"Ubuntu 16.04.3 LTS\"\r\nVERSION_ID=\"16.04\"\r\nHOME_URL=\"http://www.ubuntu.com/\"\r\nSUPPORT_URL=\"http://help.ubuntu.com/\"\r\nBUG_REPORT_URL=\"http://bugs.launchpad.net/ubuntu/\"\r\nVERSION_CODENAME=xenial\r\nUBUNTU_CODENAME=xenial\r\n```"},"comment":{"url":"https://api.github.com/repos/turtlecoin/turtlecoin/issues/comments/364517142","html_url":"https://github.com/turtlecoin/turtlecoin/issues/44#issuecomment-364517142","issue_url":"https://api.github.com/repos/turtlecoin/turtlecoin/issues/44","id":364517142,"user":{"login":"MoonMoonDogo","id":35853645,"avatar_url":"https://avatars2.githubusercontent.com/u/35853645?v=4","gravatar_id":"","url":"https://api.github.com/users/MoonMoonDogo","html_url":"https://github.com/MoonMoonDogo","followers_url":"https://api.github.com/users/MoonMoonDogo/followers","following_url":"https://api.github.com/users/MoonMoonDogo/following{/other_user}","gists_url":"https://api.github.com/users/MoonMoonDogo/gists{/gist_id}","starred_url":"https://api.github.com/users/MoonMoonDogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoonMoonDogo/subscriptions","organizations_url":"https://api.github.com/users/MoonMoonDogo/orgs","repos_url":"https://api.github.com/users/MoonMoonDogo/repos","events_url":"https://api.github.com/users/MoonMoonDogo/events{/privacy}","received_events_url":"https://api.github.com/users/MoonMoonDogo/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T18:27:35Z","updated_at":"2018-02-09T18:27:35Z","author_association":"NONE","body":"Summing up the findings and discussions from #dev-general:\r\n@deertacos added logging for the exception in his [fork](https://github.com/deertacos/turtlecoin/tree/internal_node_error) and could reproduce the issue, which lead to the following log messages:\r\n```\r\n2018-Feb-09 11:10:52.754898 ERROR   [Core] Failed to query blocks: no blocks for this timestamp, too large\r\n```\r\n\r\n@nnamon shared his conjecture:\r\n```\r\ncould it be those blocks that have very odd timestamps\r\ntimestamps that give a timing before the last block\r\nthey show up as (x minutes later) instead of (x seconds ago) on my block tracking scripts\r\n```\r\n\r\nThe following [lines of code](https://github.com/turtlecoin/turtlecoin/blob/49ca77c3c309375c69ae5261950f8fff9bd258c0/src/CryptoNoteCore/BlockchainCache.cpp#L521-L525) are responsible for the log message seen above:\r\n```cpp\r\nuint32_t BlockchainCache::getTimestampLowerBoundBlockIndex(uint64_t timestamp) const {\r\n  assert(!blockInfos.empty());\r\n\r\n  auto& index = blockInfos.get<BlockIndexTag>();\r\n  if (index.back().timestamp < timestamp) {\r\n    // we don't have it\r\n    throw std::runtime_error(\"no blocks for this timestamp, too large\");\r\n  }\r\n// [...]\r\n```\r\n\r\nIn the log file from ``Turtle?#3684`` I've seen that ``queryblockslite.bin`` was called with timestamp ``0``:\r\n```\r\n2018-Feb-06 17:50:25.433047 TRACE   [NodeRpcProxy] Send queryblockslite.bin request, timestamp 0\r\n2018-Feb-06 17:50:25.474657 TRACE   [NodeRpcProxy] queryblockslite.bin failed: NodeErrorCategory:5, Internal node error\r\n```\r\n\r\nIt is strange that the comparison above (``index.back().timestamp < timestamp``) is true, as ``timestamp`` is a ``uint64_t``. \r\n\r\nAnother useful step would be to add logging for ``index.back().timestamp`` and ``timestamp`` in the code block above."}}
{"actor":{"display_login":"MoonMoonDogo"}}