{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-session/issues/869","repository_url":"https://api.github.com/repos/spring-projects/spring-session","labels_url":"https://api.github.com/repos/spring-projects/spring-session/issues/869/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-session/issues/869/comments","events_url":"https://api.github.com/repos/spring-projects/spring-session/issues/869/events","html_url":"https://github.com/spring-projects/spring-session/issues/869","id":256110444,"node_id":"MDU6SXNzdWUyNTYxMTA0NDQ=","number":869,"title":"TestContainers related memory leaks","user":{"login":"rwinch","id":362503,"node_id":"MDQ6VXNlcjM2MjUwMw==","avatar_url":"https://avatars0.githubusercontent.com/u/362503?v=4","gravatar_id":"","url":"https://api.github.com/users/rwinch","html_url":"https://github.com/rwinch","followers_url":"https://api.github.com/users/rwinch/followers","following_url":"https://api.github.com/users/rwinch/following{/other_user}","gists_url":"https://api.github.com/users/rwinch/gists{/gist_id}","starred_url":"https://api.github.com/users/rwinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwinch/subscriptions","organizations_url":"https://api.github.com/users/rwinch/orgs","repos_url":"https://api.github.com/users/rwinch/repos","events_url":"https://api.github.com/users/rwinch/events{/privacy}","received_events_url":"https://api.github.com/users/rwinch/received_events","type":"User","site_admin":false},"labels":[{"id":533024444,"node_id":"MDU6TGFiZWw1MzMwMjQ0NDQ=","url":"https://api.github.com/repos/spring-projects/spring-session/labels/waiting%20for%20dependency","name":"waiting for dependency","color":"b60205","default":false}],"state":"open","locked":false,"assignee":{"login":"vpavic","id":1149230,"node_id":"MDQ6VXNlcjExNDkyMzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1149230?v=4","gravatar_id":"","url":"https://api.github.com/users/vpavic","html_url":"https://github.com/vpavic","followers_url":"https://api.github.com/users/vpavic/followers","following_url":"https://api.github.com/users/vpavic/following{/other_user}","gists_url":"https://api.github.com/users/vpavic/gists{/gist_id}","starred_url":"https://api.github.com/users/vpavic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpavic/subscriptions","organizations_url":"https://api.github.com/users/vpavic/orgs","repos_url":"https://api.github.com/users/vpavic/repos","events_url":"https://api.github.com/users/vpavic/events{/privacy}","received_events_url":"https://api.github.com/users/vpavic/received_events","type":"User","site_admin":false},"assignees":[{"login":"vpavic","id":1149230,"node_id":"MDQ6VXNlcjExNDkyMzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1149230?v=4","gravatar_id":"","url":"https://api.github.com/users/vpavic","html_url":"https://github.com/vpavic","followers_url":"https://api.github.com/users/vpavic/followers","following_url":"https://api.github.com/users/vpavic/following{/other_user}","gists_url":"https://api.github.com/users/vpavic/gists{/gist_id}","starred_url":"https://api.github.com/users/vpavic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpavic/subscriptions","organizations_url":"https://api.github.com/users/vpavic/orgs","repos_url":"https://api.github.com/users/vpavic/repos","events_url":"https://api.github.com/users/vpavic/events{/privacy}","received_events_url":"https://api.github.com/users/vpavic/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2017-09-08T00:47:17Z","updated_at":"2018-10-12T20:31:48Z","closed_at":null,"author_association":"MEMBER","body":"When running the build I see warnings like this:\r\n\r\n```\r\n:spring-session-sample-javaconfig-redis:jar UP-TO-DATE\r\n:spring-session-sample-javaconfig-redis:integrationTest\r\n:spring-session-sample-javaconfig-redis:appAfterIntegrationTest\r\n19:43:55.657 [localhost-startStop-1] INFO  o.s.w.c.s.AnnotationConfigWebApplicationContext - Closing Root WebApplicationContext: startup date [Thu Sep 07 19:43:50 CDT 2017]; root of context hierarchy\r\n19:43:55.658 [localhost-startStop-1] INFO  o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647\r\n\r\n19:43:57 WARN  The web application [ROOT] appears to have started a thread named [dockerjava-netty-1-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\r\n java.lang.Thread.sleep(Native Method)\r\n org.testcontainers.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.confirmShutdown(SingleThreadEventExecutor.java:705)\r\n org.testcontainers.shaded.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:325)\r\n org.testcontainers.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)\r\n org.testcontainers.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)\r\n java.lang.Thread.run(Thread.java:745)\r\n19:43:57 WARN  The web application [ROOT] appears to have started a thread named [threadDeathWatcher-3-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\r\n java.lang.Thread.sleep(Native Method)\r\n org.testcontainers.shaded.io.netty.util.ThreadDeathWatcher$Watcher.run(ThreadDeathWatcher.java:152)\r\n org.testcontainers.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)\r\n java.lang.Thread.run(Thread.java:745)\r\n19:43:57 WARN  The web application [ROOT] appears to have started a thread named [dockerjava-netty-1-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\r\n java.lang.Thread.sleep(Native Method)\r\n org.testcontainers.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.confirmShutdown(SingleThreadEventExecutor.java:705)\r\n org.testcontainers.shaded.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:325)\r\n org.testcontainers.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)\r\n org.testcontainers.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)\r\n java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\nwe should ensure all the threads are shutdown properly"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-session/issues/comments/429453745","html_url":"https://github.com/spring-projects/spring-session/issues/869#issuecomment-429453745","issue_url":"https://api.github.com/repos/spring-projects/spring-session/issues/869","id":429453745,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTQ1Mzc0NQ==","user":{"login":"kiview","id":5088104,"node_id":"MDQ6VXNlcjUwODgxMDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5088104?v=4","gravatar_id":"","url":"https://api.github.com/users/kiview","html_url":"https://github.com/kiview","followers_url":"https://api.github.com/users/kiview/followers","following_url":"https://api.github.com/users/kiview/following{/other_user}","gists_url":"https://api.github.com/users/kiview/gists{/gist_id}","starred_url":"https://api.github.com/users/kiview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiview/subscriptions","organizations_url":"https://api.github.com/users/kiview/orgs","repos_url":"https://api.github.com/users/kiview/repos","events_url":"https://api.github.com/users/kiview/events{/privacy}","received_events_url":"https://api.github.com/users/kiview/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T20:31:48Z","updated_at":"2018-10-12T20:31:48Z","author_association":"NONE","body":"As explained in more detail in https://github.com/testcontainers/testcontainers-java/issues/651#issuecomment-429444961, I'm pretty sure this could be solved (or more correctly, the warnings omitted), by setting the `skipMemoryLeakChecksOnJvmShutdown` Tomcat context attribute.\r\n\r\nIf this would be a desired solution, I'd propose to make this attribute configurable via [TomcatWebServerFactoryCustomizer](https://github.com/spring-projects/spring-boot/blob/v2.0.5.RELEASE/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java) (is this the correct class?) and enabling it for the tests.\r\n\r\n"}}
{"actor":{"display_login":"kiview"}}