{"id":22736603,"url":"https://github.com/fredwangwang/cf-jvmkill-bug","last_synced_at":"2025-03-30T02:44:10.373Z","repository":{"id":129385009,"uuid":"199977405","full_name":"fredwangwang/cf-jvmkill-bug","owner":"fredwangwang","description":"illustration of a corner case bug of cloudfoundry/jvmkill","archived":false,"fork":false,"pushed_at":"2019-08-01T20:42:52.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T05:22:55.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fredwangwang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-01T04:36:16.000Z","updated_at":"2019-08-01T20:42:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffa93f43-651e-465d-a13c-44dbd90da2e0","html_url":"https://github.com/fredwangwang/cf-jvmkill-bug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwangwang%2Fcf-jvmkill-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwangwang%2Fcf-jvmkill-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwangwang%2Fcf-jvmkill-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwangwang%2Fcf-jvmkill-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fredwangwang","download_url":"https://codeload.github.com/fredwangwang/cf-jvmkill-bug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246269911,"owners_count":20750319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T21:27:56.614Z","updated_at":"2025-03-30T02:44:10.352Z","avatar_url":"https://github.com/fredwangwang.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What for?\nThere is a sample app to illustrate a conrner bug in cf-jvmkill. Jvmkill would fail to kill the \nprocess due to additional memory allocation made by jvmkill agent.\nSpecifically, [`PoolStats`](https://github.com/cloudfoundry/jvmkill/blob/master/jvmkill/src/agentcontroller/poolstats.rs).\n\n## What happen if I push the app?\nAfter push the app for 5s, the jvmkill will be triggered, and hang. Here is the log output\n\n```\n   2019-07-31T22:32:57.49-0600 [API/0] OUT Updated app with guid beae1595-87d0-4489-8cda-c5650f283555 ({\"state\"=\u003e\"STARTED\"})\n   2019-07-31T22:32:57.53-0600 [CELL/0] OUT Cell de6b4aa1-d4ee-4e1a-a8c6-a2df9ea95938 creating container for instance 6aad8a04-e178-479a-41fe-06c0\n   2019-07-31T22:32:58.09-0600 [CELL/0] OUT Cell de6b4aa1-d4ee-4e1a-a8c6-a2df9ea95938 successfully created container for instance 6aad8a04-e178-479a-41fe-06c0\n   2019-07-31T22:32:58.18-0600 [CELL/0] OUT Downloading droplet...\n   2019-07-31T22:33:01.22-0600 [CELL/0] OUT Downloaded droplet (62.9M)\n   2019-07-31T22:33:01.33-0600 [CELL/0] OUT Starting health monitoring of container\n   2019-07-31T22:33:02.12-0600 [APP/PROC/WEB/0] OUT JVM Memory Configuration: -Xmx439914K -Xss1M -XX:ReservedCodeCacheSize=240M -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=96661K\n   2019-07-31T22:33:05.62-0600 [APP/PROC/WEB/0] OUT   .   ____          _            __ _ _\n   2019-07-31T22:33:05.63-0600 [APP/PROC/WEB/0] OUT  /\\\\ / ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\n   2019-07-31T22:33:05.63-0600 [APP/PROC/WEB/0] OUT ( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n   2019-07-31T22:33:05.63-0600 [APP/PROC/WEB/0] OUT  \\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n   2019-07-31T22:33:05.63-0600 [APP/PROC/WEB/0] OUT   '  |____| .__|_| |_|_| |_\\__, | / / / /\n   2019-07-31T22:33:05.63-0600 [APP/PROC/WEB/0] OUT  =========|_|==============|___/=/_/_/_/\n   2019-07-31T22:33:05.63-0600 [APP/PROC/WEB/0] OUT  :: Spring Boot ::        (v2.1.6.RELEASE)\n   2019-07-31T22:33:06.32-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:06.313  INFO 13 --- [           main] pertySourceApplicationContextInitializer : 'cloud' property source added\n   2019-07-31T22:33:06.32-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:06.327  INFO 13 --- [           main] nfigurationApplicationContextInitializer : Reconfiguration enabled\n   2019-07-31T22:33:06.35-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:06.354  INFO 13 --- [           main] c.f.cfjvmkill.CfjvmkillApplication       : Starting CfjvmkillApplication on 6aad8a04-e178-479a-41fe-06c0 with PID 13 (/home/vcap/app/BOOT-INF/classes started by vcap in /home/vcap/app)\n   2019-07-31T22:33:06.35-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:06.355  INFO 13 --- [           main] c.f.cfjvmkill.CfjvmkillApplication       : The following profiles are active: cloud\n   2019-07-31T22:33:08.87-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:08.874  INFO 13 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)\n   2019-07-31T22:33:08.96-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:08.963  INFO 13 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]\n   2019-07-31T22:33:08.96-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:08.964  INFO 13 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.21]\n   2019-07-31T22:33:09.22-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:09.222  INFO 13 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext\n   2019-07-31T22:33:09.22-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:09.223  INFO 13 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2740 ms\n   2019-07-31T22:33:09.87-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:09.872  INFO 13 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'\n   2019-07-31T22:33:10.32-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:10.324  INFO 13 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''\n   2019-07-31T22:33:10.34-0600 [APP/PROC/WEB/0] OUT 2019-08-01 04:33:10.339  INFO 13 --- [           main] c.f.cfjvmkill.CfjvmkillApplication       : Started CfjvmkillApplication in 6.309 seconds (JVM running for 8.211)\n   2019-07-31T22:33:10.35-0600 [APP/PROC/WEB/0] OUT starting to allocate memory after 5s\n   2019-07-31T22:33:12.22-0600 [CELL/0] OUT Container became healthy\n   2019-07-31T22:33:19.64-0600 [APP/PROC/WEB/0] ERR Resource exhaustion event: the JVM was unable to allocate memory from the heap.\n   2019-07-31T22:33:19.64-0600 [APP/PROC/WEB/0] ERR ResourceExhausted! (1/0)\n   2019-07-31T22:33:23.00-0600 [APP/PROC/WEB/0] OUT | Instance Count | Total Bytes | Class Name                                                                                                       |\n   2019-07-31T22:33:23.00-0600 [APP/PROC/WEB/0] OUT | 1496533        | 419081264   | [B                                                                                                               |\n   2019-07-31T22:33:23.01-0600 [APP/PROC/WEB/0] OUT | 3116           | 7474488     | [Ljava/lang/Object;                                                                                              |\n   2019-07-31T22:33:23.01-0600 [APP/PROC/WEB/0] OUT | 29184          | 2795688     | [C                                                                                                               |\n   ......\n   2019-07-31T22:33:23.12-0600 [APP/PROC/WEB/0] OUT | 40             | 4480        | Lorg/springframework/beans/factory/annotation/AnnotatedGenericBeanDefinition;                                    |\n   2019-07-31T22:33:23.12-0600 [APP/PROC/WEB/0] OUT | 183            | 4392        | Lorg/hibernate/validator/internal/engine/constraintvalidation/ClassBasedValidatorDescriptor;                     |\n   2019-07-31T22:33:23.13-0600 [APP/PROC/WEB/0] OUT | 176            | 4224        | Lorg/springframework/boot/web/server/MimeMappings$Mapping;                                                       |\n   2019-07-31T22:33:23.13-0600 [APP/PROC/WEB/0] OUT | 261            | 4176        | Lorg/springframework/core/convert/support/GenericConversionService$ConvertersForPair;                            |\n   2019-07-31T22:33:23.13-0600 [APP/PROC/WEB/0] OUT | 130            | 4160        | Lcom/sun/jmx/mbeanserver/ConvertingMethod;                                                                       |\n   2019-07-31T22:33:23.65-0600 [APP/PROC/WEB/0] OUT Memory usage:\n```\n\nAnd it will just halt forever. The state from `cf app \u003ccfjvmkill\u003e` still shows `running`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredwangwang%2Fcf-jvmkill-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffredwangwang%2Fcf-jvmkill-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredwangwang%2Fcf-jvmkill-bug/lists"}