{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5169","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5169/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5169/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5169/events","html_url":"https://github.com/spring-projects/spring-boot/issues/5169","id":134216975,"number":5169,"title":"Deadlock during Initialization of SpringBoot running in Glassfish","user":{"login":"talksinmath","id":12029799,"avatar_url":"https://avatars.githubusercontent.com/u/12029799?v=3","gravatar_id":"","url":"https://api.github.com/users/talksinmath","html_url":"https://github.com/talksinmath","followers_url":"https://api.github.com/users/talksinmath/followers","following_url":"https://api.github.com/users/talksinmath/following{/other_user}","gists_url":"https://api.github.com/users/talksinmath/gists{/gist_id}","starred_url":"https://api.github.com/users/talksinmath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talksinmath/subscriptions","organizations_url":"https://api.github.com/users/talksinmath/orgs","repos_url":"https://api.github.com/users/talksinmath/repos","events_url":"https://api.github.com/users/talksinmath/events{/privacy}","received_events_url":"https://api.github.com/users/talksinmath/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/feedback-provided","name":"feedback-provided","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-17T08:44:07Z","updated_at":"2016-02-18T19:18:14Z","closed_at":null,"body":"During startup of SpringBoot-Application within Glassfish the initialization process sometimes hangs with a deadlock (see attached thread-dump). This does not happen reproducible - depending on machine speed it happens about every 30 startups of the container.\r\n\r\nOur current workaround is to patch the `spring.factories` of `spring-boot-autoconfigure.jar` and to remove the `BackgroundPreinitializer`. \r\n\r\nWe would be really happy if we would not have to apply our manual patch in future versions but have a mechanism to control whether the `BackgroundPreinitializer` is started or not (e.g. a System-Property).\r\n\r\nThank you!\r\n\r\n[thread.zip](https://github.com/spring-projects/spring-boot/files/133911/thread.zip)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/185871441","html_url":"https://github.com/spring-projects/spring-boot/issues/5169#issuecomment-185871441","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5169","id":185871441,"user":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars.githubusercontent.com/u/914682?v=3","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T19:18:14Z","updated_at":"2016-02-18T19:18:14Z","body":"> Also the ‘WebappClassloader‘ is never used in parallel\r\n\r\nThe ClassLoader will be used in parallel whenever two threads attempt to load resources or classes at the same time. That's exactly what's happening here.\r\n\r\n> web searches do not yield any results of other people running into this problem\r\n\r\nHere's one example of someone else with the same problem: http://stackoverflow.com/questions/17611041/ehcache-glassfish-3-1-2-deadlock"}}