{"action":"closed","issue":{"url":"https://api.github.com/repos/mozilla-services/heka/issues/1395","labels_url":"https://api.github.com/repos/mozilla-services/heka/issues/1395/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-services/heka/issues/1395/comments","events_url":"https://api.github.com/repos/mozilla-services/heka/issues/1395/events","html_url":"https://github.com/mozilla-services/heka/issues/1395","id":60044371,"number":1395,"title":"Retry config not being honoured on ProcessInputs","user":{"login":"hynd","id":1405193,"avatar_url":"https://avatars.githubusercontent.com/u/1405193?v=3","gravatar_id":"","url":"https://api.github.com/users/hynd","html_url":"https://github.com/hynd","followers_url":"https://api.github.com/users/hynd/followers","following_url":"https://api.github.com/users/hynd/following{/other_user}","gists_url":"https://api.github.com/users/hynd/gists{/gist_id}","starred_url":"https://api.github.com/users/hynd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hynd/subscriptions","organizations_url":"https://api.github.com/users/hynd/orgs","repos_url":"https://api.github.com/users/hynd/repos","events_url":"https://api.github.com/users/hynd/events{/privacy}","received_events_url":"https://api.github.com/users/hynd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-06T01:17:03Z","updated_at":"2015-03-10T17:53:36Z","closed_at":"2015-03-10T17:53:36Z","body":"Similar to #1117, some of the retry configs aren't working quite as expected.\r\n\r\nWith 0.8.3, the ```max_retries``` config is being ignored, a ProcessInput gets respawned indefinitely.  This basic config reproduces it:\r\n```\r\n[ProcessInput]\r\nticker_interval = 0\r\n[ProcessInput.command.0]\r\nbin = \"/bin/false\"\r\n[ProcessInput.retries]\r\nmax_retries = 5\r\n```\r\nIt seems like the ```rh.Reset()``` on L244 of \r\nhttps://github.com/mozilla-services/heka/blob/0c64368a0e328e6d02d0f919ffab6e7fe26aa279/pipeline/plugin_runners.go#L244 is knobbling both ```times``` and ```curDelay```.\r\n```r.times``` is always set back to 0 and never exceeds ```r.retries``` in ```rh.Wait()```.\r\n\r\n\r\n\r\n0.9 has a couple of separate problems.  The first is that (with the same config as above), a ProcessInput halts forever.\r\nIt looks like the process_input.go's ```once``` mutex (https://github.com/mozilla-services/heka/blob/b8c60547f3505d385d73b48ba55f8058950e3a3c/plugins/process/process_input.go#L147) doesn't get reset on ```Init()```, so when the plugin_runners.go retry loop re-```Init()```'s the plugin and comes round a second time to ```Run()```, the ProcessInput's stopChan doesn't get closed by ```Stop()``` and just waits.\r\nIf i add in a reset of the ```pi.once``` in ```Init()```, the respawn works.\r\n\r\nAlso, r.times is still getting clobbered by a moved ```rh.Reset()``` at https://github.com/mozilla-services/heka/blob/b8c60547f3505d385d73b48ba55f8058950e3a3c/pipeline/plugin_runners.go#L287, so it doesn't honour ```max_retries``` either.\r\n(there's now a condition around the Reset(), but ProcessInput's ```Run()``` looks like it'll always return nil)."}}