{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/1717","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/1717/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/1717/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/1717/events","html_url":"https://github.com/StackStorm/st2/issues/1717","id":94918814,"number":1717,"title":"Execution stuck in \"Running\" state","user":{"login":"felin-arch","id":2064581,"avatar_url":"https://avatars.githubusercontent.com/u/2064581?v=3","gravatar_id":"","url":"https://api.github.com/users/felin-arch","html_url":"https://github.com/felin-arch","followers_url":"https://api.github.com/users/felin-arch/followers","following_url":"https://api.github.com/users/felin-arch/following{/other_user}","gists_url":"https://api.github.com/users/felin-arch/gists{/gist_id}","starred_url":"https://api.github.com/users/felin-arch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felin-arch/subscriptions","organizations_url":"https://api.github.com/users/felin-arch/orgs","repos_url":"https://api.github.com/users/felin-arch/repos","events_url":"https://api.github.com/users/felin-arch/events{/privacy}","received_events_url":"https://api.github.com/users/felin-arch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/StackStorm/st2/labels/WIP","name":"WIP","color":"bfdadc"}],"state":"open","locked":false,"assignee":{"login":"lakshmi-kannan","id":1839421,"avatar_url":"https://avatars.githubusercontent.com/u/1839421?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshmi-kannan","html_url":"https://github.com/lakshmi-kannan","followers_url":"https://api.github.com/users/lakshmi-kannan/followers","following_url":"https://api.github.com/users/lakshmi-kannan/following{/other_user}","gists_url":"https://api.github.com/users/lakshmi-kannan/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshmi-kannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshmi-kannan/subscriptions","organizations_url":"https://api.github.com/users/lakshmi-kannan/orgs","repos_url":"https://api.github.com/users/lakshmi-kannan/repos","events_url":"https://api.github.com/users/lakshmi-kannan/events{/privacy}","received_events_url":"https://api.github.com/users/lakshmi-kannan/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/StackStorm/st2/milestones/3","html_url":"https://github.com/StackStorm/st2/milestones/0.12.0","labels_url":"https://api.github.com/repos/StackStorm/st2/milestones/3/labels","id":1207776,"number":3,"title":"0.12.0","description":null,"creator":{"login":"lakshmi-kannan","id":1839421,"avatar_url":"https://avatars.githubusercontent.com/u/1839421?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshmi-kannan","html_url":"https://github.com/lakshmi-kannan","followers_url":"https://api.github.com/users/lakshmi-kannan/followers","following_url":"https://api.github.com/users/lakshmi-kannan/following{/other_user}","gists_url":"https://api.github.com/users/lakshmi-kannan/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshmi-kannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshmi-kannan/subscriptions","organizations_url":"https://api.github.com/users/lakshmi-kannan/orgs","repos_url":"https://api.github.com/users/lakshmi-kannan/repos","events_url":"https://api.github.com/users/lakshmi-kannan/events{/privacy}","received_events_url":"https://api.github.com/users/lakshmi-kannan/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-07-14T19:52:46Z","updated_at":"2015-07-14T19:52:46Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-07-14T10:51:49Z","updated_at":"2015-07-14T20:02:20Z","closed_at":null,"body":"I recently ran into a problem which caused the state of the execution to incorrectly report \"Running\". Looking at the logs, the actions clearly fails. There is no way to cancel it or remove it via the UI or the CLI. The action never seems to time out.\r\n\r\nIt happened when the result of the action contained some non-utf8 characters. I posted the action runner log at [here](https://gist.github.com/felin-arch/2c9f5b07e38e6d661e84).\r\n\r\nSome background info: running stackstorm 0.11.6 on CentOS 7 with the latest python available on the OS.\r\n\r\nI was able to reproduce this multiple times. The action should fail with the error message seen in the logs.\r\n"},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/121365358","html_url":"https://github.com/StackStorm/st2/issues/1717#issuecomment-121365358","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/1717","id":121365358,"user":{"login":"lakshmi-kannan","id":1839421,"avatar_url":"https://avatars.githubusercontent.com/u/1839421?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshmi-kannan","html_url":"https://github.com/lakshmi-kannan","followers_url":"https://api.github.com/users/lakshmi-kannan/followers","following_url":"https://api.github.com/users/lakshmi-kannan/following{/other_user}","gists_url":"https://api.github.com/users/lakshmi-kannan/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshmi-kannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshmi-kannan/subscriptions","organizations_url":"https://api.github.com/users/lakshmi-kannan/orgs","repos_url":"https://api.github.com/users/lakshmi-kannan/repos","events_url":"https://api.github.com/users/lakshmi-kannan/events{/privacy}","received_events_url":"https://api.github.com/users/lakshmi-kannan/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T20:02:20Z","updated_at":"2015-07-14T20:02:20Z","body":"@felin-arch: Looking at the code, we do set the action status as \"failed\"\r\nhttps://github.com/StackStorm/st2/blob/master/st2actions/st2actions/worker.py#L106\r\n\r\nAre you able to repro this every time? Some more info about the script and the data will definitely help. \r\n\r\nRegarding cancellation failing, we decided that canceling a simple action would mean different things based on the runner. So it's impossible to guarantee anything. So on cancelation, we check if the status is 'scheduled'. Only then we cancel. We are talking about this here but wanted to throw more context at you. In workflows, we stop at the action last running before cancelation and mark the workflow as canceled. "}}