From akozlov at openjdk.org Fri Jul 1 16:22:12 2022 From: akozlov at openjdk.org (Anton Kozlov) Date: Fri, 1 Jul 2022 16:22:12 GMT Subject: [crac] RFR: Support extra criu flags from the environment [v2] In-Reply-To: References: Message-ID: On Thu, 30 Jun 2022 17:12:02 GMT, Volker Simonis wrote: >> When testing with different `criu` versions or `criu` configurations it might be useful to be able to modify the default `criu` command line parameters. This PR introduces the new environment variable `CRAC_CRIU_OPTS` which will be interpreted as a space separated list of `criu` flags to be appended to the hard-coded list of command line parameters. E.g. >> >> >> $ CRAC_CRIU_OPTS="-v4 -o resume.log -W /tmp/crac" java -XX:CRaCRestoreFrom=/tmp/crac >> >> >> This will set the logging level to 4 (thus overriding the hard-coded logging level of 1 for resuming), redirect the log to the file `resume.log` and change `criu`'s working directory (which will contain the log file) to `/tmp/crac`. > > Volker Simonis has updated the pull request incrementally with one additional commit since the last revision: > > Drop surplus arguments from CRAC_CRIU_OPTS and issue a warning Looks good to me. Thanks! ------------- Marked as reviewed by akozlov (Lead). PR: https://git.openjdk.org/crac/pull/26 From simonis at openjdk.org Mon Jul 4 08:06:47 2022 From: simonis at openjdk.org (Volker Simonis) Date: Mon, 4 Jul 2022 08:06:47 GMT Subject: [crac] Integrated: Support extra criu flags from the environment In-Reply-To: References: Message-ID: On Wed, 29 Jun 2022 13:00:59 GMT, Volker Simonis wrote: > When testing with different `criu` versions or `criu` configurations it might be useful to be able to modify the default `criu` command line parameters. This PR introduces the new environment variable `CRAC_CRIU_OPTS` which will be interpreted as a space separated list of `criu` flags to be appended to the hard-coded list of command line parameters. E.g. > > > $ CRAC_CRIU_OPTS="-v4 -o resume.log -W /tmp/crac" java -XX:CRaCRestoreFrom=/tmp/crac > > > This will set the logging level to 4 (thus overriding the hard-coded logging level of 1 for resuming), redirect the log to the file `resume.log` and change `criu`'s working directory (which will contain the log file) to `/tmp/crac`. This pull request has now been integrated. Changeset: e20da668 Author: Volker Simonis URL: https://git.openjdk.org/crac/commit/e20da668a9d294e3560adf76e725ad06e3b716c5 Stats: 42 lines in 1 file changed: 31 ins; 6 del; 5 mod Support extra criu flags from the environment Reviewed-by: akozlov ------------- PR: https://git.openjdk.org/crac/pull/26 From simonis at openjdk.org Tue Jul 5 10:41:27 2022 From: simonis at openjdk.org (Volker Simonis) Date: Tue, 5 Jul 2022 10:41:27 GMT Subject: [crac] RFR: Block RESTORE_SIGNAL in all threads Message-ID: The 'crac' branch already introduced a signal set for blocked signals which contains `RESTORE_SIGNAL` (i.e. `SIGRTMIN+2`) but the signalset is currently not used. This PR uses that signalset to block `RESTORE_SIGNAL` in all threads as recommended when using [`sigwaitinfo()`](https://man7.org/linux/man-pages/man2/sigwaitinfo.2.html) to wait for `RESTORE_SIGNAL`. ------------- Commit messages: - Block RESTORE_SIGNAL in all threads Changes: https://git.openjdk.org/crac/pull/27/files Webrev: https://webrevs.openjdk.org/?repo=crac&pr=27&range=00 Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod Patch: https://git.openjdk.org/crac/pull/27.diff Fetch: git fetch https://git.openjdk.org/crac pull/27/head:pull/27 PR: https://git.openjdk.org/crac/pull/27 From akozlov at openjdk.org Wed Jul 6 11:21:18 2022 From: akozlov at openjdk.org (Anton Kozlov) Date: Wed, 6 Jul 2022 11:21:18 GMT Subject: [crac] RFR: Block RESTORE_SIGNAL in all threads In-Reply-To: References: Message-ID: On Tue, 5 Jul 2022 10:34:16 GMT, Volker Simonis wrote: > The 'crac' branch already introduced a signal set for blocked signals which contains `RESTORE_SIGNAL` (i.e. `SIGRTMIN+2`) but the signalset is currently not used. This PR uses that signalset to block `RESTORE_SIGNAL` in all threads as recommended when using [`sigwaitinfo()`](https://man7.org/linux/man-pages/man2/sigwaitinfo.2.html) to wait for `RESTORE_SIGNAL`. I've lost this code during the 6d5c6da75b6cfce63a45c32cd1089840c4fd65eb, bringing it back looks good. Thanks! ------------- Marked as reviewed by akozlov (Lead). PR: https://git.openjdk.org/crac/pull/27 From simonis at openjdk.org Wed Jul 6 14:13:03 2022 From: simonis at openjdk.org (Volker Simonis) Date: Wed, 6 Jul 2022 14:13:03 GMT Subject: [crac] Integrated: Block RESTORE_SIGNAL in all threads In-Reply-To: References: Message-ID: On Tue, 5 Jul 2022 10:34:16 GMT, Volker Simonis wrote: > The 'crac' branch already introduced a signal set for blocked signals which contains `RESTORE_SIGNAL` (i.e. `SIGRTMIN+2`) but the signalset is currently not used. This PR uses that signalset to block `RESTORE_SIGNAL` in all threads as recommended when using [`sigwaitinfo()`](https://man7.org/linux/man-pages/man2/sigwaitinfo.2.html) to wait for `RESTORE_SIGNAL`. This pull request has now been integrated. Changeset: 459b4e0d Author: Volker Simonis URL: https://git.openjdk.org/crac/commit/459b4e0dcc5b948245dc6cb9b2c35dbdebada66c Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod Block RESTORE_SIGNAL in all threads Reviewed-by: akozlov ------------- PR: https://git.openjdk.org/crac/pull/27 From inakonechnyy at openjdk.org Thu Jul 7 13:20:06 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Thu, 7 Jul 2022 13:20:06 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v2] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: Rework closing the jcmd socket. New approach, a bit complicated but proper - save an AttachOperation ( from jcmd ) and call "complete()" as attach operation function. ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/3350d505..bb3f6b19 Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=01 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=00-01 Stats: 42 lines in 4 files changed: 30 ins; 7 del; 5 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Thu Jul 7 13:35:15 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Thu, 7 Jul 2022 13:35:15 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v3] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: ws correction ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/bb3f6b19..75d62e7e Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=02 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=01-02 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Tue Jul 12 12:25:08 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Tue, 12 Jul 2022 12:25:08 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v4] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits: - Merge remote-tracking branch 'upstream/crac' into crac - ws correction - Rework closing the jcmd socket. New approach, a bit complicated but proper - save an AttachOperation ( from jcmd ) and call "complete()" as attach operation function. - whitespaces - Properly pass return code to jcmd peer, and pass correctly buffered output - Check the opened socket, if it is UNIX socked from jcmd. - Implementation of reporting checkpoint command execution to JCMD. ------------- Changes: https://git.openjdk.org/crac/pull/10/files Webrev: https://webrevs.openjdk.org/?repo=crac&pr=10&range=03 Stats: 301 lines in 11 files changed: 238 ins; 18 del; 45 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Fri Jul 15 23:51:18 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Fri, 15 Jul 2022 23:51:18 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v5] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with four additional commits since the last revision: - reworked socket fd validation - get an fd from linuxAttach operation - addressing review notes 2 - address review notes - corrections ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/3d9b0f70..b890d28e Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=04 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=03-04 Stats: 290 lines in 7 files changed: 59 ins; 197 del; 34 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Mon Jul 18 23:21:27 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Mon, 18 Jul 2022 23:21:27 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v6] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with three additional commits since the last revision: - amend - some amendments - cleanup ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/b890d28e..816bd99e Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=05 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=04-05 Stats: 36 lines in 6 files changed: 1 ins; 26 del; 9 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Thu Jul 21 15:34:35 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Thu, 21 Jul 2022 15:34:35 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v7] In-Reply-To: References: Message-ID: <8BJeH2e_DfeEQbG20XlyDirCKDtQO1SlNYwgO1RanmY=.b461c129-891b-4a91-8ea7-32bfd3de9245@github.com> > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: couple of corrections ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/816bd99e..13ed574c Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=06 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=05-06 Stats: 125 lines in 12 files changed: 67 ins; 20 del; 38 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Thu Jul 21 16:48:06 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Thu, 21 Jul 2022 16:48:06 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v8] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with two additional commits since the last revision: - corrections - corrections ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/13ed574c..183fbc4c Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=07 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=06-07 Stats: 25 lines in 2 files changed: 0 ins; 0 del; 25 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Thu Jul 21 17:39:41 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Thu, 21 Jul 2022 17:39:41 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v9] In-Reply-To: References: Message-ID: <957Ve7URtllfAwIHbiRewExaYVvdBzzEGVgGrO_nmAU=.eb23ca93-3259-48e3-adb2-55f00cbbc240@github.com> > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: some corrections ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/183fbc4c..bbdf113d Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=08 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=07-08 Stats: 11 lines in 4 files changed: 0 ins; 5 del; 6 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Fri Jul 22 19:34:42 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Fri, 22 Jul 2022 19:34:42 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v10] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with two additional commits since the last revision: - java code - corrections ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/bbdf113d..51308f6b Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=09 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=08-09 Stats: 27 lines in 3 files changed: 17 ins; 5 del; 5 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Fri Jul 22 20:46:24 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Fri, 22 Jul 2022 20:46:24 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v11] In-Reply-To: References: Message-ID: <68ZwJH1r2Xg-8sQMkh-si-SQNOJvKJ2cljhQNxlLiRw=.1fa994fd-d08e-4eb9-95ab-229583cdadb4@github.com> > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with two additional commits since the last revision: - corrections - magic ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/51308f6b..9e0c61ec Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=10 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=09-10 Stats: 5 lines in 1 file changed: 3 ins; 0 del; 2 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Mon Jul 25 10:41:41 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Mon, 25 Jul 2022 10:41:41 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v12] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: corrections ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/9e0c61ec..4c806fca Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=11 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=10-11 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Mon Jul 25 17:46:50 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Mon, 25 Jul 2022 17:46:50 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v13] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: re-arranged sources files ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/4c806fca..59028cb0 Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=12 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=11-12 Stats: 159 lines in 6 files changed: 95 ins; 55 del; 9 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Mon Jul 25 18:08:55 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Mon, 25 Jul 2022 18:08:55 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v14] In-Reply-To: References: Message-ID: <5ZVbGt6HNV2E-fpLwXEgQp82oqxpIcpxkd8kmVi8vxM=.f2b134d0-4a77-439b-b74d-a79ec59625db@github.com> > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with two additional commits since the last revision: - corrections - corrections ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/59028cb0..918f4825 Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=13 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=12-13 Stats: 12 lines in 4 files changed: 2 ins; 3 del; 7 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From ethan at mccue.dev Mon Jul 25 18:45:17 2022 From: ethan at mccue.dev (Ethan McCue) Date: Mon, 25 Jul 2022 14:45:17 -0400 Subject: CrAC with Clojure Message-ID: Hey all, I'm looking into how CrAC could be used to improve startup time for the specific case of Clojure programs. Clojure in particular has a longstanding issue with startup time related to the initialization of its runtime environment. This is a big issue with runtime environments like AWS lambda. The solutions in the community are to compile ahead of time with graalvm or to use an alternative clojure implementation like babashka or nbb. Both of those have some asterisks attached, so it would be nice if a potential flow could be 1. Spin up a JVM in CI 2. Load Clojure code and do the expensive stuff like var initialization 3. Dump the state of that JVM with CrAC 4. Package up that state dump into something like a Dockerfile I'm able and willing to help with the clojure side of things, but I don't feel like I have a good enough understanding of the CrAC prototype to pull off the rest so I'm reaching out here in case there are any interested folks who know how to do. -------------- next part -------------- An HTML attachment was scrubbed... URL: From akozlov at azul.com Tue Jul 26 09:20:05 2022 From: akozlov at azul.com (Anton Kozlov) Date: Tue, 26 Jul 2022 12:20:05 +0300 Subject: CrAC with Clojure In-Reply-To: References: Message-ID: <3ee3b643-a76e-bebb-89a0-2cd9978e707e@azul.com> Hi Ethan, You may refer to [1] as the entry point. A step-by-step guide [2] should provide a basic understanding of the flow. For the command-line examples please refer to PR [3] and [4]. These have a demo code and another example workflow. And for packing as a docker image, you may refer to a java lambda example [5]. Thanks, Anton [1] https://github.com/CRaC/docs [2] https://github.com/CRaC/docs/blob/master/STEP-BY-STEP.md [3] https://github.com/openjdk/crac/pull/21 [4] https://github.com/openjdk/crac/pull/16 [5] https://github.com/crac/example-lambda On 7/25/22 21:45, Ethan McCue wrote: > Hey all, > > I'm looking into how CrAC could be used to improve startup time for the specific case of Clojure programs. > > Clojure in particular has a longstanding issue with startup time related to the initialization of its runtime environment. This is a big issue with runtime environments like AWS lambda. > > The solutions in the community are to compile ahead of time with graalvm or to use an alternative clojure implementation like babashka or nbb. Both of those have some asterisks attached, so it would be nice if a potential flow could be > > 1. Spin up a JVM in CI > 2. Load Clojure code and do the expensive stuff like var initialization > 3. Dump the state of that JVM with CrAC > 4. Package up that state dump into something like a Dockerfile > > I'm able and willing to help with the clojure side of things, but I don't feel like I have a good enough understanding of the CrAC prototype to pull off the rest so I'm reaching out here in case there are any interested folks who know how to do. From inakonechnyy at openjdk.org Tue Jul 26 11:16:59 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Tue, 26 Jul 2022 11:16:59 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v15] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: correction ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/918f4825..87ddcbaa Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=14 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=13-14 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From inakonechnyy at openjdk.org Tue Jul 26 18:13:19 2022 From: inakonechnyy at openjdk.org (Ilarion Nakonechnyy) Date: Tue, 26 Jul 2022 18:13:19 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v16] In-Reply-To: References: Message-ID: > pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: corrections ------------- Changes: - all: https://git.openjdk.org/crac/pull/10/files - new: https://git.openjdk.org/crac/pull/10/files/87ddcbaa..ccf84467 Webrevs: - full: https://webrevs.openjdk.org/?repo=crac&pr=10&range=15 - incr: https://webrevs.openjdk.org/?repo=crac&pr=10&range=14-15 Stats: 8 lines in 1 file changed: 5 ins; 1 del; 2 mod Patch: https://git.openjdk.org/crac/pull/10.diff Fetch: git fetch https://git.openjdk.org/crac pull/10/head:pull/10 PR: https://git.openjdk.org/crac/pull/10 From akozlov at openjdk.org Wed Jul 27 18:01:06 2022 From: akozlov at openjdk.org (Anton Kozlov) Date: Wed, 27 Jul 2022 18:01:06 GMT Subject: [crac] RFR: Report checkpoint processing to jcmd [v16] In-Reply-To: References: Message-ID: On Tue, 26 Jul 2022 18:13:19 GMT, Ilarion Nakonechnyy wrote: >> pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit() > > Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision: > > corrections Few notes from my side. I haven't run this yet, will try in a couple of days. Thanks! src/hotspot/os/linux/os_linux.cpp line 6238: > 6236: print_resources(ostream, "OK: jcmd socket"); > 6237: ok = true; > 6238: continue; You should not reset `ok` state here -- continue below should be enough. Otherwise you may lose info about e.g. previously found socket. src/hotspot/os/linux/os_linux.cpp line 6255: > 6253: if (CRHeapDumpOnCheckpointException){ > 6254: HeapDumper::dump_heap(); > 6255: } What is the reason for this change? CRDoThrowCheckpointException is useful sometimes. Please revert back. src/hotspot/os/linux/os_linux.cpp line 6387: > 6385: { > 6386: cr.jcmd_operation = (LinuxAttachOperation *) op; > 6387: cr.ostream = (outputStream *) stream; Please initialize these in the constructor. src/java.base/share/classes/jdk/crac/Core.java line 268: > 266: } > 267: } > 268: } Let's move the whole recursive check from public checkpointRestore() here, and make that only to call the private method. ------------- Changes requested by akozlov (Lead). PR: https://git.openjdk.org/crac/pull/10 From ethan at mccue.dev Mon Jul 25 18:43:02 2022 From: ethan at mccue.dev (Ethan McCue) Date: Mon, 25 Jul 2022 18:43:02 -0000 Subject: CrAC with Clojure Message-ID: Hey all, I'm looking into how CrAC could be used to improve startup time for the specific case of Clojure programs. Clojure in particular has a longstanding issue with startup time related to the initialization of its runtime environment. This is a big issue with runtime environments like AWS lambda. The solutions in the community are to compile ahead of time with graalvm or to use an alternative clojure implementation like babashka or nbb. Both of those have some asterisks attached, so it would be nice if a potential flow could be 1. Spin up a JVM in CI 2. Load Clojure code and do the expensive stuff like var initialization 3. Dump the state of that JVM with CrAC 4. Package up that state dump into something like a Dockerfile I'm able and willing to help with the clojure side of things, but I don't feel like I have a good enough understanding of the CrAC prototype to pull off the rest so I'm reaching out here in case there are any interested folks who know how to do. -------------- next part -------------- An HTML attachment was scrubbed... URL: