{"action":"created","issue":{"url":"https://api.github.com/repos/grails/grails-core/issues/9198","labels_url":"https://api.github.com/repos/grails/grails-core/issues/9198/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-core/issues/9198/comments","events_url":"https://api.github.com/repos/grails/grails-core/issues/9198/events","html_url":"https://github.com/grails/grails-core/issues/9198","id":102742382,"number":9198,"title":"startAsync / task {} controller methods produce unreliable results.","user":{"login":"donald-jackson","id":605195,"avatar_url":"https://avatars.githubusercontent.com/u/605195?v=3","gravatar_id":"","url":"https://api.github.com/users/donald-jackson","html_url":"https://github.com/donald-jackson","followers_url":"https://api.github.com/users/donald-jackson/followers","following_url":"https://api.github.com/users/donald-jackson/following{/other_user}","gists_url":"https://api.github.com/users/donald-jackson/gists{/gist_id}","starred_url":"https://api.github.com/users/donald-jackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donald-jackson/subscriptions","organizations_url":"https://api.github.com/users/donald-jackson/orgs","repos_url":"https://api.github.com/users/donald-jackson/repos","events_url":"https://api.github.com/users/donald-jackson/events{/privacy}","received_events_url":"https://api.github.com/users/donald-jackson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grails/grails-core/labels/Blocker","name":"Blocker","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/grails/grails-core/milestones/139","html_url":"https://github.com/grails/grails-core/milestones/grails-2.5.2","labels_url":"https://api.github.com/repos/grails/grails-core/milestones/139/labels","id":1231007,"number":139,"title":"grails-2.5.2","description":"","creator":{"login":"graemerocher","id":66626,"avatar_url":"https://avatars.githubusercontent.com/u/66626?v=3","gravatar_id":"","url":"https://api.github.com/users/graemerocher","html_url":"https://github.com/graemerocher","followers_url":"https://api.github.com/users/graemerocher/followers","following_url":"https://api.github.com/users/graemerocher/following{/other_user}","gists_url":"https://api.github.com/users/graemerocher/gists{/gist_id}","starred_url":"https://api.github.com/users/graemerocher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemerocher/subscriptions","organizations_url":"https://api.github.com/users/graemerocher/orgs","repos_url":"https://api.github.com/users/graemerocher/repos","events_url":"https://api.github.com/users/graemerocher/events{/privacy}","received_events_url":"https://api.github.com/users/graemerocher/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2015-07-29T07:03:09Z","updated_at":"2015-09-09T08:25:45Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-08-24T08:57:59Z","updated_at":"2015-09-17T14:33:12Z","closed_at":null,"body":"When using startAsync or task {} in controller methods for asynchronous processing, output is unreliable. By unreliable I mean that Hibernate (or wherever the issue lies) is producing semi-random output. Steps to reproduce:\r\n\r\nTo duplicate:\r\n\r\n1. Clone the repository at https://github.com/donald-jackson/grails-async-error-demo.git\r\n2. 'run-app' in Grails and visit /AsyncErrorTest/systemSetting\r\n3. Create a setting with optionName = 'testOption' set value to true (or false)\r\n4. Run the script created (update URL as necessary)\r\n  *  php produce_error.php \"http://localhost:8080/AsyncErrorTest/systemSetting/showVariable\"\r\n5. The first run should work correctly, then run\r\n  * php produce_error.php \"http://localhost:8080/AsyncErrorTest/systemSetting/showVariableAsync\"\r\n6. The second run should also work correctly.\r\n7. Change the variable value to the opposite of what set in step 3 (true/false)\r\n8. Run\r\n  * php produce_error.php \"http://localhost:8080/AsyncErrorTest/systemSetting/showVariableAsync\"\r\n9. Variables should be flipping around.\r\n10. Once you notice this behaviour you can check in your browser or even on the original showVariable method and it will also give unreliable output.\r\n\r\nTested on Mac OS X 10.10.2 - grails 2.5.1\r\n\r\nJava details:\r\njava version \"1.8.0_20\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_20-b26)\r\nJava HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/grails/grails-core/issues/comments/141105201","html_url":"https://github.com/grails/grails-core/issues/9198#issuecomment-141105201","issue_url":"https://api.github.com/repos/grails/grails-core/issues/9198","id":141105201,"user":{"login":"graemerocher","id":66626,"avatar_url":"https://avatars.githubusercontent.com/u/66626?v=3","gravatar_id":"","url":"https://api.github.com/users/graemerocher","html_url":"https://github.com/graemerocher","followers_url":"https://api.github.com/users/graemerocher/followers","following_url":"https://api.github.com/users/graemerocher/following{/other_user}","gists_url":"https://api.github.com/users/graemerocher/gists{/gist_id}","starred_url":"https://api.github.com/users/graemerocher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemerocher/subscriptions","organizations_url":"https://api.github.com/users/graemerocher/orgs","repos_url":"https://api.github.com/users/graemerocher/repos","events_url":"https://api.github.com/users/graemerocher/events{/privacy}","received_events_url":"https://api.github.com/users/graemerocher/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T14:33:12Z","updated_at":"2015-09-17T14:33:12Z","body":"Thanks for the feedback guys, I have marked it is a blocker and we will look at doing a 2.5.2 release soon."}}