{"action":"closed","issue":{"url":"https://api.github.com/repos/vim/vim/issues/2548","repository_url":"https://api.github.com/repos/vim/vim","labels_url":"https://api.github.com/repos/vim/vim/issues/2548/labels{/name}","comments_url":"https://api.github.com/repos/vim/vim/issues/2548/comments","events_url":"https://api.github.com/repos/vim/vim/issues/2548/events","html_url":"https://github.com/vim/vim/issues/2548","id":288363085,"node_id":"MDU6SXNzdWUyODgzNjMwODU=","number":2548,"title":"ch_sendraw with very large strings can cause deadlock","user":{"login":"natebosch","id":7528195,"node_id":"MDQ6VXNlcjc1MjgxOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/7528195?v=4","gravatar_id":"","url":"https://api.github.com/users/natebosch","html_url":"https://github.com/natebosch","followers_url":"https://api.github.com/users/natebosch/followers","following_url":"https://api.github.com/users/natebosch/following{/other_user}","gists_url":"https://api.github.com/users/natebosch/gists{/gist_id}","starred_url":"https://api.github.com/users/natebosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natebosch/subscriptions","organizations_url":"https://api.github.com/users/natebosch/orgs","repos_url":"https://api.github.com/users/natebosch/repos","events_url":"https://api.github.com/users/natebosch/events{/privacy}","received_events_url":"https://api.github.com/users/natebosch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-01-13T21:58:55Z","updated_at":"2018-09-06T14:27:51Z","closed_at":"2018-09-06T14:27:51Z","author_association":"NONE","body":"If you send a very large string with `ch_sendraw` vim will not do any reading on the channel until it has finished sending the string. If the other side of the channel is also single threaded and happens to be trying to send data it may block it's read. Once the pipe's buffers fill up both sides will be blocked from writing, and won't be doing any reading so we end up in deadlock.\r\n\r\nI can work around this issue by keeping a buffer string in vimscript and repeatedly setting a timer with 0 time to write in chunks - the theory being that in between writes we can also do some reads and avoid the deadlock.\r\n\r\nIt would be nice if the chunking were built in to `ch_sendraw` so it doesn't need to be handled this way.\r\n\r\nSee a repro here: https://github.com/natebosch/vim-lsc/issues/67#issuecomment-357469091"}}
{"actor":{"display_login":"brammool"}}