{"action":"created","issue":{"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/113","repository_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited","labels_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/113/comments","events_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/113/events","html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/issues/113","id":181559089,"number":113,"title":"bitcoin executables segmentation fault upon termination","user":{"login":"ftrader","id":16613123,"avatar_url":"https://avatars.githubusercontent.com/u/16613123?v=3","gravatar_id":"","url":"https://api.github.com/users/ftrader","html_url":"https://github.com/ftrader","followers_url":"https://api.github.com/users/ftrader/followers","following_url":"https://api.github.com/users/ftrader/following{/other_user}","gists_url":"https://api.github.com/users/ftrader/gists{/gist_id}","starred_url":"https://api.github.com/users/ftrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftrader/subscriptions","organizations_url":"https://api.github.com/users/ftrader/orgs","repos_url":"https://api.github.com/users/ftrader/repos","events_url":"https://api.github.com/users/ftrader/events{/privacy}","received_events_url":"https://api.github.com/users/ftrader/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-07T00:46:10Z","updated_at":"2016-10-12T05:25:17Z","closed_at":null,"body":"I've noticed this problem with BU 0.12.1bu (built from current branch) on my Debian 7 x86_64 test platform so far.\r\n\r\nWhen I close bitcoin-qt by clicking on the 'X' window decorator, the application shuts down, but sometimes hits a 'Segmentation Fault' in various ways. This does not happen always (maybe 20-30% of the time? - I havent measured accurately).\r\n\r\nI've also noticed a similar problem when the bitcoind executable is terminated, e.g. for a regtest is stopped.\r\nSometimes this segfaulting manifests in backtraces from glibc.\r\n\r\nI have yet to try on other platforms (more recent Debian / Ubuntu etc).\r\n\r\n@ptschip reported seeing similar crashes when running the wallet.py script."},"comment":{"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/comments/253122350","html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/issues/113#issuecomment-253122350","issue_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/113","id":253122350,"user":{"login":"Justaphf","id":6402604,"avatar_url":"https://avatars.githubusercontent.com/u/6402604?v=3","gravatar_id":"","url":"https://api.github.com/users/Justaphf","html_url":"https://github.com/Justaphf","followers_url":"https://api.github.com/users/Justaphf/followers","following_url":"https://api.github.com/users/Justaphf/following{/other_user}","gists_url":"https://api.github.com/users/Justaphf/gists{/gist_id}","starred_url":"https://api.github.com/users/Justaphf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Justaphf/subscriptions","organizations_url":"https://api.github.com/users/Justaphf/orgs","repos_url":"https://api.github.com/users/Justaphf/repos","events_url":"https://api.github.com/users/Justaphf/events{/privacy}","received_events_url":"https://api.github.com/users/Justaphf/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T05:25:17Z","updated_at":"2016-10-12T05:25:17Z","body":"Based on the line number in your backtrace seems like it is complaining about deleting the semaphore for tracking outbound connections, `semOutbound` in the `CNetCleanup` destructor.\r\n\r\nWondering if this is related to the way `StopNode()` calls `semOutbound->post()` on this semaphore based on the number of configured max outbound connections.  I had seen this code before when looking into another issue and thought it looked odd given the way that `post()` doesn't do anything special when in shutdown mode so if there were any threads blocked waiting on this semaphore to release those blocked threads would start executing like normal in the middle of the shutdown routine, possibly adding a new node to the `vNodes` vector via the call to `ConnectNode()` inside of `OpenNetworkConnection()` after (or during) the clean-up of vNodes?\r\n\r\nI'm not familiar enough with C++/Boost multi-threading to be sure.  @ptschip does this theory seem plausible?"}}
{"actor":{"display_login":"Justaphf"}}