{"action":"created","issue":{"url":"https://api.github.com/repos/PowerDNS/pdns/issues/4733","repository_url":"https://api.github.com/repos/PowerDNS/pdns","labels_url":"https://api.github.com/repos/PowerDNS/pdns/issues/4733/labels{/name}","comments_url":"https://api.github.com/repos/PowerDNS/pdns/issues/4733/comments","events_url":"https://api.github.com/repos/PowerDNS/pdns/issues/4733/events","html_url":"https://github.com/PowerDNS/pdns/issues/4733","id":193354978,"number":4733,"title":"dnsdist corrupts terminal when run in foreground","user":{"login":"philmayers","id":739238,"avatar_url":"https://avatars.githubusercontent.com/u/739238?v=3","gravatar_id":"","url":"https://api.github.com/users/philmayers","html_url":"https://github.com/philmayers","followers_url":"https://api.github.com/users/philmayers/followers","following_url":"https://api.github.com/users/philmayers/following{/other_user}","gists_url":"https://api.github.com/users/philmayers/gists{/gist_id}","starred_url":"https://api.github.com/users/philmayers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philmayers/subscriptions","organizations_url":"https://api.github.com/users/philmayers/orgs","repos_url":"https://api.github.com/users/philmayers/repos","events_url":"https://api.github.com/users/philmayers/events{/privacy}","received_events_url":"https://api.github.com/users/philmayers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-04T14:53:34Z","updated_at":"2016-12-04T14:55:37Z","closed_at":null,"body":"During a quick test, if I run dnsdist in the foreground, garbage is emitted to the terminal, usually rendering it unusable. For example:\r\n\r\n```\r\n# dnsdist --local 0.0.0.0:53 127.0.0.1:5300 -a 0.0.0.0/0\r\nUnable to read configuration from '/etc/dnsdist/dnsdist.conf'\r\nListening on 0.0.0.0:53\r\ndnsdist 1.1.0-beta1 comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2\r\nACL allowing queries from: 0.0.0.0/0\r\nAdded downstream server 127.0.0.1:5300\r\nMarking downstream 127.0.0.1:5300 as 'up'\r\n> &<garbled char>pixel\r\n```\r\n\r\nEverything after the \">\" line above just appeared after a few seconds, I didn't type it. Using \"script\" to capture the terminal output to a file, \"cat -A\" says this was:\r\n\r\n```\r\nAdded downstream server 127.0.0.1:5300^M$\r\nMarking downstream 127.0.0.1:5300 as 'up'^M$\r\n> ^@&M-_^@^A^@^@^A^@^@^@^@^@^@^Epixel^M$\r\nquantserve^Ccom^@^@^A^@^APuTTY^M$\r\n```\r\n\r\nA quick strace -f -o of the process suggests it's a worker thread writing to fd 0 for some reason e.g.\r\n\r\n```\r\n30492 write(0, \"\\0+\", 2)                = 2\r\n30492 write(0, \"G\\312\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\n25-courier\\4push\\5app\"..., 43) = 43\r\n30492 read(0,  <unfinished ...>\r\n```\r\n\r\n30492 being a thread created earlier in the process by clone()\r\n\r\nOS is CentOS 6 x64, package from the dnsdist repo page. Let me know if more info is required or if I'm doing something wrong."},"comment":{"url":"https://api.github.com/repos/PowerDNS/pdns/issues/comments/264708436","html_url":"https://github.com/PowerDNS/pdns/issues/4733#issuecomment-264708436","issue_url":"https://api.github.com/repos/PowerDNS/pdns/issues/4733","id":264708436,"user":{"login":"ahupowerdns","id":1223657,"avatar_url":"https://avatars.githubusercontent.com/u/1223657?v=3","gravatar_id":"","url":"https://api.github.com/users/ahupowerdns","html_url":"https://github.com/ahupowerdns","followers_url":"https://api.github.com/users/ahupowerdns/followers","following_url":"https://api.github.com/users/ahupowerdns/following{/other_user}","gists_url":"https://api.github.com/users/ahupowerdns/gists{/gist_id}","starred_url":"https://api.github.com/users/ahupowerdns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahupowerdns/subscriptions","organizations_url":"https://api.github.com/users/ahupowerdns/orgs","repos_url":"https://api.github.com/users/ahupowerdns/repos","events_url":"https://api.github.com/users/ahupowerdns/events{/privacy}","received_events_url":"https://api.github.com/users/ahupowerdns/received_events","type":"User","site_admin":false},"created_at":"2016-12-04T14:55:37Z","updated_at":"2016-12-04T14:55:37Z","body":"Thanks for this report - which exact dnsdist repo do you use, 1.0 or git\nmaster? \n"}}
{"actor":{"display_login":"ahupowerdns"}}