{"action":"created","issue":{"url":"https://api.github.com/repos/nanocurrency/raiblocks/issues/1491","repository_url":"https://api.github.com/repos/nanocurrency/raiblocks","labels_url":"https://api.github.com/repos/nanocurrency/raiblocks/issues/1491/labels{/name}","comments_url":"https://api.github.com/repos/nanocurrency/raiblocks/issues/1491/comments","events_url":"https://api.github.com/repos/nanocurrency/raiblocks/issues/1491/events","html_url":"https://github.com/nanocurrency/raiblocks/issues/1491","id":393273615,"node_id":"MDU6SXNzdWUzOTMyNzM2MTU=","number":1491,"title":"udp_buffer could hang ","user":{"login":"starrynightglider","id":6467534,"node_id":"MDQ6VXNlcjY0Njc1MzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6467534?v=4","gravatar_id":"","url":"https://api.github.com/users/starrynightglider","html_url":"https://github.com/starrynightglider","followers_url":"https://api.github.com/users/starrynightglider/followers","following_url":"https://api.github.com/users/starrynightglider/following{/other_user}","gists_url":"https://api.github.com/users/starrynightglider/gists{/gist_id}","starred_url":"https://api.github.com/users/starrynightglider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starrynightglider/subscriptions","organizations_url":"https://api.github.com/users/starrynightglider/orgs","repos_url":"https://api.github.com/users/starrynightglider/repos","events_url":"https://api.github.com/users/starrynightglider/events{/privacy}","received_events_url":"https://api.github.com/users/starrynightglider/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-21T01:16:50Z","updated_at":"2018-12-21T03:31:24Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nIt could be reproduced easily when buffer size is small. \r\nThe issue comes from: both \"full\" and \"free\" share the same conditional variable. \r\nThink about the case, if most of the threads are waiting (but one alive), then a release() is called, \r\nhowever, notify_one() wakes up the threads at \"full.wait()\"(it it supposed  to wakes up \"empty.wait()\". The thread wakes up and sleep again since the \"full\" queue is still empty, then the buffer hangs. \r\n\r\nCan be reproduce easily to change the testcase:\r\nTEST (udp_buffer, many_buffers_multithreaded)\r\n{\r\n\trai::stat stats;\r\n\trai::udp_buffer buffer (stats, 512, 16);  --> from 16 to 4 or 2 \r\n\r\n\r\n---------------------------------------------------\r\nHAVE A QUESTION? PLEASE JOIN OUR DISCORD SERVER\r\n---------------------------------------------------\r\n\r\nOnly use GitHub issues for reporting problems and submitting proposals. \r\n\r\nQuestions should  be asked on our Discord server, https://chat.nano.org,\r\nwhich has channels for a wide range of topics, such as development and \r\nsupport.\r\n\r\n---------------------------------------------------\r\nBUG BOUNTY REPORT INFORMATION\r\n---------------------------------------------------\r\n\r\nIn the interest of further improving the security of the network, we have launched the RaiBlocks Bug Bounty Program.\r\n\r\nWARNING! Don't disclose any information for the Raiblocks bug bounty. First, please read the article about our Bug Bounty Program.\r\n\r\nhttps://www.reddit.com/r/RaiBlocks/comments/7makm7/announcing_the_raiblocks_bug_bounty_program/\r\n\r\n---------------------------------------------------\r\nNORMAL BUG REPORT INFORMATION\r\n---------------------------------------------------\r\n\r\nIf you are reporting a new issue, make sure that we do not have any duplicates\r\nalready open. You can ensure this by searching the issue list for this\r\nrepository. If there is a duplicate, please close your issue and add a comment\r\nto the existing issue instead.\r\n\r\nIf you suspect your issue is a bug, please edit your issue description to\r\ninclude the BUG REPORT INFORMATION shown below. If you fail to provide this\r\ninformation within 7 days, we cannot debug your issue and will close it. We\r\nwill, however, reopen it if you later provide the information.\r\n\r\n-->\r\n\r\n**Description of bug:**\r\n\r\n<!--\r\nDoes this issue reproduce with the latest release? if you don't use the latest version then please try our latest version.\r\n\r\nBriefly describe the problem you are having in a few paragraphs. \r\n-->\r\n\r\n**Steps to reproduce the issue:**\r\n1.\r\n2.\r\n3.\r\n\r\n**Describe the results you received:**\r\n\r\n\r\n**Describe the results you expected:**\r\n\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\n**Environment**:\r\n\r\n<!--\r\n- OS information  \r\n- (Linux) Kernel (e.g. `uname -a`):\r\n- Node version\r\n- (docker node) docker version \r\n-->\r\n\r\n**logs**\r\n\r\n<!--\r\n\r\nCan you please provide the RaiBlocks logs for further analysis.\r\n\r\nHow to find RaiBlocks logs:\r\n    \r\nhttps://github.com/clemahieu/raiblocks/wiki/Log-files\r\n\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/nanocurrency/raiblocks/issues/comments/449229658","html_url":"https://github.com/nanocurrency/raiblocks/issues/1491#issuecomment-449229658","issue_url":"https://api.github.com/repos/nanocurrency/raiblocks/issues/1491","id":449229658,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTIyOTY1OA==","user":{"login":"slowaways","id":9668277,"node_id":"MDQ6VXNlcjk2NjgyNzc=","avatar_url":"https://avatars3.githubusercontent.com/u/9668277?v=4","gravatar_id":"","url":"https://api.github.com/users/slowaways","html_url":"https://github.com/slowaways","followers_url":"https://api.github.com/users/slowaways/followers","following_url":"https://api.github.com/users/slowaways/following{/other_user}","gists_url":"https://api.github.com/users/slowaways/gists{/gist_id}","starred_url":"https://api.github.com/users/slowaways/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slowaways/subscriptions","organizations_url":"https://api.github.com/users/slowaways/orgs","repos_url":"https://api.github.com/users/slowaways/repos","events_url":"https://api.github.com/users/slowaways/events{/privacy}","received_events_url":"https://api.github.com/users/slowaways/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T03:31:24Z","updated_at":"2018-12-21T03:31:24Z","author_association":"NONE","body":"WTF? Close this Issue! Issue empty!"}}
{"actor":{"display_login":"slowaways"}}