{"action":"closed","issue":{"url":"https://api.github.com/repos/elasticsearch/logstash/issues/1695","labels_url":"https://api.github.com/repos/elasticsearch/logstash/issues/1695/labels{/name}","comments_url":"https://api.github.com/repos/elasticsearch/logstash/issues/1695/comments","events_url":"https://api.github.com/repos/elasticsearch/logstash/issues/1695/events","html_url":"https://github.com/elasticsearch/logstash/issues/1695","id":41960430,"number":1695,"title":"logstash hangs after \"invalid byte sequence in UTF-8\" \"Exception in filterworker\" gsub after urldecode","user":{"login":"timbunce","id":62403,"avatar_url":"https://avatars.githubusercontent.com/u/62403?v=3","gravatar_id":"","url":"https://api.github.com/users/timbunce","html_url":"https://github.com/timbunce","followers_url":"https://api.github.com/users/timbunce/followers","following_url":"https://api.github.com/users/timbunce/following{/other_user}","gists_url":"https://api.github.com/users/timbunce/gists{/gist_id}","starred_url":"https://api.github.com/users/timbunce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbunce/subscriptions","organizations_url":"https://api.github.com/users/timbunce/orgs","repos_url":"https://api.github.com/users/timbunce/repos","events_url":"https://api.github.com/users/timbunce/events{/privacy}","received_events_url":"https://api.github.com/users/timbunce/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elasticsearch/logstash/labels/adoptme","name":"adoptme","color":"207de5"},{"url":"https://api.github.com/repos/elasticsearch/logstash/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/elasticsearch/logstash/labels/confirmed","name":"confirmed","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"ph","id":640,"avatar_url":"https://avatars.githubusercontent.com/u/640?v=3","gravatar_id":"","url":"https://api.github.com/users/ph","html_url":"https://github.com/ph","followers_url":"https://api.github.com/users/ph/followers","following_url":"https://api.github.com/users/ph/following{/other_user}","gists_url":"https://api.github.com/users/ph/gists{/gist_id}","starred_url":"https://api.github.com/users/ph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ph/subscriptions","organizations_url":"https://api.github.com/users/ph/orgs","repos_url":"https://api.github.com/users/ph/repos","events_url":"https://api.github.com/users/ph/events{/privacy}","received_events_url":"https://api.github.com/users/ph/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/elasticsearch/logstash/milestones/2","labels_url":"https://api.github.com/repos/elasticsearch/logstash/milestones/2/labels","id":624113,"number":2,"title":"v1.5.0","description":"","creator":{"login":"colinsurprenant","id":2010,"avatar_url":"https://avatars.githubusercontent.com/u/2010?v=3","gravatar_id":"","url":"https://api.github.com/users/colinsurprenant","html_url":"https://github.com/colinsurprenant","followers_url":"https://api.github.com/users/colinsurprenant/followers","following_url":"https://api.github.com/users/colinsurprenant/following{/other_user}","gists_url":"https://api.github.com/users/colinsurprenant/gists{/gist_id}","starred_url":"https://api.github.com/users/colinsurprenant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinsurprenant/subscriptions","organizations_url":"https://api.github.com/users/colinsurprenant/orgs","repos_url":"https://api.github.com/users/colinsurprenant/repos","events_url":"https://api.github.com/users/colinsurprenant/events{/privacy}","received_events_url":"https://api.github.com/users/colinsurprenant/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":218,"state":"open","created_at":"2014-04-08T16:53:38Z","updated_at":"2015-01-22T18:14:00Z","due_on":null,"closed_at":null},"comments":26,"created_at":"2014-09-04T17:01:57Z","updated_at":"2015-01-22T18:14:00Z","closed_at":"2015-01-22T18:14:00Z","body":"In the logs (with logstash 1.4.2 running with -v) I see\r\n```\r\n{:timestamp=>\"2014-09-04T10:13:51.684000-0500\", :message=>\"Exception in filterworker\", \"exception\"=>#<ArgumentError: invalid byte sequence in UTF-8>,\r\n\"backtrace\"=>[\"org/jruby/RubyString.java:3078:in `gsub'\",\r\n\"org/jruby/RubyString.java:3046:in `gsub'\", \"/home/tiger/trunk_1409040752/comp/support_logstash/logstash/lib/logstash/filters/mutate.rb:315:in `gsub'\", \"org/jruby/RubyArray.java:1613:in `each'\",\r\n\"/home/tiger/trunk_1409040752/comp/support_logstash/logstash/lib/logstash/filters/mutate.rb:294:in `gsub'\",\r\n\"/home/tiger/trunk_1409040752/comp/support_logstash/logstash/lib/logstash/filters/mutate.rb:210:in `filter'\", \"(eval):921:in `initialize'\", \"org/jruby/RubyProc.java:271:in `call'\",\r\n\"/home/tiger/trunk_1409040752/comp/support_logstash/logstash/lib/logstash/pipeline.rb:262:in `filter'\",\r\n\"/home/tiger/trunk_1409040752/comp/support_logstash/logstash/lib/logstash/pipeline.rb:203:in `filterworker'\",\r\n\"/home/tiger/trunk_1409040752/comp/support_logstash/logstash/lib/logstash/pipeline.rb:143:in `start_filters'\"], :level=>:error}\r\n```\r\nfollowed by many many \"Plugin is finished\" log lines, including this one:\r\n```\r\n{:timestamp=>\"2014-09-04T10:13:51.694000-0500\", :message=>\"Plugin is finished\",\r\n:plugin=><LogStash::Filters::Mutate gsub=>[\"message\", \"\\\\x1B\\\\[[0-9;]*[mK]\", \"\"]>, :level=>:info}\r\n```\r\nwhich I guess is the cause of the exception. (That message came from a tcp input that has ``codec => line { charset => \"UTF-8\" }`` set. But that's another issue.)\r\n\r\nAnd then nothing. Logstash has hung.\r\n"}}