{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1807","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1807/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1807/comments","events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1807/events","html_url":"https://github.com/ethereum/go-ethereum/issues/1807","id":106545663,"number":1807,"title":"web3.eth.isSyncing in combination with web3.reset() kills go","user":{"login":"frozeman","id":232662,"avatar_url":"https://avatars.githubusercontent.com/u/232662?v=3","gravatar_id":"","url":"https://api.github.com/users/frozeman","html_url":"https://github.com/frozeman","followers_url":"https://api.github.com/users/frozeman/followers","following_url":"https://api.github.com/users/frozeman/following{/other_user}","gists_url":"https://api.github.com/users/frozeman/gists{/gist_id}","starred_url":"https://api.github.com/users/frozeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frozeman/subscriptions","organizations_url":"https://api.github.com/users/frozeman/orgs","repos_url":"https://api.github.com/users/frozeman/repos","events_url":"https://api.github.com/users/frozeman/events{/privacy}","received_events_url":"https://api.github.com/users/frozeman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-15T12:34:24Z","updated_at":"2015-09-16T06:35:11Z","closed_at":null,"body":"While trying `web3.eth.isSyncing()`, a function which gives you callbacks when the node start and stops syncing i found an issue when using it as follows:\r\n```js\r\nweb3.eth.isSyncing(function(error, sync){\r\n if(!error) {\r\n    if(sync === true) {\r\n       // stop all activity\r\n       web3.reset(); // <--- this seems to crash it\r\n    } else if(sync) {\r\n       // show sync info, stop app calls etc\r\n       console.log(sync.highestBlock);\r\n    } else {\r\n       // regain app operation\r\n    }\r\n  }\r\n});\r\n```\r\nThis will crash the go node with the following:\r\n```bash\r\nruntime: goroutine stack exceeds 1000000000-byte limit\r\nfatal error: stack overflow\r\n```\r\nsee: https://gist.github.com/frozeman/d4df07d674150bddec8e\r\n\r\n\r\nIf you call it as follows, no problem appear:\r\n```js\r\nweb3.eth.isSyncing(function(error, sync){\r\n if(!error) {\r\n    if(sync === true) {\r\n       // stop all activity\r\n       console.log('start syncing');\r\n    } else if(sync) {\r\n       // show sync info, stop app calls etc\r\n       console.log(sync.currentBlock);\r\n    } else {\r\n       // regain app operation\r\n       console.log('stop syncing');\r\n    }\r\n  }\r\n});\r\n```\r\n\r\n@bas-vk could this have to do with the IPC?\r\n@zsfelfoldi could this have to do with your implementation of the `setInterval`, as web3 is polling under the hood using setInterval?"},"comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments/140644122","html_url":"https://github.com/ethereum/go-ethereum/issues/1807#issuecomment-140644122","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1807","id":140644122,"user":{"login":"frozeman","id":232662,"avatar_url":"https://avatars.githubusercontent.com/u/232662?v=3","gravatar_id":"","url":"https://api.github.com/users/frozeman","html_url":"https://github.com/frozeman","followers_url":"https://api.github.com/users/frozeman/followers","following_url":"https://api.github.com/users/frozeman/following{/other_user}","gists_url":"https://api.github.com/users/frozeman/gists{/gist_id}","starred_url":"https://api.github.com/users/frozeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frozeman/subscriptions","organizations_url":"https://api.github.com/users/frozeman/orgs","repos_url":"https://api.github.com/users/frozeman/repos","events_url":"https://api.github.com/users/frozeman/events{/privacy}","received_events_url":"https://api.github.com/users/frozeman/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T06:35:11Z","updated_at":"2015-09-16T06:35:11Z","body":"It doesn't cancel timers, but it removes all calls, which the interval would make."}}