{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift-nio/issues/518","repository_url":"https://api.github.com/repos/apple/swift-nio","labels_url":"https://api.github.com/repos/apple/swift-nio/issues/518/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift-nio/issues/518/comments","events_url":"https://api.github.com/repos/apple/swift-nio/issues/518/events","html_url":"https://github.com/apple/swift-nio/issues/518","id":341491333,"node_id":"MDU6SXNzdWUzNDE0OTEzMzM=","number":518,"title":"Probable deadlock when requesting self","user":{"login":"kirilltitov","id":1544789,"node_id":"MDQ6VXNlcjE1NDQ3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/1544789?v=4","gravatar_id":"","url":"https://api.github.com/users/kirilltitov","html_url":"https://github.com/kirilltitov","followers_url":"https://api.github.com/users/kirilltitov/followers","following_url":"https://api.github.com/users/kirilltitov/following{/other_user}","gists_url":"https://api.github.com/users/kirilltitov/gists{/gist_id}","starred_url":"https://api.github.com/users/kirilltitov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirilltitov/subscriptions","organizations_url":"https://api.github.com/users/kirilltitov/orgs","repos_url":"https://api.github.com/users/kirilltitov/repos","events_url":"https://api.github.com/users/kirilltitov/events{/privacy}","received_events_url":"https://api.github.com/users/kirilltitov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-16T12:03:14Z","updated_at":"2018-07-16T12:42:17Z","closed_at":"2018-07-16T12:16:19Z","author_association":"NONE","body":"### Expected behavior\r\nI develop a distributed backend application which may at some point send TCP request to self (using BlueSocket library from IBM-Kitura). I expect all requests to succeed, including loopback ones.\r\n\r\n### Actual behavior\r\nWhen application requests self using BlueSocket, it stops responding at all. It accepts new TCP connections, but does not react in any way. BlueSocket is stuck at reading from socket. However, it's not completely frozen. If there are internal timers or smth, it will go off as usual.\r\n\r\n### Steps to reproduce\r\n1. Clone repository https://bitbucket.org/kirilltitov/testdrive\r\n2. Execute `swift run`\r\n3. Execute `echo \"normal\" | nc 127.0.0.1 1711` and notice correct response\r\n4. Execute `echo \"deadlock\" | nc 127.0.0.1 1711`, server is now hung\r\nAll further requests are also stuck.\r\n\r\n### SwiftNIO version/commit hash\r\n`ba077d3be8a833faeb5924b9ecf9a942bfafa690`\r\n\r\n### Swift & OS version (output of `swift --version && uname -a`)\r\nOS: macOS High Sierra, Mojave, Ubuntu 16.04 (docker)\r\nSwift: `4.2 (swiftlang-1000.0.25.1 clang-1000.10.28.1)`, also `4.1`, same result\r\n\r\nMost probably I screwed up with `ServerHandler` class, but the problem is so hilariously confusing that I don't even have a tiny clue on how to debug it. I tried literally everything."},"comment":{"url":"https://api.github.com/repos/apple/swift-nio/issues/comments/405234626","html_url":"https://github.com/apple/swift-nio/issues/518#issuecomment-405234626","issue_url":"https://api.github.com/repos/apple/swift-nio/issues/518","id":405234626,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTIzNDYyNg==","user":{"login":"Lukasa","id":1382556,"node_id":"MDQ6VXNlcjEzODI1NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1382556?v=4","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"created_at":"2018-07-16T12:42:17Z","updated_at":"2018-07-16T12:42:17Z","author_association":"CONTRIBUTOR","body":"It's not just ok, it's often encouraged. Unless you have a particularly deep insight into your application workload, it's generally a good idea to use relatively few event loop groups."}}
{"actor":{"display_login":"Lukasa"}}