{"action":"opened","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/8167","repository_url":"https://api.github.com/repos/rancher/rancher","labels_url":"https://api.github.com/repos/rancher/rancher/issues/8167/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/8167/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/8167/events","html_url":"https://github.com/rancher/rancher/issues/8167","id":214120870,"number":8167,"title":"kill -3 doesn't cause microservices inside of rancher/server to do a go routine dump and die","user":{"login":"cjellick","id":2473240,"avatar_url":"https://avatars2.githubusercontent.com/u/2473240?v=3","gravatar_id":"","url":"https://api.github.com/users/cjellick","html_url":"https://github.com/cjellick","followers_url":"https://api.github.com/users/cjellick/followers","following_url":"https://api.github.com/users/cjellick/following{/other_user}","gists_url":"https://api.github.com/users/cjellick/gists{/gist_id}","starred_url":"https://api.github.com/users/cjellick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjellick/subscriptions","organizations_url":"https://api.github.com/users/cjellick/orgs","repos_url":"https://api.github.com/users/cjellick/repos","events_url":"https://api.github.com/users/cjellick/events{/privacy}","received_events_url":"https://api.github.com/users/cjellick/received_events","type":"User","site_admin":false},"labels":[{"id":145695744,"url":"https://api.github.com/repos/rancher/rancher/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":{"login":"cjellick","id":2473240,"avatar_url":"https://avatars2.githubusercontent.com/u/2473240?v=3","gravatar_id":"","url":"https://api.github.com/users/cjellick","html_url":"https://github.com/cjellick","followers_url":"https://api.github.com/users/cjellick/followers","following_url":"https://api.github.com/users/cjellick/following{/other_user}","gists_url":"https://api.github.com/users/cjellick/gists{/gist_id}","starred_url":"https://api.github.com/users/cjellick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjellick/subscriptions","organizations_url":"https://api.github.com/users/cjellick/orgs","repos_url":"https://api.github.com/users/cjellick/repos","events_url":"https://api.github.com/users/cjellick/events{/privacy}","received_events_url":"https://api.github.com/users/cjellick/received_events","type":"User","site_admin":false},"assignees":[{"login":"cjellick","id":2473240,"avatar_url":"https://avatars2.githubusercontent.com/u/2473240?v=3","gravatar_id":"","url":"https://api.github.com/users/cjellick","html_url":"https://github.com/cjellick","followers_url":"https://api.github.com/users/cjellick/followers","following_url":"https://api.github.com/users/cjellick/following{/other_user}","gists_url":"https://api.github.com/users/cjellick/gists{/gist_id}","starred_url":"https://api.github.com/users/cjellick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjellick/subscriptions","organizations_url":"https://api.github.com/users/cjellick/orgs","repos_url":"https://api.github.com/users/cjellick/repos","events_url":"https://api.github.com/users/cjellick/events{/privacy}","received_events_url":"https://api.github.com/users/cjellick/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-03-14T16:01:49Z","updated_at":"2017-03-14T16:01:49Z","closed_at":null,"body":"Microservices started by cattle such as websocket-proxy, go-machine-service, rancher-compose-executor) cannot be killed via kill -3, as it should be.\r\n\r\nThis is because that signal is being blocked. I don't know why..probably java's fault. \r\n\r\nSteps to repro:\r\n1. Start rancher/server\r\n2. Find the pid of a microservice inside of rancher/server container that you want to get a goroutine dump.\r\n3. Do a kill -3 on the process\r\n\r\nExpected Result:\r\nGoroutine dump in container logs. Process killed\r\n\r\nActual result:\r\nGoroutine dump is not in rancher/server logs.\r\nProcess is not killed\r\n\r\nPossible solutions:\r\n1. Create a wrapper program that java calls that then properly launches the underlying process\r\n2. Figure out what is causing that signal to be blocked and stop it from doing that.\r\n\r\n\r\n\r\nYou can use this script to help debug. Just find the pid of a microservice and pass as a param to this script (taken from stack overflow):\r\n```\r\nsigparse () {\r\n    i=0\r\n    # bits=\"$(printf \"16i 2o %X p\" \"0x$1\" | dc)\" # variant for busybox\r\n    bits=\"$(printf \"ibase=16; obase=2; %X\\n\" \"0x$1\" | bc)\"\r\n    while [ -n \"$bits\" ] ; do\r\n        i=\"$(expr \"$i\" + 1)\"\r\n        case \"$bits\" in\r\n            *1) printf \" %s(%s)\" \"$(kill -l \"$i\")\" \"$i\" ;;\r\n        esac\r\n        bits=\"${bits%?}\"\r\n    done\r\n}\r\n\r\ngrep \"^Sig...:\" \"/proc/$1/status\" | while read a b ; do\r\n        printf \"%s%s\\n\" \"$a\" \"$(sigparse \"$b\")\"\r\n    done | fmt -t  # uncomment for pretty-printing\r\n```\r\n\r\nIt will produce output like this:\r\nsure enough....sigquit is being blocked:\r\n```\r\nSigPnd:\r\nSigBlk: QUIT(3)\r\nSigIgn:\r\nSigCgt: HUP(1) INT(2) QUIT(3) ILL(4) TRAP(5) ABRT(6) BUS(7) FPE(8)\r\n   USR1(10) SEGV(11) USR2(12) PIPE(13) ALRM(14) TERM(15) STKFLT(16)\r\n   CHLD(17) URG(23) XCPU(24) XFSZ(25) VTALRM(26) PROF(27) WINCH(28) IO(29)\r\n   PWR(30) SYS(31) (32) (33) RTMIN(34) RTMIN+1(35) RTMIN+2(36) RTMIN+3(37)\r\n   RTMIN+4(38) RTMIN+5(39) RTMIN+6(40) RTMIN+7(41) RTMIN+8(42) RTMIN+9(43)\r\n   RTMIN+10(44) RTMIN+11(45) RTMIN+12(46) RTMIN+13(47) RTMIN+14(48)\r\n   RTMIN+15(49) RTMAX-14(50) RTMAX-13(51) RTMAX-12(52) RTMAX-11(53)\r\n   RTMAX-10(54) RTMAX-9(55) RTMAX-8(56) RTMAX-7(57) RTMAX-6(58)\r\n   RTMAX-5(59) RTMAX-4(60) RTMAX-3(61) RTMAX-2(62) RTMAX-1(63) RTMAX(64)\r\n```\r\n"}}
{"actor":{"display_login":"cjellick"}}